Hi everyone,
I am new to Stata and I am using it to analyze data for my Bachelor thesis. I have a dataset containing monthly returns for stocks (Ri), risk-free rates (Rf) and market returns (Rm) in the last 5 years roughly (2017-2022)
I am currently trying to compute market betas by running the following regression (from Capital Asset Pricing Model):
(excess return on stock i) = alpha_i = beta_i (market excess return) + error term_i
where 'excess return on stock_i’ = stock_exc_ret = Ri - Rf and
'market excess return’ = market_exc_ret = Rm - Rf
I want to compute the beta of the above regression for the same firm (identified by gvkey) across 2017-2022. I used the following approach:
rangestat (reg) stock_exc_ret market_exc_ret, by(gvkey) interval(year . .)
however I get beta values (b_market_exc_ret) that are unreasonable and unacceptable from a theoretical viewpoint. (e.g. the mean is 345 while it should be around 1). does anyone have some suggestion on why this is the case?
I leave here a sample of the dataset
datadate month_ret_vol stdret gvkey year stock_exc_ret market_exc_ret reg_nobs reg_r2 reg_adj_r2 b_market_exc_ret b_cons se_market_exc_ret se_cons
31jan2017 5.093794 5.093794 1004 2017 -2.980691 .0175263 42 .42950937 .4152471 183.64449 -2.0490518 33.464616 1.6615401
28feb2017 5.093794 5.093794 1004 2017 7.59576 .0368343 42 .42950937 .4152471 183.64449 -2.0490518 33.464616 1.6615401
31mar2017 5.093794 5.093794 1004 2017 -2.29553 -.0007422 42 .42950937 .4152471 183.64449 -2.0490518 33.464616 1.6615401
30apr2017 5.093794 5.093794 1004 2017 42 .42950937 .4152471 183.64449 -2.0490518 33.464616 1.6615401
31may2017 5.093794 5.093794 1004 2017 -2.918091 .0109622 42 .42950937 .4152471 183.64449 -2.0490518 33.464616 1.6615401
30jun2017 5.093794 5.093794 1004 2017 -.5157859 .0041968 42 .42950937 .4152471 183.64449 -2.0490518 33.464616 1.6615401
31jul2017 5.093794 5.093794 1004 2017 7.80998 .0186268 42 .42950937 .4152471 183.64449 -2.0490518 33.464616 1.6615401
31aug2017 5.093794 5.093794 1004 2017 -3.583715 -.0002805 42 .42950937 .4152471 183.64449 -2.0490518 33.464616 1.6615401
30sep2017 5.093794 5.093794 1004 2017 42 .42950937 .4152471 183.64449 -2.0490518 33.464616 1.6615401
31oct2017 5.093794 5.093794 1004 2017 3.13574 .0213482 42 .42950937 .4152471 183.64449 -2.0490518 33.464616 1.6615401
Apologies for the non-technical language.
Related Posts with Rangestat to compute market betas
Need help with tricking -coefplot-, thanks to restricted data issues (Ben Jann user written command)Dear Statalist: I have been using the user-written -coefplot- (authored by Ben Jann). It's great. I…
Importing Excel variables into Stata with shortened namesDear all, I am working with a dataset that contains information about individuals and their relatio…
Randomly draw one value of a var without duplicatesHi, I have a panel dataset, with each person being repeated for mon-sat, depending on how many time…
Problems with table command in Stata17I have some problems using table command in Stata 17 Code: webuse nhanes2l table (sex race) () () …
Stability test- how to interpret the results?Hi everyone, I am currently doing a time-series analysis using the VECM. I have one cointegrating …
Subscribe to:
Post Comments (Atom)
0 Response to Rangestat to compute market betas
Post a Comment