Alpha
Alpha¶
Alpha is the term for deviations from CAPM. In reality CAPM is not at all a perfect measure, but for now we will make the assumption that it is a perfect measure. Now what if we have our usual set up, 8% market return, 2% risk-free rate but now a stock with a beta of 1 has an expected return of 10%? First of all, what does it look like on the graph?
#Inputs
Rf = .02
Rm = .08
#Find the market risk premium
mrp = Rm-Rf
#Get the range of betas
betas = np.arange(-2, 2.1,.1)
#Find expected returns
expected_returns = Rf + mrp * betas
#Plot the CAPM equation
plt.plot(betas, expected_returns)
plt.xlabel("Beta")
plt.ylabel("Expected Return")
plt.title("Capital Asset Pricing Model")
plt.plot(1,.1,"ko",label="Stock Return")
plt.show()
As you can see, he dot is actually off of the line. If we subtracted its return versus its expected return we would get the alpha.
alpha = .1 - (Rf + mrp * 1)
print(alpha)
So in this specific case we see that the alpha is 2%. We can also ammend our graph to show how the alpha in terms of a line between expected by CAPM return and stock expected return. Alpha is equal to this vertical distance.
#Inputs
Rf = .02
Rm = .08
#Find the market risk premium
mrp = Rm-Rf
#Get the range of betas
betas = np.arange(-2, 2.1,.1)
#Find expected returns
expected_returns = Rf + mrp * betas
#Plot the CAPM equation
plt.plot(betas, expected_returns)
plt.xlabel("Beta")
plt.ylabel("Expected Return")
plt.title("Capital Asset Pricing Model")
plt.plot(1,.1,"ko",label="Stock Return")
plt.plot([1,1],[.08,.1],linestyle="--",color="grey",label="Alpha")
plt.show()
One way to use the alpha is to profit from it in a 0 beta scenario. What I mean by this is that if we have the alpha in a beta 1 stock, we can hedge the beta by going short another stock to let us capture just the alpha.
#Inputs
stock_return = .10
market_return = .08
risk_free = .02
mrp = market_return - risk_free
beta_stock = 1
beta_market = 1
weight_stock = 1
weight_market = -1
#We can get portfolio beta by mixing
beta_portfolio = weight_stock * beta_stock - weight_market * weight_market
#We can also find the return
return_portfolio = stock_return * beta_stock + market_return * weight_market + risk_free
print("Portfolio beta: {}".format(beta_portfolio))
print("Portfolio return: {}".format(return_portfolio))
Below you can see how this alpha can be transferred to a 0 beta investment by hedging the market risk.
betas = np.arange(-2, 2.1,.1)
expected_returns = Rf + mrp * betas
plt.plot(betas, expected_returns, label="CAPM")
plt.xlabel("Beta")
plt.ylabel("Expected Return")
plt.title("Capital Asset Pricing Model")
plt.plot(1, stock_return, "o",label="Long Stock")
plt.plot(-1,Rf-mrp,"o",label="Short Market, Long risk-free")
plt.plot(beta_portfolio, return_portfolio, "o", label="Portfolio")
plt.plot([1,1],[.08,.1],linestyle="--",color="grey",label="Alpha")
plt.plot([0,0],[.02,.04],linestyle="--",color="grey")
plt.legend()
plt.show()