-
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
-
Combinations
Solution
#Compute option payoffs
payoffs = pd.DataFrame(list(range(0,201)), columns=['Stock'])
payoffs['Long $90 Call'] = payoffs['Stock'].apply(lambda x: max(0, x-90))
payoffs['Short $110 Call'] = payoffs['Stock'].apply(lambda x: -max(0, x-110))
#Graph the call and put payoffs
ax = payoffs[['Long $90 Call', 'Short $110 Call']].plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel('Stock Price')
plt.ylabel('Payoff')
plt.title("Call Payoffs")
plt.show()
#Compute the bear spread
payoffs['Bull Spread'] = payoffs['Long $90 Call'] + payoffs['Short $110 Call']
#Graph the bear spread payoff
ax = payoffs[['Bull Spread']].plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel('Stock Price')
plt.ylabel('Payoff')
plt.title("Bull Spread Payoff")
plt.show()
#Graph the bear spread if you got $10 for the short position, and paid $25 for the long position
ax = (payoffs[['Bull Spread']] - 15).plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel('Stock Price')
plt.ylabel('Profit')
plt.title("Bull Spread Profit")
plt.show()
As you can see the payoff has both limited gains and limited losses in this scenario. As well, with the cost of the option, we see that if the stock is $105 we break even. If it goes higher than that we can make between $0-$5, and if it is lower we can lose between $0-$15.
A bear spread takes the opposite side of this, it bets that a stock will be going down but still limits the losses and gains. We just need to reverse the short and long side.
#Compute option payoffs
payoffs = pd.DataFrame(list(range(0,201)), columns=['Stock'])
payoffs['Short $90 Call'] = payoffs['Stock'].apply(lambda x: -max(0, x-90))
payoffs['Long $110 Call'] = payoffs['Stock'].apply(lambda x: max(0, x-110))
#Graph the call and put payoffs
ax = payoffs[['Short $90 Call', 'Long $110 Call']].plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel('Stock Price')
plt.ylabel('Payoff')
plt.title("Call Payoffs")
plt.show()
#Compute the bear spread
payoffs['Bear Spread'] = payoffs['Short $90 Call'] + payoffs['Long $110 Call']
#Graph the bear spread payoff
ax = payoffs[['Bear Spread']].plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel('Stock Price')
plt.ylabel('Payoff')
plt.title("Bear Spread Payoff")
plt.show()
#Graph the bear spread if you got $25 for the short position, and paid $10 for the long position
ax = (payoffs[['Bear Spread']] + 15).plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel('Stock Price')
plt.ylabel('Profit')
plt.title("Bear Spread Profit")
plt.show()
A bull spread could also be created with put options by doing the same, going long the lower strike price and going short the higher strike price. What you will notice is that the payoff is actually always negative. However, you will notice that we will have a net cash inflow which brings the bull spread to be similar in terms of profit.
#Compute option payoffs
payoffs = pd.DataFrame(list(range(0,201)), columns=['Stock'])
payoffs['Long $90 Put'] = payoffs['Stock'].apply(lambda x: max(0, 90-x))
payoffs['Short $110 Put'] = payoffs['Stock'].apply(lambda x: -max(0, 110-x))
#Graph the call and put payoffs
ax = payoffs[['Long $90 Put', 'Short $110 Put']].plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel('Stock Price')
plt.ylabel('Payoff')
plt.title("Put Payoffs")
plt.show()
#Compute the bear spread
payoffs['Bull Spread'] = payoffs['Long $90 Put'] + payoffs['Short $110 Put']
#Graph the bear spread payoff
ax = payoffs[['Bull Spread']].plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel('Stock Price')
plt.ylabel('Payoff')
plt.title("Bull Spread Payoff")
plt.show()
#In this case it costs more for the short than the long
ax = (payoffs[['Bull Spread']] + 15).plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel('Stock Price')
plt.ylabel('Profit')
plt.title("Bull Spread Profit")
plt.show()
And as well, the same applies for a bear spread with put options that we are going to go short the lower strike price and long the higher strike price. Here the payoff is always 0 or positive, but it costs money to buy this because going long the higher put options costs more which brings the profit downwards from the payoff.
#Compute option payoffs
payoffs = pd.DataFrame(list(range(0,201)), columns=['Stock'])
payoffs['Short $90 Put'] = payoffs['Stock'].apply(lambda x: -max(0, 90-x))
payoffs['Long $110 Put'] = payoffs['Stock'].apply(lambda x: max(0, 110-x))
#Graph the call and put payoffs
ax = payoffs[['Short $90 Put', 'Long $110 Put']].plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel('Stock Price')
plt.ylabel('Payoff')
plt.title("Put Payoffs")
plt.show()
#Compute the bear spread
payoffs['Bear Spread'] = payoffs['Short $90 Put'] + payoffs['Long $110 Put']
#Graph the bear spread payoff
ax = payoffs[['Bear Spread']].plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel('Stock Price')
plt.ylabel('Payoff')
plt.title("Bear Spread Payoff")
plt.show()
#In this case it costs more for the long than the short
ax = (payoffs[['Bear Spread']] - 15).plot(kind='line')
ax.axhline(0, linestyle='--', color='grey')
plt.xlabel('Stock Price')
plt.ylabel('Profit')
plt.title("Bear Spread Profit")
plt.show()