book
Checkout our new book! Hands on AI Trading with Python, QuantConnect, and AWS Learn More arrow

Option Strategies

Long Strangle

Introduction

Long Strangle is an Options trading strategy that consists of simultaneously buying an OTM put and an OTM call, where both contracts have the same underlying asset and expiration date. This strategy aims to profit from volatile movements in the underlying stock, either positive or negative.

Compared to a long straddle, the net debit of a long strangle is lower since OTM Options are cheaper. Additionally, the losing range of a long straddle is wider and the strike spread is wider.

Implementation

Follow these steps to implement the long strangle strategy:

  1. In the initialize method, set the start date, end date, cash, and Option universe.
  2. Select Language:
    def initialize(self) -> None:
        self.set_start_date(2017, 4, 1)
        self.set_end_date(2017, 4, 30)
        self.set_cash(100000)
    
        self.universe_settings.asynchronous = True
        option = self.add_option("GOOG")
        self._symbol = option.symbol
        option.set_filter(lambda universe: universe.include_weeklys().strangle(30, 5, -10))

    The strangle filter narrows the universe down to just the two contracts you need to form a long strangle.

  3. In the on_data method, select the contracts of the strategy legs.
  4. Select Language:
    def on_data(self, slice: Slice) -> None:
        if self.portfolio.invested:
            return
    
        chain = slice.option_chain.get(self._symbol)
        if not chain:
            return
    
        # Find options with the farthest expiry
        expiry = max([x.expiry for x in chain])
        contracts = [contract for contract in chain if contract.expiry == expiry]
         
        # Order the OTM calls by strike to find the nearest to ATM
        call_contracts = sorted([contract for contract in contracts
            if contract.right == OptionRight.CALL and
                contract.strike > chain.underlying.price],
            key=lambda x: x.Strike)
        if not call_contracts:
            return
            
        # Order the OTM puts by strike to find the nearest to ATM
        put_contracts = sorted([contract for contract in contracts
            if contract.right == OptionRight.PUT and
               contract.strike < chain.underlying.price],
            key=lambda x: x.Strike, reverse=True)
        if not put_contracts:
            return
    
        call = call_contracts[0]
        put = put_contracts[0]
  5. In the on_data method, place the orders.
  6. Approach A: Call the OptionStrategies.strangle method with the details of each leg and then pass the result to the buy method.

    Select Language:
    long_strangle = OptionStrategies.strangle(self._symbol, call.strike, put.strike, expiry)
    self.buy(long_strangle, 1)

    Approach B: Create a list of Leg objects and then call the combo_market_order, combo_limit_order, or combo_leg_limit_order method.

    Select Language:
    legs = [
        Leg.create(call.symbol, 1),
        Leg.create(put.symbol, 1)
    ]
    self.combo_market_order(legs, 1)

Strategy Payoff

The payoff of the strategy is

COTMT=(STKC)+POTMT=(KPST)+PT=(COTMT+POTMTCOTM0POTM0)×mfee
whereCOTMT=OTM call value at time TPOTMT=OTM put value at time TST=Underlying asset price at time TKC=OTM call strike priceKP=OTM put strike pricePT=Payout total at time TCOTM0=OTM call value at position opening (debit paid)POTM0=OTM put value at position opening (debit paid)m=Contract multiplierT=Time of expiration

The following chart shows the payoff at expiration:

long strangle strategy payoff

The maximum profit is unlimited if the underlying price rises to infinity at expiration.

The maximum loss is the net debit paid, COTM0+POTM0. It occurs when the underlying price at expiration is the same as when you opened the trade. In this case, both Options expire worthless.

Example

The following table shows the price details of the assets in the algorithm at Option expiration (04/22/2017):

AssetPrice ($)Strike ($)
Call8.80835.00
Put9.50832.50
Underlying Equity at expiration843.19-

Therefore, the payoff is

COTMT=(STKC)+=(843.19835.00)+=8.19POTMT=(KPST)+=(832.50843.19)+=0PT=(COTMT+POTMTCOTM0POTM0)×mfee=(8.19+08.809.50)×1002.00×2=1013

So, the strategy loses $1,013.

The following algorithm implements a long strangle Option strategy:

Select Language:
class LongStrangleAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2017, 4, 1)
        self.set_end_date(2017, 4, 30)
        self.set_cash(100000)
        
        option = self.add_option("GOOG")
        self.symbol = option.symbol
        option.set_filter(lambda universe: universe.include_weeklys().strangle(30, 5, -10))

    def on_data(self, slice: Slice) -> None:
        if self.portfolio.invested:
            return

        # Get the OptionChain
        chain = slice.option_chains.get(self.symbol)
        if not chain:
            return

        # Find options with the nearest expiry
        expiry = max([x.expiry for x in chain])
        contracts = [contract for contract in chain if contract.expiry == expiry]
     
        # Order the OTM calls by strike to find the nearest to ATM
        call_contracts = sorted([contract for contract in contracts
            if contract.right == OptionRight.CALL and
               contract.strike > chain.underlying.price],
            key=lambda x: x.strike)
        if not call_contracts:
            return
        
        # Order the OTM puts by strike to find the nearest to ATM
        put_contracts = sorted([contract for contract in contracts
            if contract.right == OptionRight.PUT and
               contract.strike < chain.underlying.price],
            key=lambda x: x.strike, reverse=True)
        if not put_contracts:
            return

        call_strike = call_contracts[0].strike
        put_strike = put_contracts[0].strike

        long_strangle = OptionStrategies.strangle(self.symbol, call_strike, put_strike, expiry)
        self.buy(long_strangle, 1)

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: