Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72781

Calculate market beta automatically

$
0
0
Hi all,

I just started using STATA, so I do not have much knowledge about it. I need to calculate market betas for about 1000 event dates. I have the daily stock as well as market returns for each event date (period: -150 to -30 days prior to event date) in the following format:

For each row im column 1: Event dates
For each row in columns 2-7 (simplified): Stock return t-3, Stock return t-2, Stock return t-1, Market return t-3, Market return t-2, Market return t-1

I want to regress stock return (columns 2-4) against market return (columns 5-7). What command do I have to use in order to calculate the market beta for each event data and save it in as a new variable (e.g. in column 8)?

In other posts, I read that I have to use the rolling command. However, I do not know exactly how to apply it to my problem. I would be very happy, if someone can help me out. Thank you very much in advance!

Best regards,
Tobias

Viewing all articles
Browse latest Browse all 72781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>