Beta coefficient


I am trying to code the beta coefficient using data exported from my excel data.

I have one column of return that I would like to analyse with a few other assets returns but i am not sure how to do so.

Thank you very much in advance


I made up some data. If this is not what you are looking for, please ask a more specific question.

df <- data.frame(read_excel("testfile.xlsx"))
lm(Returns ~ Asset_A + Asset_B, df)

Returns Asset_A Asset_B
1 -2 7 8
2 7 2 6
3 4 -1 2
4 3 5 -3
5 0 8 3
lm(Returns ~ Asset_A + Asset_B, df)
(Intercept) Asset_A Asset_B
5.7107 -0.7031 -0.1118

@fcas80 gives the basic instructions, but if you're trying to estimate the security market line I suspect you want to regress the market return on just one stock's return.


Do you want the standardized coefficient, also called the beta coefficient, or the regular slope coefficients?

Strangely, the the former is represented by the word beta while the latter is represented by the Greek letter beta. The difference is that the beta coefficient is how many standard deviations the dependent variable changes when the independent variable changes by one standard deviation, while the regular slope is how many of its units the dependent variable changes when the independent variable changes by one of its units. This always confuses my students!!

hi !

I want to know the beta as a measure of a stock's!

thank you

Thank you for your reply,

I am trying to find the beta coefficient that will allow me to see how one asset responds to the other one's move in the market. I wanted to give a further analysis than correlation by adding the volatility.

Thank you

standardized regression coefficients

beta on the security market line is not the standardized coefficient.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.