I am right now trying to generate annual return volatility for each company using the following formula with the monthly returns. My data contains a single number for all months of a given year for each firm. In the formula y stands for year and m stands for month and i stands for a firm. The units for vola are percentage points. I am not sure how to get to an annual return per company, should I use a loop? I don't even have a clue how to start
Attached is my provided data, where I already generated the company_id for each company, monthly returns are given by ret, and risk-free rate (rf) = rf
How to begin? how do I not double count, how to use an efficient way to get the annual return for each company even though the data is monthly? jeeeesus...
Thank you so so so much for your help!!! Best
Array
Related Posts with Annual return from each company, wen having monthly data given
Can I cite the name of the do file?In the do file, I want to save the data using the name of the do flle, how to cite it using macros? …
Counting dummy for a group of multiple variablesHi all, I am trying to accomplish a simple count, but I still am not able to get what I want after …
How can I count the observations by year (intervals) AND by country?Good day, So I have a data set (panel data) counting lots of variables. But for now I am only inter…
Panel data mapHi, I want to map my panel data neatly. I've id & t. I've 5 agricultural crop variables. I've …
Trying to do Rolling Standard Deviation give me this error. Can someone help ?Here is the command: tsset GVKEY_n Year rolling sd_NIBE=r(sd), window (4) clear : su NetIncome And…
Subscribe to:
Post Comments (Atom)
0 Response to Annual return from each company, wen having monthly data given
Post a Comment