Hi, hope this question and description is easy to comprehend
I have gathered data for monthly returns for 49 industries from 2007 - 2018, as well as risk free rate (rf) and market returns, I wish to calculate a rolling beta for a 36 month window.
First issue:
The dates is formatted as 200701, 200702,...., 201812 with no days. How can I create a variable so stata recognizes it as months to create a window(36)
Second issue:
What would be the most reasonable code to use? I have been trying "rolling" but the the time variable seem to make it all messed up
Thank you in advance
Related Posts with Issue with calculating rolling betas for 36 months period
Test for the difference between two point predictions obtained from separate regressionsDear colleagues, I would like to perform a statistical test of the difference between two point pre…
Population size using SVY too smallHello; I did the following on Stata: svy:tab b8_under5, obs percent And the results I got were odd…
Change a numerical variable with string input into label valueHey there, I have a variable called "ad_tone" that has three values, negative, positive, and attack.…
SVYSET and SVY:tab helpHello, I have the following two SPSS commands. This is what I have from the SPSS codebook: CSPLAN A…
Create observations for neighboring statesHello, I have a dataset of firms investments in different states: e.g. Firm A invests $1million in …
Subscribe to:
Post Comments (Atom)
0 Response to Issue with calculating rolling betas for 36 months period
Post a Comment