Iron Butterfly Options Strategy In Python

6 min read

Iron Butterfly Options Strategy In Python

By Viraj Bhagat

There are various ways to make money, and options facilitate traders by providing them with the number of unique ways which can’t be duplicated. Likewise, out of the various options out there, not all are highly risky and can help limit critical losses, like the Iron Butterfly Options Strategy which limits the amounts that a Trader can win or lose.

The Iron Butterfly Options Trading Strategy is an Options Trading Strategy. It is a part of the Butterfly Spread Options. Likewise, this strategy is also a combination of a Bull Spread and a Bear Spread.

Since it is a limited risk and a limited profit trading strategy which includes the use of four different options; it is suitable for professional traders. It is like running a short put spread and a short call spread simultaneously where the spreads converge at the peak. And since it is a combination of Short Spreads, it can be established for a Net Credit.


Mostly practised when the underlying asset has low volatility, it increases the probability of earning a smaller limited profit even if there is slight movement in the price at a particular time. One has to often pay up to close the position because the possibility of all the options expiring worthless in this spread is low.

It is possible to put a directional bias on this trade. If Strike B is higher than the stock price, this would be considered a bullish trade. If strike B is below the stock price, it would be a bearish trade.

Construction:

  • Buy 1 lower OTM Put A (Bull)
  • Sell 1 middle ATM Put B (Bull)
  • Sell 1 middle ATM Call B (Bear)
  • Buy 1 higher OTM Call C (Bear)
  • Strike prices are equidistant
  • All the options have the same expiration month
  • This results in a net credit to put on the trade

The strategy would ideally look something like this:

Iron-Butterfly GIF

Payoff

Max. Profit: Potential profit is equal to the net credit received and thus is limited. When the price of the underlying option at expiration is equal to the strike price at which the call and put options are sold, all the options expire worthlessly. As a result, the options trader keeps the entire net credit received when entering the trade as profit.

Max. Loss: Max Loss here is the difference between the Strike Price of the Long Call and of Short Call excluding the Net Premium Received. The risk happens at the peak and limited to it. There occurs a limited Loss that happens when the price:

  • falls at/below the lower strike of the purchased put or
  • rises/equals the higher strike of the call purchased

Breakeven Points

Upper Breakeven Point = Strike Price of Short Call + Net Premium Received Lower Breakeven Point = Strike Price of Short Put - Net Premium Received

Implementing The Strategy

I will use HDFC (Ticker – NSE: HDFC) option for this example. Suppose, HDFC is trading at INR 1860 on Mar. 1, 2018, and the options expire on March 28, 2018.

  • Spot Price: 1860
  • Long Call Strike Price: 1880 (Premium: 16.15) - Buy
  • Short Call Strike Price: 1860 (Premium: 23.8) - Sell
  • Long Put Strike Price: 1840 (Premium: 17.00) - Sell
  • Short Put Strike Price: 1860 (Premium: 25.50) - Buy

The Python code for this strategy would be as mentioned below:

Importing The Library

import numpy as np
import matplotlib.pyplot as plt
import seaborn
from tabulate import tabulate
seaborn.set(style='darkgrid')

Call Payoff

def call_payoff(sT, strike_price, premium):
    return np.where(sT > strike_price, sT - strike_price, 0)-premium
# HDFC Spot Price
s0 = 1860
# Long Call
strike_price_long_call = 1880
premium_long_call = 16.15
# Short Call
strike_price_short_call = 1860
premium_short_call = 23.8
# Range of call option at expiry
sT = np.arange(1800,1920,10)
Long Call Payoff
long_call_payoff = call_payoff(sT, strike_price_long_call, premium_long_call )

fig, ax = plt.subplots()
ax.spines['bottom'].set_position('zero')
ax.plot(sT, long_call_payoff, color='g')
ax.set_title('LONG 1880 Strike Call')
plt.xlabel('Stock Price (sT)')
plt.ylabel('Profit & Loss')

plt.show()
Long Strike Call
Short Call Payoff
short_call_payoff = call_payoff(sT, strike_price_short_call, premium_short_call )*-1.0

fig, ax = plt.subplots()
ax.spines['bottom'].set_position('zero')
ax.plot(sT, short_call_payoff, color='r')
ax.set_title('Short 1860 Strike Call')
plt.xlabel('Stock Price (sT)')
plt.ylabel('Profit & Loss')

plt.show()

Short Strike Call

Put Payoff

def put_payoff(sT, strike_price, premium):
    return np.where(sT < strike_price, strike_price - sT, 0) - premium
# HDFC Spot Price
s0 = 1860
# Long Put
strike_price_long_put =1840
premium_long_put = 17
# Short Put
strike_price_short_put = 1860
premium_short_put = 25.5
# Range of put option at expiry
sT = np.arange(1800,1920,10)
Long Put Payoff
long_put_payoff = put_payoff(sT, strike_price_long_put, premium_long_put)

fig, ax = plt.subplots()
ax.spines['bottom'].set_position('zero')
ax.plot(sT, long_put_payoff, color ='g')
ax.set_title('Long 1840 Strike Put')
plt.xlabel('Stock Price (sT)')
plt.ylabel('Profit & Loss')
plt.show()
Long Put
Short Put Payoff
short_put_payoff = put_payoff(sT, strike_price_short_put, premium_short_put)*-1.0

fig, ax = plt.subplots()
ax.spines['bottom'].set_position('zero')
ax.plot(sT, short_put_payoff, color ='r')
ax.set_title('Short 1860 Strike Put')
plt.xlabel('Stock Price (sT)')
plt.ylabel('Profit & Loss')
plt.show()

Short Put

Iron Butterfly Payoff

Iron_Butterfly_payoff = long_call_payoff + short_call_payoff + long_put_payoff + short_put_payoff 

fig, ax = plt.subplots()
ax.spines['bottom'].set_position('zero')
ax.plot(sT, Iron_Butterfly_payoff, color ='b')
ax.set_title('Iron Butterfly Spread')
plt.xlabel('Stock Price (sT)')
plt.ylabel('Profit & Loss')
plt.show()

Iron Butterfly Spread

profit = max (Iron_Butterfly_payoff)
loss = min (Iron_Butterfly_payoff)
print ("Max Profit %.2f" %profit)
print ("Min Loss %.2f" %loss)

Max Profit 16.15
Min Loss -3.85
fig, ax = plt.subplots(figsize=(10,5))
ax.spines['bottom'].set_position('zero')
ax.plot(sT, Iron_Butterfly_payoff, color ='b', label ='Iron Butterfly Spread')
ax.plot(sT, long_call_payoff,'--', color ='g', label = 'Long Call')
ax.plot(sT, short_put_payoff,'--', color ='r', label = 'Short Call')
ax.plot(sT, long_put_payoff,'--', color ='g',label = 'Long Put')
ax.plot(sT, short_put_payoff,'--', color ='r',label = 'Short Put')
plt.legend()
plt.xlabel('Stock Price (sT)')
plt.ylabel('Profit & Loss')
plt.show()

The final payoff graph would look something like this:

Iron Butterfly Payoff

The closing happens somewhere between the middle strike price and either the upper or lower limit for four separate positions and leads to maximum profit. Since most iron butterflies are created using fairly narrow spreads, the chances of incurring a loss are proportionately higher. Iron butterflies are designed to provide investors with a steady income while limiting their risk. And are generally only appropriate for experienced option traders.

All traders should be careful to communicate and describe the opening and closing of this strategy as “open for a net debit” or “close for a net credit”.

The Iron Butterfly is narrower and receives more premium selling at-the-money options, and since the return is higher at-the-money at risk it has a better risk-to-reward as compared to the Iron Condor. Thus, the Iron Butterfly can be put on in a wider range of markets, both lower volatility and higher volatility.

Some Related Terms

Long Call Butterfly: In this strategy, all Call options have the same expiration date, and the distance between each strike price of the constituent legs is the same.

The Reverse Iron Butterfly: The opposite strategy of the Iron Butterfly generally used when the IV is expected to increase.

Wingspreads: A family of spreads whose members are named after flying creatures.

You can enroll for this free online python course on Quantra and understand basic terminologies and concepts that will help your trade-in options.

Next Step

In our next post we are trading option position on USD/INR currency pair using the excel model. The strike price here is in terms of rupee against the dollar. We are holding different option positions (call and put options) on this underlying (USD/INR pair). Click here to read now.

Disclaimer: All investments and trading in the stock market involve risk. Any decisions to place trades in the financial markets, including trading in stock or options or other financial instruments is a personal decision that should only be made after thorough research, including a personal risk and financial assessment and the engagement of professional assistance to the extent you believe necessary. The trading strategies or related information mentioned in this article is for informational purposes only.


Download Data File

  • Iron Butterfly Options Trading Strategy – Python Code

    
 Advanced Momentum Trading: Machine Learning Strategies Course