This code works amazingly. Due to it, i feel relieved from burden of huge manual calculations. But i think it is not doing the calculations for HML correctly. Well you may please check and advise the correction please. The calculation of HML should be based on the following logic:
HML = (SH+BH)/2 - (SL+BL)/2
Where,
SH = if june_mcap_group = 1 & march_mom_group = 3
BH = if june_mcap_group = 2 & march_mom_group = 3
and
SL = if june_mcap_group = 1 & march_mom_group =1
BL = if june_mcap_group = 2 & march_mom_group = 1
HML = (SH+BH)/2 - (SL+BL)/2
Where,
SH = if june_mcap_group = 1 & march_mom_group = 3
BH = if june_mcap_group = 2 & march_mom_group = 3
and
SL = if june_mcap_group = 1 & march_mom_group =1
BL = if june_mcap_group = 2 & march_mom_group = 1
Comment