Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php on line 580

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php on line 583

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php on line 586

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php on line 589

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php on line 592

Warning: Cannot modify header information - headers already sent by (output started at /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php:580) in /home/calcul9/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1673

Warning: Cannot modify header information - headers already sent by (output started at /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php:580) in /home/calcul9/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1673

Warning: Cannot modify header information - headers already sent by (output started at /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php:580) in /home/calcul9/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1673

Warning: Cannot modify header information - headers already sent by (output started at /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php:580) in /home/calcul9/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1673

Warning: Cannot modify header information - headers already sent by (output started at /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php:580) in /home/calcul9/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1673

Warning: Cannot modify header information - headers already sent by (output started at /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php:580) in /home/calcul9/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1673

Warning: Cannot modify header information - headers already sent by (output started at /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php:580) in /home/calcul9/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1673

Warning: Cannot modify header information - headers already sent by (output started at /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php:580) in /home/calcul9/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1673
{"id":2067,"date":"2011-04-03T18:02:28","date_gmt":"2011-04-03T23:02:28","guid":{"rendered":"http:\/\/www.calculatinginvestor.com\/?p=2067"},"modified":"2011-04-03T18:08:36","modified_gmt":"2011-04-03T23:08:36","slug":"tutorial-the-capital-asset-pricing-model","status":"publish","type":"post","link":"https:\/\/www.calculatinginvestor.com\/2011\/04\/03\/tutorial-the-capital-asset-pricing-model\/","title":{"rendered":"Tutorial: The Capital Asset Pricing Model"},"content":{"rendered":"

Let\u2019s\u00a0begin with some Q&A:<\/strong><\/p>\n

Question: Why do some financial assets tend to earn higher returns than others?<\/em><\/strong><\/p>\n

Answer:<\/strong> Financial theory tells us that, on average, higher returns are earned by financial assets that have higher risk.<\/p>\n

Question: Ok, so how do we measure risk?<\/em><\/strong><\/p>\n

Answer:<\/strong> One model used for measuring risk is the Capital Asset Pricing Model or CAPM.\u00a0\u00a0 In the CAPM, the risk that a security contributes to a diversified portfolio is measured by its beta (or \"\beta\"), and the expected excess return <\/em>of the security is proportional to beta.<\/p>\n

The term “excess return” refers to the additional return that the security earns\u00a0above the risk-free rate.\u00a0 For U.S. investors, the t-bill rate is typically used as the risk-free rate.<\/p>\n

The excess return earned by the market portfolio is also known as\u00a0the “market risk premium”.\u00a0 The risk premium for an individual security may be higher or lower than the market risk premium depending on the security’s beta.<\/p>\n

If the beta is greater than one (the beta of the market portfolio is one by definition), then the expected return for the security is higher than the market average, and, if the beta is less than one, the expected return is lower.<\/p>\n

In\u00a0the CAPM, the total expected return of a security is given by this equation:<\/p>\n

\"<\/p>\n

Notice that only the excess return varies with beta, and the risk free rate is added to the\u00a0security’s risk premium\u00a0to get the total expected return.<\/p>\n

The variables in this equation are:<\/p>\n

\"
\n\"
\n\"
\n\"<\/p>\n

The “expected return” is the return that the investors expect to earn on average given the current price of the security.\u00a0 Of course, the expected return is what should happen on average over the very long term, but in any given period the realized return may be very different than the expected return.<\/p>\n

All else equal, the expected return is related to price.\u00a0 If the price rises, and our expectations of the future cash flows from the security are unchanged, then our expected return falls since we are paying more for the same future future cash flows.\u00a0 Similarly, if the price falls, and our expectations for future cash flows are unchanged, then the expected return will rise.<\/p>\n

Question:\u00a0 What the heck is Beta?<\/em><\/strong><\/p>\n

Answer: <\/strong>Beta is a statistical measure which captures the relationship between the returns of a security and the returns of the overall market.\u00a0 Beta is calculated as the covariance between the security\u2019s excess returns and the excess returns of the market portfolio divided by the market portfolio variance.<\/p>\n

\"<\/p>\n

Confused?\u00a0 This can be more simply illustrated in the graph below.\u00a0 I\u2019ve created a scatter plot showing the last 5-years of monthly excess returns on AT&T\u00a0 stock and the monthly excess market returns.<\/p>\n

\"\"<\/a><\/p>\n

The red line is the best fit line showing the relationship between the market’s excess returns and AT&T’s excess returns. The slope of this line is the beta of AT&T. In this case, the beta is equal to 0.608, which means that when the market rises or falls by 1% the stock of AT&T tends to rise or fall by about 0.608%.<\/p>\n

Obviously, the regression\u00a0relationship between the AT&T return and the market return \u00a0is far from perfect.\u00a0\u00a0Many of the scatter plot points showing\u00a0the actual returns for AT&T and the market portfolio\u00a0fall far from the best fit line.\u00a0 However, according to the CAPM these “errors” should average out in a diversified portfolio.<\/p>\n

As an example, lets look at the Vanguard Balanced Index Fund.\u00a0 This fund contains a diverse portfolio of both stocks and bonds, and the beta of the fund is very similar to the beta of AT&T stock.<\/p>\n

\"\"<\/a><\/p>\n

Notice that all the scatter plot points in the second graph fall very close to the regression line.\u00a0 We don’t see the large errors that were seen in first graph.\u00a0 The “diversifiable” risk has been eliminated and we are left only with a “non-diversifiable”\u00a0exposure to overall market risk which is defined by the average beta of the securities in the portfolio.<\/p>\n

Question:\u00a0 Why should we expect\u00a0average\u00a0returns to be proportional to beta?<\/strong><\/em><\/p>\n

Answer:<\/strong> Start by assuming that we lived in a world where\u00a0the average return of a stock was not <\/em>proportional to its beta.\u00a0 In this case, a smart investment strategy might involve buying a diversified portfolio of low beta stocks.\u00a0 As with VBINX, the diversifiable risk would be eliminated by combining many stocks, and we would end up with a portfolio which had low sensitivity to the ups and downs of the overall market (i.e. low beta), but had a similar average return to the market.<\/p>\n

Does this scenario\u00a0seem too good to be true?\u00a0 If it were possible to construct a low-beta portfolio with average\u00a0returns equal to the market return, then this would be very desirable portfolio for any risk averse\u00a0investor.\u00a0 Investors would buy this low risk portfolio (driving up the price of low beta stocks) and they would avoid the high beta stocks which could increase the market risk of the portfolio\u00a0(driving down the price of high beta stocks).<\/p>\n

This arbitrage process would drive down the returns of low beta stocks and drive up\u00a0the returns of high beta stocks until an equilibrium was reached.\u00a0 In fact, the CAPM makes the argument that constant trading and instant incorporation of new information keeps\u00a0markets in exactly this type of an\u00a0equilibrium, and it follows that low-beta stocks should, on average, earn lower returns than high-beta stocks.<\/p>\n

Question:\u00a0 Ok, so what is alpha?<\/em><\/strong><\/p>\n

Answer:<\/strong> In the CAPM, alpha is a risk-adjusted measure of return.\u00a0 It\u00a0measures the extent to which a security’s return exceeds or falls short of the return predicted by the CAPM.\u00a0 A positive alpha indicates that, after adjusting for exposure to market risk, a security has outperformed the market portfolio.<\/p>\n

Alpha can be measured using the following regression:<\/p>\n

\"<\/p>\n

The R-script I have included below, can be used to run this regression on a stock or fund.<\/p>\n

If the CAPM is a good model, we would expect that broadly diversifed portfolios should have alphas that are close to zero.\u00a0 If we are able to sort stocks into portfolios which consistently generate a significantly positive or negative alpha then this would indicate a problem with the model.<\/p>\n

Question: So, does the CAPM actually work?<\/em><\/strong><\/p>\n

Answer:<\/strong> The CAPM aims to describe the average relationship between risk and return.\u00a0 It does not disprove the CAPM if individual stocks have returns which are well above or below what is predicted by their betas since there is a lot of diversifiable risk in any individual security.<\/p>\n

However, if we can find broadly diversified portfolios which consistently generate returns above or below what is predicted by the CAPM, then we have grounds to question the model.<\/p>\n

In practice, several “anomalies” to the CAPM such as the “size” and “value” effect are well documented, and more sophisticated models such as the Fama-French Three Factor model have been developed to account for these anomalies.<\/p>\n

Conclusion: <\/em><\/strong><\/p>\n

The CAPM is a useful and important model.\u00a0 It gives us a formal relationship between risk and return, and it\u00a0creates a distinction\u00a0between diversifiable and non-diversifiable risk.\u00a0 These concepts are crucial to a solid understanding of modern finance.<\/p>\n

Nevertheless, the CAPM is far from perfect.\u00a0 Research has shown that market risk is not the only risk that investors care about, and more sophisticated asset pricing models have been developed.\u00a0 However, all of these models build on the important concepts developed in the CAPM.<\/p>\n

Additional Info:<\/strong><\/p>\n

Data:<\/strong> The data for AT&T returns and VBINX returns was taken from Yahoo! Finance, and the market return and risk-free rate was taken from the Kenneth French website.<\/p>\n

Code:<\/strong> The R-code used to generate the plots is shown below.<\/p>\n

\r\n# Goal: Estimate CAPM alpha and beta for individual stocks and create regression plot\r\n# using monthly returns\r\n\r\nlibrary(tseries)\r\n\r\n# Load FF factor returns\r\nstartyear <- 2006\r\nstartmonth <- 1\r\nendyear <- 2010\r\nendmonth <- 12\r\n\r\nstart <- (startyear-1926.5)*12+startmonth\r\nstop <- (endyear - 1926.5)*12+endmonth\r\n\r\nff_returns <- read.table("F-F_Factors_monthly.txt")\r\nrmrf <- ff_returns[start:stop,2]\/100\r\nrf <- ff_returns[start:stop,5]\/100\r\n\r\n# Load security data from Yahoo! Finance\r\nprices1 <- get.hist.quote("VBINX", quote="Adj", start="2005-12-25", retclass="zoo")\r\n\r\nprices1 <- na.locf(prices1)               # Copy last traded price when NA\r\n\r\n# To make monthly returns, you must have this incantation:\r\nmonthly.prices <- aggregate(prices1, as.yearmon, tail, 1)\r\n\r\n# Convert selected monthly prices into monthly returns to run regression\r\nr <- diff(log(monthly.prices))  # convert prices to log returns\r\nr1 <- exp(r)-1                  # back to simple returns\r\n\r\n# Now shift out of zoo into ordinary matrix\r\nrj <- coredata(r1)\r\nrj <- rj[1:60]  # cutoff data at 60 months, I'm using data from Jan 2006-Dec 2010\r\nrjrf <- rj - rf\r\n\r\nd <- lm(rjrf ~ rmrf)               # CAPM model estimation.\r\nprint(summary(d))                  # Print regression results\r\n\r\n# Scale up returns so they can be plotted as percents\r\nrM <- 100 * rmrf\r\nrj <- 100*rjrf\r\n\r\n# Make a plot\r\ndev.new(width=9,height=6.5)\r\nbig <- max(abs(c(rj, rM)))\r\nrange <- c(-big, big)\r\nplot(rM, rj, xlim=range, ylim=range,xlab="", ylab="",col="blue",lwd=2,cex.axis=1.5)\r\ntitle("VBINX vs. Total Stock Market",xlab="Monthly Market Excess Return (%)",ylab="Monthly Security Excess Return (%)",cex.main="2.25",cex.lab="1.75")\r\ngrid()\r\nabline(h=0, v=0)\r\n# Add regression line\r\nabline(coefficients(d),lwd=3,col="red")\r\n\r\n# Include Alpha and Beta estimate in plot\r\na <- round(d$coef[1]*100,3)\r\nb <- round(d$coef[2],3)\r\nalpha <- paste("Alpha=",a,"%")\r\nbeta <- paste("Beta=",b)\r\ntext(-15,14,alpha,adj=c(0,0),cex=1.5)\r\ntext(-15,12,beta,adj=c(0,0),cex=1.5)\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

Let\u2019s\u00a0begin with some Q&A: Question: Why do some financial assets tend to earn higher returns than others? Answer: Financial theory tells us that, on average, higher returns are earned by financial assets that have higher risk. Question: Ok, so how do we measure risk? Answer: One model used for measuring risk is the Capital Asset […]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.calculatinginvestor.com\/wp-json\/wp\/v2\/posts\/2067"}],"collection":[{"href":"https:\/\/www.calculatinginvestor.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.calculatinginvestor.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.calculatinginvestor.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.calculatinginvestor.com\/wp-json\/wp\/v2\/comments?post=2067"}],"version-history":[{"count":184,"href":"https:\/\/www.calculatinginvestor.com\/wp-json\/wp\/v2\/posts\/2067\/revisions"}],"predecessor-version":[{"id":2500,"href":"https:\/\/www.calculatinginvestor.com\/wp-json\/wp\/v2\/posts\/2067\/revisions\/2500"}],"wp:attachment":[{"href":"https:\/\/www.calculatinginvestor.com\/wp-json\/wp\/v2\/media?parent=2067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.calculatinginvestor.com\/wp-json\/wp\/v2\/categories?post=2067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.calculatinginvestor.com\/wp-json\/wp\/v2\/tags?post=2067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}