Hi everyone. I have an initial dataset like this data trades;
input ticker date : monyy7. B S;
format date monyy7.;
cards;
99999 JAN2001 90 40
99999 FEB2001 40 90
88888 MAY2002 40 70
88888 JUN2002 40 40
;
run; Now I want to create 3 variables: alpha, delta, gamma. For each ticker-date, the three variables (alpha, delta, gamma) randomly take values from the set {0.1, 0.3, 0.5, 0.7, 0.9}, one at a time. So for each ticker-date pair, there are 125 combinations of alpha, delta, gamma (there are 5 choices for alpha, followed by 5 choices for delta, followed by 5 choices for gamma ==> total = 5^3 combinations for each ticker-date) So the output dataset is like this Ticker Date B S Alpha Delta Gamma 99999 Jan2001 90 40 0.1 0.1 0.1 99999 Jan2001 90 40 0.1 0.1 0.3 99999 Jan2001 90 40 0.1 0.1 0.5 99999 Jan2001 90 40 0.1 0.1 0.7 99999 Jan2001 90 40 0.1 0.1 0.9 99999 Jan2001 90 40 0.1 0.3 0.1 99999 Jan2001 90 40 0.1 0.3 0.3 99999 Jan2001 90 40 0.1 0.3 0.5 99999 Jan2001 90 40 0.1 0.3 0.7 99999 Jan2001 90 40 0.1 0.3 0.9 ….. …….. ……… …….. ……… …… ………. Could anyone please help me how to do this? Thank you very much
... View more