Option Strategies
Short Call Backspread
Introduction
Short Call Backspread, consists of long 1 lower-strike call and short 2 higher strike calls. It is a combination of a bull call spread and a short call with the same strike price as the higher-strike leg the call spread. All calls have the same underlying Equity and expiration date. This strategy profits from stable, consistent price of the underlying asset. For instance, the underlying price stays at its current price.
Implementation
Follow these steps to implement the short call backspread strategy:
- In the
Initializeinitializemethod, set the start date, end date, cash, and Option universe. You can use theCallSpreadcall_spreadhelper method in option universe filtering, since a call backspread consists of the same contracts as a call spread. - In the
OnDataon_datamethod, select the expiration and strikes of the contracts in the strategy legs. - In the
OnDataon_datamethod, select the contracts and place the orders.
private Symbol _symbol;
public override void Initialize()
{
SetStartDate(2024, 9, 1);
SetEndDate(2024, 12, 31);
SetCash(1000000);
UniverseSettings.Asynchronous = true;
var option = AddOption("GOOG", Resolution.Minute);
_symbol = option.Symbol;
option.SetFilter(universe => universe.IncludeWeeklys().CallSpread(20, 5));
} def initialize(self) -> None:
self.set_start_date(2024, 9, 1)
self.set_end_date(2024, 12, 31)
self.set_cash(1000000)
self.universe_settings.asynchronous = True
option = self.add_option("GOOG", Resolution.MINUTE)
self._symbol = option.symbol
option.set_filter(lambda universe: universe.include_weeklys().call_spread(20, 5))
public override void OnData(Slice slice)
{
if (Portfolio.Invested ||
!slice.OptionChains.TryGetValue(_symbol, out var chain))
{
return;
}
// Select the call Option contracts with the furthest expiry
var expiry = chain.Max(x => x.Expiry);
var calls = chain.Where(x => x.Expiry == expiry && x.Right == OptionRight.Call);
if (calls.Count() == 0) return;
// Select the strike prices from the remaining contracts
var strikes = calls.Select(x => x.Strike).Distinct().OrderBy(x => x).ToList();
if (strikes.Count < 2)
{
return;
}
var lowStrike = strikes[0];
var highStrike = strikes[1]; def on_data(self, slice: Slice) -> None:
if self.portfolio.invested:
return
# Get the OptionChain
chain = slice.option_chains.get(self._symbol, None)
if not chain:
return
# Select the call Option contracts with the furthest expiry
expiry = max([x.expiry for x in chain])
calls = [i for i in chain if i.expiry == expiry and i.right == OptionRight.CALL]
if not calls:
return
# Select the strike prices from the remaining contracts
strikes = sorted(set(x.strike for x in calls))
if len(strikes) < 2:
return
low_strike = strikes[0]
high_strike = strikes[1]
Approach A: Call the OptionStrategies.ShortCallBackspreadOptionStrategies.short_call_backspread method with the details of each leg and then pass the result to the Buybuy method.
var optionStrategy = OptionStrategies.ShortCallBackspread(_symbol, lowStrike, highStrike, expiry); Buy(optionStrategy, 1);
option_strategy = OptionStrategies.short_call_backspread(self._symbol, low_strike, high_strike, expiry) self.buy(option_strategy, 1)
Approach B: Create a list of Leg objects and then call the Combo Market Ordercombo_market_order, Combo Limit Ordercombo_limit_order, or Combo Leg Limit Ordercombo_leg_limit_order method.
var lowStrikeCall = calls.Single(x => x.Strike == lowStrike);
var highStrikeCall = calls.Single(x => x.Strike == highStrike);
var legs = new List<Leg>()
{
Leg.Create(lowStrikeCall.Symbol, 1),
Leg.Create(highStrikeCall.Symbol, -2)
};
ComboMarketOrder(legs, 1, true); low_strike_call = next(filter(lambda x: x.strike == low_strike, calls))
high_strike_call = next(filter(lambda x: x.strike == high_strike, calls))
legs = [
Leg.create(low_strike_call.symbol, 1),
Leg.create(high_strike_call.symbol, -2)
]
self.combo_market_order(legs, 1)
Strategy Payoff
The short call backspread is an limited-profit-unlimited-risk strategy. The payoff is
$$ \begin{array}{rcll} C^{low}_T & = & (S_T - K^{low})^{+}\\ C^{high}_T & = & (S_T - K^{high})^{+}\\ Payoff_T & = & (C^{low}_T - C^{low}_0 + C^{high}_0 \times 2 - C^{high}_T \times 2)\times m - fee\\ \end{array} $$ $$ \begin{array}{rcll} \textrm{where} & C^{low}_T & = & \textrm{Lower-strike call value at time T}\\ & C^{high}_T & = & \textrm{Higher-strike call value at time T}\\ & S_T & = & \textrm{Underlying asset price at time T}\\ & K^{low} & = & \textrm{Lower-strike call strike price}\\ & K^{high} & = & \textrm{Higher-strike call strike price}\\ & C^{low}_0 & = & \textrm{Lower-strike call value at position opening (credit received)}\\ & C^{high}_0 & = & \textrm{Higher-strike call value at position opening (debit paid)}\\ & m & = & \textrm{Contract multiplier}\\ & T & = & \textrm{Time of expiration} \end{array} $$The following chart shows the payoff at expiration:
The maximum profit is $K^{high} - K^{low} - C^{low}_0 + C^{high}_0 \times 2$, which occurs when the underlying price is exactly at the higher strike at expiry.
The maximum loss is unlimited, which occurs when the underlying price increases indefinitely.
If the Option is American Option, there is a risk of early assignment on the contract you sell.
Example
The following table shows the price details of the assets in the algorithm:
| Asset | Price ($) | Strike ($) |
|---|---|---|
| Lower-Strike call | 15.10 | 825.00 |
| Higher-strike call | 8.00 | 835.00 |
| Underlying Equity at expiration | 843.19 | - |
Therefore, the payoff is
$$ \begin{array}{rcll} C^{low}_T & = & (S_T - K^{low})^{+}\\ & = & (843.19-825.00)^{+}\\ & = & 18.19\\ C^{high}_T & = & (S_T - K^{high})^{+}\\ & = & (843.19-835.00)^{+}\\ & = & 8.19\\ Payoff_T & = & (C^{low}_T - C^{low}_0 - C^{high}_T \times 2 + C^{high}_0 \times 2)\times m - fee\\ & = & (18.19 - 15.10 - 8.19\times2 + 8.00\times2)\times100-2.30\\ & = & 268.70\\ \end{array} $$So, the strategy gains $268.70.
The following algorithm implements a short call backspread Option strategy:
public class BackspreadOptionStrategyAlgorithm : QCAlgorithm
{
private Symbol _symbol;
public override void Initialize()
{
SetStartDate(2024, 9, 1);
SetEndDate(2024, 12, 31);
SetCash(1000000);
UniverseSettings.Asynchronous = true;
var option = AddOption("GOOG", Resolution.Minute);
_symbol = option.Symbol;
option.SetFilter(universe => universe.IncludeWeeklys().CallSpread(20, 5));
}
public override void OnData(Slice slice)
{
if (Portfolio.Invested ||
!slice.OptionChains.TryGetValue(_symbol, out var chain))
{
return;
}
// Select the call Option contracts with the furthest expiry
var expiry = chain.Max(x => x.Expiry);
var calls = chain.Where(x => x.Expiry == expiry && x.Right == OptionRight.Call);
if (calls.Count() == 0) return;
// Select the strike prices from the remaining contracts
var strikes = calls.Select(x => x.Strike).Distinct().OrderBy(x => x).ToList();
if (strikes.Count < 2)
{
return;
}
var lowStrike = strikes[0];
var highStrike = strikes[1];
var optionStrategy = OptionStrategies.ShortCallBackspread(_symbol, lowStrike, highStrike, expiry);
Buy(optionStrategy, 1);
}
} class BackspreadOptionStrategyAlgorithm(QCAlgorithm):
def initialize(self) -> None:
self.set_start_date(2024, 9, 1)
self.set_end_date(2024, 12, 31)
self.set_cash(1000000)
self.universe_settings.asynchronous = True
option = self.add_option("GOOG", Resolution.MINUTE)
self._symbol = option.symbol
option.set_filter(lambda universe: universe.include_weeklys().call_spread(20, 5))
def on_data(self, slice: Slice) -> None:
if self.portfolio.invested:
return
# Get the OptionChain
chain = slice.option_chains.get(self._symbol, None)
if not chain:
return
# Select the call Option contracts with the furthest expiry
expiry = max([x.expiry for x in chain])
calls = [i for i in chain if i.expiry == expiry and i.right == OptionRight.CALL]
if not calls:
return
# Select the strike prices from the remaining contracts
strikes = sorted(set(x.strike for x in calls))
if len(strikes) < 2:
return
low_strike = strikes[0]
high_strike = strikes[1]
option_strategy = OptionStrategies.short_call_backspread(self._symbol, low_strike, high_strike, expiry)
self.buy(option_strategy, 1)