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
heteroskedasticity in logistic regression modelHi, I have cross sectional data and am using logistic regression. My question is how do I check my …
Postestimation test for cross-sectional time series FGLS regressionHi I'm conducting a study on the determinants of bank profitability in my country. I have data from…
change the color of bars -BOXPLOTHi to everybody, I have done for the first time "Box plot by group with data point" By default, Sta…
Equivalent for noisily option in fuzzy package?Hello Statalist, does anyone know how to get Stata to print all calculations occuring due to comman…
Different y-axis range on xtline plotsI'm trying to construct some xtline plots using 10 different ids. The range of values of y for id #s…
Subscribe to:
Post Comments (Atom)
0 Response to Loop for moving range
Post a Comment