How to Backtest a Multi-Leg Option Strategy

Backtesting is the best way to see how a strategy performed historically.  The ORATS API in Excel helps you start backtesting your strategy. Here we backtest a four leg strategy in the SPY.

STEPS:

  1. Sign up and request your user key here: Sign Up Free.
    signup
  2. Open the Excel sheet you downloaded here: Download ORATS Excel.
  3. In the dropdown menu in cell B1 choose Iron Condor.
    scanner-strategy
  4. Press the SCAN button and enter your key that was emailed to you.
    enter-key
  5. See live delayed results to your strategy.
    scan-results
  6. Press the BACKTEST button to see the backtest of this strategy (takes a few minutes).
    backtest-results
  7. Adjust the strategy. Let’s test selling a two week Iron Condor and use percent instead of deltas. Days to expiration (dte) new min,max around 14 days become 8,20. Turn the delta (absdelta) ‘off’. We’ll choose 2% and 4% OTM for the call and put spreads. That will equate to 1.02 and 1.04 for call legs and .98 and .96 for put legs. We use a min,max so leg1 is 1.03,1.05 to have a range around 1.04.
    backtest-option-params
  8. Adjust leg relationships and spread total parameters. We will set the difference in the call and put spread strikes to a minimum of $1 and maximum of $10. The days to expiration are min,max 0,0 meaning they will be the same i.e. leg1 dte – leg2 dte = 0.
    backtest-leg-relation
  9. Set the backtest parameters. The backtest will go back 3 years and have no early exit.
    backtest-parameters
  10. Press BACKTEST and see equity line, monthly returns and assess stats.
    backtest-statsWe hope you enjoy using the Scanner and Backtester. If you have any questions please check out our videos and our documentation or email us at support@orats.com.
orats

Leave a Reply