Screen Shot 2016-04-24 at 7.07.44 PM

Backtesting Of Vertical Spreads Strategies

In this lesson you will learn how to create and backtest trading strategies to buy and sell Vertical Spreads based on technical indicators, such as the Moving Average Crossovers.

We will construct an options trading strategy that will enter into a Bull Put Spread whenever there is a bullish cross-over, and enter into a Bear Call Spread whenever there is a bearish cross-over.

Specifically, we will enter into a Bull Put Spread whenever the 50-day Moving Average crosses above the 200-day Moving Average (Bullish Cross Over), and enter into a Bear Call Spread whenever the 50-day Moving Average crosses below the 200-day Moving Average (Bearish Cross Over).

Simply click the “Run Backtest” button below to automatically get started.

Run Backtest!

Bull Put Spreads

A bull put spread is used when the investor expects a moderate rise in the price of the underlying asset. This strategy is constructed by purchasing one put option while simultaneously selling another put option with a higher strike price. The goal of this strategy is realized when the price of the underlying stays above the higher strike price, which causes the short option to expire worthless, resulting in the trader keeping the premium.

 Bull Put Spread


Bear Call Spreads

A bear call spread is a type of options strategy used when a decline in the price of the underlying asset is expected. It is achieved by selling call options at a specific strike price while also buying the same number of calls, but at a higher strike price. The maximum profit to be gained using this strategy is equal to the difference between the price paid for the long option and the amount collected on the short option.

 Bear Call Spread


MA Cross Overs

When the shorter Moving Average crosses above the longer term Moving Average, it’s a buy signal as it indicates the trend is shifting up.This is known as a “golden cross.”

When the shorter Moving Average crosses below the longer term Moving Average it’s a sell signal as it indicates the trend is shifting down. This is known as a “dead/death cross

 Screen Shot 2016-04-24 at 10.46.52 AM


Placeholder

  • First, login to the OptionStack platform.  Select “New Strategy” from the “File” menu item
  • Enter any arbitrary name you would like for the strategy
Placeholder
Placeholder
  • A visual template will be automatically created for you. You will modify this template to define your trading rules.
Blank Template
  • Detached the existing “RSI” block from the “When” block, and move it into the “Trash Can”.
Placeholder
  • Drag and drop the Moving Average studies block from the “Studies” toolbar on the left, and attach it to the “When” block.
  • Adjust the Moving Average periods so that is reads: Moving Average (50 period) crosses below  Moving Average (200 period).
Studies API
  • Adjust the strategy from selling a “Put” to selling a “Call Vertical Spread”, which is the same as a Bear Call Spread.
Studies API
  • Adjust the DaysToExpiration to 45 – 60 days.
Studies API
  • Preview the types of Call Vertical Spreads that will be selected by clicking on the“magnifying glass” icon on the strategy.
  • So far, we’ve defined the first half of our trading system:  sell a call vertical spread (Bear Call Spread) when the 50-day Moving Average crosses below the 200-day Moving Average.

 

Studies API
  • Let’s define the other half of our trading system now, which is to sell a Bull Put Spread whenever the 50 day Moving Average crosses above the 200 day Moving Average.
  • Simply select the “When” block, and right click to select the “Duplicate” option.
Placeholder
  • Attach the set of duplicated blocks to the bottom of the first “When” block.
Studies API
  • Modify the lower set of blocks to define the following:
    • Change the “crossesBelow” to “crossesAbove” to define the bullish cross-over rule.  (50 days MA crossing above 200 day MA)
    • Adjust the “Sell Call Vertical” to “Sell Put Vertical” (Bull Put Spread).
Studies API
  • Preview the types of Put Vertical Spreads that will be selected by clicking on the“magnifying glass” icon on the strategy.
Placeholder
  • Now that the trading system has been defined, click on the “Run Backtest” button to evaluate the performance of this trading strategy.
Run Backtest!

Leave a Comment