# Option Strategies

### Introduction

Bull call spread, which is also known as long call spread, consists of buying an ITM call and selling an OTM call. Both calls have the same underlying stock and the same expiration date. The OTM call serves as a hedge of the ITM call. It is a option strategy profitting from a rise in underlying asset price.

This is a limited-reward-limited-risk strategy. The payoff is as follows:

$Payoff_{OTM\ call}=(Price_{underlying}-Strike_{OTM\ call})^{+}$

$Payoff_{ITM\ call}=(Price_{underlying}-Strike_{ITM\ call})^{+}$

$Profit/Loss=(Payoff_{ITM\ call}-Payoff_{OTM\ call}+credit\ received_{OTM\ call}-debit\ paid_{ITM\ call})\times multiplier-commissions$

The maximum profit is the spread between the 2 options' strike prices minus net debit paid when opening the trade after commission. If the price is increased to exceed both strikes, both calls will worth $(underlying price - strike) at expiration. Maximum loss is the net debit paid after commission when opening the trade, where is underlying price is below both strike prices and the options become worthless. If the option is American option, there will be a risk of early assignment on the shorted option. ### Implementation Follow these steps to implement the bull call spread strategy. 1. In the Initialize method, set the start date, end date, cash, and Option universe. 2. private Symbol _symbol; public override void Initialize() { SetStartDate(2017, 2, 1); SetEndDate(2017, 3, 5); SetCash(500000); var option = AddOption("GOOG", Resolution.Minute); _symbol = option.Symbol; option.SetFilter(universe => universe.IncludeWeeklys() .Strikes(-15, 15) .Expiration(TimeSpan.FromDays(0), TimeSpan.FromDays(31))); } def Initialize(self) -> None: self.SetStartDate(2017, 2, 1) self.SetEndDate(2017, 3, 5) self.SetCash(500000) option = self.AddOption("GOOG", Resolution.Minute) self.symbol = option.Symbol option.SetFilter(self.UniverseFunc) def UniverseFunc(self, universe: OptionFilterUniverse) -> OptionFilterUniverse: return universe.IncludeWeeklys().Strikes(-15, 15).Expiration(timedelta(0), timedelta(31)) 3. In the OnData method, select the Option contracts. 4. public override void OnData(Slice slice) { if (Portfolio.Invested) return; // Get the OptionChain of the symbol var chain = slice.OptionChains.get(_symbol, null); if (chain.Count() == 0) return; // sorted the optionchain by expiration date and choose the furthest date var expiry = chain.OrderBy(x => x.Expiry).Last().Expiry; // filter the call options from the contracts which expire on the furthest expiration date in the option chain. var calls = chain.Where(x => x.Expiry == expiry && x.Right == OptionRight.Call); if (calls.Count() == 0) return; // sort the call options with the same expiration date according to their strike price. var callStrikes = calls.Select(x => x.Strike).OrderBy(x => x); // select the strike prices for forming the option legs // the ITM call option with the lowest strike price (long) and the OTM call with the highest strike price (short). var itmStrike = callStrikes.First(); var otmStrike = callStrikes.Last(); def OnData(self, slice: Slice) -> None: # avoid extra orders if self.Portfolio.Invested: return # Get the OptionChain of the self.symbol chain = slice.OptionChains.get(self.symbol, None) if not chain: return # sorted the optionchain by expiration date and choose the furthest date expiry = sorted(chain, key = lambda x: x.Expiry, reverse=True)[0].Expiry # filter the call options from the contracts which expire on the furthest expiration date in the option chain. calls = [i for i in chain if i.Expiry == expiry and i.Right == OptionRight.Call] if len(calls) == 0: return # sort the call options with the same expiration date according to their strike price. call_strikes = sorted([x.Strike for x in calls]) # select the strike prices for forming the option legs # the ITM call option with the lowest strike price (long) and the OTM call with the highest strike price (short). itm_strike = call_strikes[0] otm_strike = call_strikes[-1] 5. In the OnData method, call the OptionStrategies.BullCallSpread method and then submit the order. 6.  var optionStrategy = OptionStrategies.BullCallSpread(_symbol, itmStrike, otmStrike, expiry); // We open a position with 1 unit of the option strategy Buy(optionStrategy, 1); } option_strategy = OptionStrategies.BullCallSpread(self.symbol, itm_strike, otm_strike, expiry) # We open a position with 1 unit of the option strategy self.Buy(option_strategy, 1) ### Summary In this algorithm, we've realised the below payout at expiration (2022-3-4). ItemsPrice Price of OTM call$ 3.00
Price of ITM call$41.00 Strike of OTM call$ 835.00
Strike of ITM call$767.50 Price of underlying at expiration$ 829.08
Commission per trade$1.00$Payoff_{OTM\ call}=(829.08-835.00)^{+}=0Payoff_{ITM\ call}=(829.08-767.50)^{+}=61.58Payoff_{total}=(61.58-0+3.00-41.00)\times100-1.00\times2=2356$So, the strategy profits$2356.

### Algorithm

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