-
Return and Variance 7
-
Lecture1.1
-
Lecture1.2
-
Lecture1.3
-
Lecture1.4
-
Lecture1.5
-
Lecture1.6
-
Lecture1.7
-
-
Solving Equations 5
-
Lecture2.1
-
Lecture2.2
-
Lecture2.3
-
Lecture2.4
-
Lecture2.5
-
-
Capital Allocation Line 6
-
Lecture3.1
-
Lecture3.2
-
Lecture3.3
-
Lecture3.4
-
Lecture3.5
-
Lecture3.6
-
-
Diversification 3
-
Lecture4.1
-
Lecture4.2
-
Lecture4.3
-
-
Investment Sets 3
-
Lecture5.1
-
Lecture5.2
-
Lecture5.3
-
-
Portfolios 7
-
Lecture6.1
-
Lecture6.2
-
Lecture6.3
-
Lecture6.4
-
Lecture6.5
-
Lecture6.6
-
Lecture6.7
-
-
Capital and Security Market Lines 3
-
Lecture7.1
-
Lecture7.2
-
Lecture7.3
-
-
Arbitrage 3
-
Lecture8.1
-
Lecture8.2
-
Lecture8.3
-
-
Dividend Discount Model 2
-
Lecture9.1
-
Lecture9.2
-
-
Fixed Income 4
-
Lecture10.1
-
Lecture10.2
-
Lecture10.3
-
Lecture10.4
-
-
Duration and Immunization 4
-
Lecture11.1
-
Lecture11.2
-
Lecture11.3
-
Lecture11.4
-
Capital Market Line
We saw the capital market line in the last lesson. It is the combination of a risk-free asset and the most effecient portfolio. It allows us to get either a specific level of risk or a specific return at the most effecient level.
This equation is linear, the intercept is the risk-free rate where we have 0% in the portfolio, and then the line is the premium of the portfolio over the risk-free rate for every 100% of exposure to the portfolio. In the model we can borrow at the risk-free rate, but in reality the CML will be a piecewise graph because when a consumer borrows they will always pay more than the risk-free rate (since an investor is by no means risk-free, they could default especially if they do not get the expected return).
import matplotlib.pyplot as plt
def CML(rf,rm,marketSD,label):
portfolioSD = [(marketSD*x)/25 for x in range(51)]
portfolioReturns = [rf+((rm-rf)/marketSD)*x for x in portfolioSD]
plt.plot(portfolioSD,portfolioReturns,label=label)
plt.xlabel("Porfolio Standard Deviation")
plt.ylabel("Portfolio Return")
plt.title("Capital Market Line")
plt.plot(marketSD,rm,"ro")
The first line sets up levels of standard deviation from 0 to 200% exposure. The second line gives us the return at each sd, and the label gives us a label for our line when we plot the legend (outside of the function). We also plot the point of 100% exposure.
CML(.02,.08,.35,"Line 1")
plt.legend()
plt.show()
What if both the portfolio and the risk-free get pushed up by 2%?
CML(.02,.08,.35,"Line 1")
CML(.04,.10,.35,"Line 2")
plt.legend()
plt.show()
We get a full shift upwards. What if only the risk-free went up?
CML(.02,.08,.35,"Line 1")
CML(.04,.08,.35,"Line 2")
plt.legend()
plt.show()
The intercept shifts up, but the slope decreases because of the opportunity cost. Below the 100% level of exposure we get more return since we get the benefit of more risk-free return but after that mark we get a lower return since we now have to pay more to borrow.