-
Option Payoffs 4
-
Lecture1.1
-
Lecture1.2
-
Lecture1.3
-
Lecture1.4
-
-
Binomial Model 8
-
Lecture2.1
-
Lecture2.2
-
Lecture2.3
-
Lecture2.4
-
Lecture2.5
-
Lecture2.6
-
Lecture2.7
-
Lecture2.8
-
-
Black-Scholes 6
-
Lecture3.1
-
Lecture3.2
-
Lecture3.3
-
Lecture3.4
-
Lecture3.5
-
Lecture3.6
-
-
Monte Carlo Simulations 3
-
Lecture4.1
-
Lecture4.2
-
Lecture4.3
-
Black-Scholes Put Options
The formula for black-scholes with put options is very similar to call options.
$$N(-d_{2})Ke^{-rt}-N(d_{1})S$$
$$d_{1} = \frac{1}{\sigma\sqrt{t}}[ln(\frac{S}{K})+(r+\frac{\sigma^2}{2})t]$$
$$d_{2} = d_{1}-\sigma\sqrt{t}$$
$$\text{N() = Cummulative Distribution of the standard Normal Distribution}$$
$$\text{S = Current Stock Price}$$
$$\text{K = Call Strike Price}$$
$$\text{r = Risk-free Rate}$$
$$\text{\sigma = Volatility}$$
$$\text{t = Time to Expiration}$$
$$d_{1} = \frac{1}{\sigma\sqrt{t}}[ln(\frac{S}{K})+(r+\frac{\sigma^2}{2})t]$$
$$d_{2} = d_{1}-\sigma\sqrt{t}$$
$$\text{N() = Cummulative Distribution of the standard Normal Distribution}$$
$$\text{S = Current Stock Price}$$
$$\text{K = Call Strike Price}$$
$$\text{r = Risk-free Rate}$$
$$\text{\sigma = Volatility}$$
$$\text{t = Time to Expiration}$$
We can implement it into code like before.
#The black-scholes formula for put options
def black_scholes_put(S, X, sigma, rf, t):
d1 = 1/(sigma*t**.5) * (np.log(S/X) + (rf + sigma **2 /2) * t)
d2 = d1 - sigma * t**.5
return norm.cdf(-d2) * X * np.exp(-rf*t) - norm.cdf(-d1) * S
print(black_scholes_put(50, 55, .08, .03, 1))
Verification of put-call parity can be confirmed.
#We can verify put-call parity
#Call and present value of X
print(black_scholes_call(50, 55, .08, .03, 1) + 55 * np.exp(-.03*1))
#Put and current price of stock
print(black_scholes_put(50, 55, .08, .03, 1) + 50)
Comparison of intrinsic and put value shows how at a certain point the intrinsic value is better than the option value.
#Compute values for the intrinsic value and the black-scholes value
df = pd.DataFrame(list(range(101)), columns = ['Stock Price'])
df['$55 Put Intrinsic Value'] = df['Stock Price'].apply(lambda x: max(55-x, 0))
df['$55 Put Black-Scholes Value'] = df['Stock Price'].apply(lambda x: black_scholes_put(x, 55, .08, .03, 1))
df = df.set_index('Stock Price')
#Plot the value of the option
ax = df.plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel("Stock Price")
plt.ylabel("Value")
plt.title("Black Scholes vs. Intrinsic")
plt.show()
ax = df.plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlim([40,70])
plt.xlabel("Stock Price")
plt.ylabel("Value")
plt.title("Black Scholes vs. Intrinsic")
plt.show()
Test with different volatilities.
#Test the values with different volatilities
df = pd.DataFrame(list(range(101)), columns = ['Stock Price'])
df['$55 Put Intrinstic Value'] = df['Stock Price'].apply(lambda x: max(55-x, 0))
for vol in [.08, .14, .20, .26, .32]:
df[str(int(vol*100))+"% Vol"] = df['Stock Price'].apply(lambda x: black_scholes_put(x, 55, vol, .03, 1))
df = df.set_index('Stock Price')
ax = df.plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel("Stock Price")
plt.ylabel("Value")
plt.title("Black-Scholes vs. Volatility")
plt.show()
ax = df.plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlim([40,70])
plt.xlabel("Stock Price")
plt.ylabel("Value")
plt.title("Black-Scholes vs. Volatility")
plt.show()
With higher volatility the option value is greater for puts like calls. Now for the risk-free rate.
#Test the values with different risk-free rates
df = pd.DataFrame(list(range(101)), columns = ['Stock Price'])
df['$55 Put Intrinstic Value'] = df['Stock Price'].apply(lambda x: max(55-x, 0))
for rf in [.03, .06, .09, .12]:
df[str(int(rf*100))+"% rf"] = df['Stock Price'].apply(lambda x: black_scholes_put(x, 55, .08, rf, 1))
df = df.set_index('Stock Price')
ax = df.plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel("Stock Price")
plt.ylabel("Value")
plt.title("Black-Scholes vs. Risk-free Rate")
plt.show()
ax = df.plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlim([40,70])
plt.xlabel("Stock Price")
plt.ylabel("Value")
plt.title("Black-Scholes vs. Risk-free Rate")
plt.show()
The risk-free rate makes the option less valuable. What about the effect of time to maturity?
#Test the values with different time to maturities
df = pd.DataFrame(list(range(101)), columns = ['Stock Price'])
df['$55 Put Intrinstic Value'] = df['Stock Price'].apply(lambda x: max(55-x, 0))
for t in [.25, 1, 2]:
df["t="+str(t)] = df['Stock Price'].apply(lambda x: black_scholes_put(x, 55, .08, .03, t))
df = df.set_index('Stock Price')
ax = df.plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel("Stock Price")
plt.ylabel("Value")
plt.title("Black-Scholes vs. Time to Maturity")
plt.show()
ax = df.plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlim([40,70])
plt.xlabel("Stock Price")
plt.ylabel("Value")
plt.title("Black-Scholes vs. Time to Maturity")
plt.show()
Prev
Delta Hedging Calls