Goodafternoon,
I have a file which includes a significant amount of cusips (S&P1500) and dates (2010-2020).
For those cusips I determined the market cap per month. Based on that I was able to determine the delta of market cap.
However, I am not able to find a solution to do a loop for the variance of the change in market cap. The variance of the change (delta) in market cap is calculated based on the preceding 60 months.
So for instance, when I want to determine the variance of change in market cap in januari 2016, I use the variance over the period jan 2011 - dec 2015. For februari 2016 I would like to use the variance of change in market cap over the period feb 2011- jan 2016 etc (so the range is always 60). Hope that my question is clear.
Thank you in advance.
Brgds,
James
Related Posts with Loop for moving range
example for merge m:mDear All, It is advised in the forum that, when possible possible, do not use
Code:
merge m:m ...
…
Brant tests: What should I conclude from Brant tests about the proportional odds assumption of ordered logit as the results conflict?Results: The control compared to treatment group 1 (who saw life satisfaction information) I find th…
Combining treatment units for synthetic control methodHello, I am thinking about using the synthetic control method to evaluate an intervention that took …
How to transfer a fmm code into matlabDear statalist:
I'm sorry to bother you about my question.I want to perform a finite mixture model w…
Question about pweight and fixed effectI have a survey data and I think I need to use pweight=wt to run the regression. The wt is construct…
Subscribe to:
Post Comments (Atom)
0 Response to Loop for moving range
Post a Comment