-
Present Values 3
-
Lecture1.1
-
Lecture1.2
-
Lecture1.3
-
-
NPV vs. IRR 4
-
Lecture2.1
-
Lecture2.2
-
Lecture2.3
-
Lecture2.4
-
-
Other Profit Measures 4
-
Lecture3.1
-
Lecture3.2
-
Lecture3.3
-
Lecture3.4
-
-
Depreciation 4
-
Lecture4.1
-
Lecture4.2
-
Lecture4.3
-
Lecture4.4
-
-
Cash Flow Challenges 9
-
Lecture5.1
-
Lecture5.2
-
Lecture5.3
-
Lecture5.4
-
Lecture5.5
-
Lecture5.6
-
Lecture5.7
-
Lecture5.8
-
Lecture5.9
-
-
Capital Asset Pricing Model 3
-
Lecture6.1
-
Lecture6.2
-
Lecture6.3
-
-
Risky Debt 3
-
Lecture7.1
-
Lecture7.2
-
Lecture7.3
-
-
Unlevering Equity 3
-
Lecture8.1
-
Lecture8.2
-
Lecture8.3
-
-
Weighted Average Cost of Capital 4
-
Lecture9.1
-
Lecture9.2
-
Lecture9.3
-
Lecture9.4
-
-
Debt Effect Analysis 2
-
Lecture10.1
-
Lecture10.2
-
-
WACC Challenge 2
-
Lecture11.1
-
Lecture11.2
-
-
Relative Valuation 4
-
Lecture12.1
-
Lecture12.2
-
Lecture12.3
-
Lecture12.4
-
-
Forward Contract Valuation 3
-
Lecture13.1
-
Lecture13.2
-
Lecture13.3
-
Graphing CAPM
The equation function:
def CAPM(rf,market,beta):
return rf+(beta*(market-rf))
The graphing:
import matplotlib.pyplot as plt
betas = []
returns = []
beta = 0
rf = .02
market = .08
for x in range(31):
betas+=[beta]
r = CAPM(rf,market,beta)
returns +=[r]
beta+=.1
plt.plot(betas,returns,"blue")
betas = []
returns = []
beta = 0
rf = .04
market = .08
for x in range(31):
betas+=[beta]
r = CAPM(rf,market,beta)
returns +=[r]
beta+=.1
plt.plot(betas,returns,"red")
betas = []
returns = []
beta = 0
rf = .02
market = .12
for x in range(31):
betas+=[beta]
r = CAPM(rf,market,beta)
returns +=[r]
beta+=.1
plt.plot(betas,returns,"black")
plt.xlabel("Beta")
plt.ylabel("Return")
plt.title("Capital Asset Pricing Model")
plt.legend(["Baseline","Higher Risk Free","Higher Risk Premium"])
plt.show()
Source Code
For the graphing, I chose to show three different cases. The first is a base case, as you can see it is a linear function with regards to beta. The second equation is the case where the risk free rate is 2% higher, as you can see it shifts the line upwards everything by 2%. The third equation is one with higher market return, it shifts the slope of the equation up.
This line is called the security market line.
Prev
The Equation
Next
Introduction