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
under contrast effects for interactionsI have a pretty basic question about interpreting the results from using the -contrast- command for …
help with menbreg observationMixed-effects negative binomial regression for a 3-wave panel data. Baseline sample size is 1144. Af…
heteroskedasticity in dynamic panelI am working on a Dynamic Panel Model in Stata, i tested for the serial correlation and the heterosk…
"invalid name" when presenting p<0.001 instead of p=0.000Dear All, I calculated p-value after using sts test, and I intended to acquire p<0.001 when calcu…
How do you interpreted level variance logit multilevel?I have specified a multilevel logit model with three levels. I have specified the constant as a rand…
Subscribe to:
Post Comments (Atom)
0 Response to Loop for moving range
Post a Comment