cumulative maximum loss (2 year rolling)
Posted: Wed Feb 21, 2024 1:07 pm
Sorry for cross posting here. I am hoping someone could help with this. I am looking to compute the cumulative maximum loss (CMAX) that
corresponds to the maximum loss compared to the highest level of a stock index over a two year period, using monthly data. I am having trouble doing this as I am unsure how to loop over the rolling two year window. Does anyone have any idea how to do this?
Thanks!
corresponds to the maximum loss compared to the highest level of a stock index over a two year period, using monthly data. I am having trouble doing this as I am unsure how to loop over the rolling two year window. Does anyone have any idea how to do this?
Thanks!