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
Dummy variable for neonatal Mortality, Infant mortality and Child mortalityHi, I am working on the Demographic health survey (DHS) data. I have to compute the neonatal Mortali…
-margins- after -xtlogit,fe-Dear Statalist This is a question about interpreting the results from a panel data fixed-effects lo…
Loop over multiple arrays via foreachHello together! trying now since a few hours to fix my problem - I am not able to come up with an a…
SEM model group analysis not concaveHello there ! I am trying to use Stata and check my SEM model for measurement in-variance among two…
Destring with many decimal issueHi I am fairly new to Stata, and have searched a lot on my issue but have not yet found a solution.…
Subscribe to:
Post Comments (Atom)
0 Response to Issue with calculating rolling betas for 36 months period
Post a Comment