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
merging two panel data sets - 1:m mergingHello, I need help with two merging panel data sets according to the following variables: h_id, year…
Measuring duration between age 13 and 19Hi people, Supposed i want to measure marriage timing among pregnant and non pregnant adolescents (a…
How to Keep Duplicated Variables based on the Value of another ColumnHello all! I am working on cleaning up a dataset, and I do not know how to do so. Here are some of …
Problems with panel dataI am new to stata and I trying to run a regression to understand demographic roles in unemployment, …
Compute Female proportion in each district in long format data in Stata. I have a long format dataset where it has 5 variables: did---district id sid---school id id--studen…
Subscribe to:
Post Comments (Atom)
0 Response to Issue with calculating rolling betas for 36 months period
Post a Comment