-
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
-
Option Greeks Call Options
In the black-scholes model there are option greeks which represent different sensitivities.
Delta
Delta represents the change in the call option value for a change in the stock price. For a call option, at a minimum, we could have 0 meaning that the option value does not change even if the stock price changes. At the high end, it could be 1, which means that for every dollar increase in the stock price the call option value goes up by one as well. A value such as .5 would mean that for every $1 increase in the stock there would be a $.5 increase in the call option value. Delta is not static, however, it changes based on multiple conditions. Below is the equation which determines the delta of a call option.
Representing this with code, we have the following.
#Delta is the change in the option value for a change in the underlying stock
def black_scholes_delta(S, X, sigma, rf, t):
d1 = 1/(sigma*t**.5) * (np.log(S/X) + (rf + sigma **2 /2) * t)
return norm.cdf(d1)
Graph the delta for volatility of 8% and 20% and you will notice that the delta goes up as the stock price goes up until it levels off. As well, the speed at which the delta increases depends a lot on volatility. The lower the volatility the steeper the curve until it levels off.
df = pd.DataFrame(list(range(101)), columns = ['Stock Price'])
df['Delta 8% Volatility'] = df['Stock Price'].apply(lambda x: black_scholes_delta(x, 55, .08, .03, 1))
df['Delta 20% Volatility'] = df['Stock Price'].apply(lambda x: black_scholes_delta(x, 55, .20, .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("Delta")
plt.title("Black-Scholes Delta")
plt.show()
We can also see the effect of time.
df = pd.DataFrame(list(range(101)), columns = ['Stock Price'])
df['Delta 1 Year'] = df['Stock Price'].apply(lambda x: black_scholes_delta(x, 55, .08, .03, 1))
df['Delta 5 Year'] = df['Stock Price'].apply(lambda x: black_scholes_delta(x, 55, .08, .03, 5))
df = df.set_index('Stock Price')
ax = df.plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel("Stock Price")
plt.ylabel("Delta")
plt.show()
Gamma
Gamma is the greek that represents the change in delta for a change in the underlying stock price. It is essentially the second derivative. In the equation form, we have:
$$N'(d1) = \frac{1}{2\pi}e^{\frac{-d_{1}^2}{2}}$$
Let’s convert it to a function.
def black_scholes_gamma(S, X, sigma, rf, t):
d1 = 1/(sigma*t**.5) * (np.log(S/X) + (rf + sigma **2 /2) * t)
dN = np.exp(-d1**2/2) / (2 * np.pi)
return dN / (S * sigma * t **.5)
Using the matplotlib function twinx() on the axis we can build out a plot which has two y axis scales. This will allow us to plot both gamma and delta together.
df = pd.DataFrame(list(range(101)), columns = ['Stock Price'])
df['Delta'] = df['Stock Price'].apply(lambda x: black_scholes_delta(x, 55, .08, .03, 1))
df['Gamma'] = df['Stock Price'].apply(lambda x: black_scholes_gamma(x, 55, .08, .03, 1))
df = df.set_index('Stock Price')
fig, ax1 = plt.subplots()
#Build a second axis for the delta plotting
ax2 = ax1.twinx()
ax1.plot(df.index, df['Gamma'], 'blue')
ax2.plot(df.index, df['Delta'], 'red')
ax1.set_xlabel('Stock Price')
ax1.set_ylabel('Gamma')
ax2.set_ylabel('Delta')
ax1.legend(['Gamma'])
ax2.legend(['Delta'])
plt.title("Delta vs. Gamma")
plt.show()
There are also other greeks. The main other ones are theta which measures the loss of value of the option as time expires and vega which measures the change in value as volatility increases.
An application of the delta greek is something called delta hedging. This protects against movements in the short term. The first step is to find the portfolio delta. Let’s say we have 1000 call options with a $55 strike price when the stock is $50 (with all the same other parameters we have been using). The value of the call options and the portfolio delta can be computed with the following code….
print(black_scholes_call(50, 55, .08, .03, 1) * 1000)
print(black_scholes_delta(50, 55, .08, .03, 1) * 1000)
The value of the 1000 call options comes out to $482.38. The delta comes out to 218.76 which means for every dollar the stock goes up by the portfolio will go up by $218.76 in value. This isn’t totally true however, because as the price goes up so will the delta. So the value will actually go up by more, but the slope for a very small change would reflect this value.
Let’s consider a shock exactly after you buy the option, what might happen to the call value? The following shows the range of profit and loss in a nominal space as well as percent gain/loss based on anywhere from a $1 loss to $1 profit. These gains or losses can be huge in comparison to what we put down at first.
from matplotlib.ticker import PercentFormatter
df = pd.DataFrame(np.arange(49,51.01,.01), columns = ['Stock Price'])
df['Call Value'] = df['Stock Price'].apply(lambda x: black_scholes_call(x, 55, .08, .03, 1) * 1000 ) - black_scholes_call(50, 55, .08, .03, 1) * 1000
df = df.set_index('Stock Price')
df['Call Value'].plot(kind='line')
plt.ylabel("Call Option Profit")
plt.xlabel("Stock Price")
plt.title("Call Option Profit")
plt.show()
df['Call % Return'] = df['Call Value'] / (black_scholes_call(50, 55, .08, .03, 1) * 1000)
ax = df['Call % Return'].plot(kind='line')
plt.ylabel("Call Option Profit %")
plt.xlabel("Stock Price")
plt.title("Call Option Profit %")
#Set a percent formatter
ax.yaxis.set_major_formatter(PercentFormatter(xmax=1))
plt.show()