In stock portfolio setting, I am running the following loop
where sizef and valuef are variables having values from 1 to 5, and ri_rf has stock returns.
It has been more than an hour and it is still running, can we make it more efficient?
Code:
forval i = 1 / 497 { forval s = 1 / 5 { forval h = 1 / 5 { qui sum ri_rf if sizef == `s' & valuef == `h' & w_ser == `i' qui replace S`s'H`h' = r(mean) if w_ser == `i' } } }
It has been more than an hour and it is still running, can we make it more efficient?
Comment