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.
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.
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.
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“
- We will be using our Visual Interactive Development Environment (IDE) to create and backtest our strategies with a few clicks of the mouse.
- First, login to the OptionStack platform. Select “New Strategy” from the “File” menu item
- Enter any arbitrary name you would like for the strategy
- A visual template will be automatically created for you. You will modify this template to define your trading rules.
- Detached the existing “RSI” block from the “When” block, and move it into the “Trash Can”.
- 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).
- Adjust the strategy from selling a “Put” to selling a “Call Vertical Spread”, which is the same as a Bear Call Spread.
- Adjust the DaysToExpiration to 45 – 60 days.
- 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.
- 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.
- Attach the set of duplicated blocks to the bottom of the first “When” block.
- 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).
- Preview the types of Put Vertical Spreads that will be selected by clicking on the“magnifying glass” icon on the strategy.
- Now that the trading system has been defined, click on the “Run Backtest” button to evaluate the performance of this trading strategy.