-
Book Overview & Buying
-
Table Of Contents
Learning Quantitative Finance with R
By :
The capital asset pricing model (CAPM) model helps to gauge risk contributed by security or portfolio to its benchmark and is measured by beta (
). Using the CAPM model, we can estimate the expected excess return of an individual security or portfolio which is proportional to its beta:

Here:
E(Ri): Expected return of security
E(Rm): Expected return of market
Ri: Rate of return of security
Rf: Risk Free rate of return
Rm: Benchmark or market return
: Beta of the security
CVX is regressed against DJI using linear model as per equation 5.4.
Here I used zero as risk-free return in the following command:
>rf<- rep(0,length(dji)) >model <- lm((ret_cvx -rf) ~ (ret_dji -rf) ) > model Call: lm(formula = (ret_cvx - rf) ~ (ret_dji - rf)) Coefficients: (Intercept) ret_dji -0.0002013 1.1034521
You can see the intercept term in the above result is alpha (-0.0002013) and coefficient for ret_dji is beta (1.1034521). However, you can also use the PerformanceAnalytics...