CustomMenu

Thursday, April 24, 2014

Thoughts on Options Strategy Backtests

This post will be a bit of a diversion from the code examples.  I will discuss some of the ideas behind my backtester and the reasons why I will start by showing backtests of iron condors.  Future posts will initially show automated backtesting results for variations of iron condors.


Short Iron Condor Overview
In case you're not familiar, an iron condor is composed of put and call credit spreads.  It is common to have the same number of shorts and longs in each spread.  Here is a typical iron condor structure:
  • Short 10 (-10),  RUT  Jul-2014  970 puts 
  • Long 10 (+10),  RUT  Jul-2014  950 puts 
  • Short 10 (-10),  RUT  Jul-2014  1270 calls
  • Long 10 (+10),  RUT  Jul-2014  1290 calls

From a risk graph perspective, an iron condor will look like the image below.  I am including this image only to show the risk graph structure of this strategy, and not to recommend this as a trade.


If you need more information, there are many articles about iron condors on the internet.  To save you a bit of Googling, here are two articles to get you started:


Why Iron Condors
I'm going to assume at this point that you have some knowledge of option's Greeks.  If not, the two articles below should give you enough background to understand this section:
If you are selling options either alone or as part of a strategy (like an iron condor), time decay (theta decay) on an option's value is your friend.  Assuming all inputs to Black-Scholes are constant (they never are in real life!), an option's value will decrease with time.  In other words, an option's extrinsic value will approach zero as it's days to expiration (DTE) approach zero.  This allows you to sell an option at one price and theoretically buy it back at a lower price, netting the difference as profit.

Theoretical theta decay does not occur at the same rate for all option strikes though.  Out-of-the-money (OTM) options decay differently than at-the-money (ATM) options.  There are many charts showing ATM theta decay of options, but very few showing OTM theta decay.  This first graph below shows the theoretical theta decay of an SPX ATM call and an SPX ATM put.  You can see that most of the ATM time decay happens in the last 30 DTE.



The next graph shows the theoretical theta decay for a 10 delta SPX OTM call and a 10 delta SPX OTM put.  You can see that most of the OTM theta decay happens prior to 30 DTE.



I originally became interested in iron condors because of the theoretical theta decay of OTM options.  There are trade offs with all options in terms of delta, vega, and gamma and OTM options are particularly exposed to vega risk.  When you analyze the theoretical theta decay of low delta (high prob) iron condors, the decay looks very similar to the decay of OTM options (as you would expect).  The graph below shows the theoretical decay for iron condors with different delta short strikes and different wing widths.



Automated Backtesting
When I originally designed the first version of my option strategy backtester (OSB), I was trying to compare the performance of different strategies and variations of those strategies.  I started by building an iron condor strategy and added other components as I built out more strategies.  With these posts, I will start by showing the results for basic iron condors and build from there (with uneven wings, different quantities of spreads, hedges, etc.).

Live trading and backtesting are very different and I never looked at my backtest results as "real".  Instead, I was interested in comparing the relative performance of strategies to their variations.  Please do not look at the results in future posts as "real" trades, but instead compare strategies to each other in terms of standard trade metrics.  Ideally we will learn which trade types perform better in different market environments and start to identify when a particular strategy is performing outside of it's norms.  Because of this view, slippage and commissions will not be included in the backtests.

In my live trading, I allocate a fixed amount of capital monthly to trades, and do not increase the size of my trades with the profits.  When I show results in future posts, I will show them from this perspective.  I will not compound the returns (no CAGR), instead I will simply add the profits and losses.  In my live trading it is not uncommon to have multiple expiration months of trades "on" at the same time.  The backtest results that I will show will take this same approach of having overlapping trades, with two or three trades on at the same time.

Finally, my tests are run with end-of-day (EOD) options data.  I have several years of 15-minute data and found that the relative results of a strategy did not change much if I used EOD data or 15-minute data.  Backtests are much quicker with EOD data rather than 15-minute data.

Hopefully this post answers some of your questions so that we can focus on test results in the future posts.

10 comments:

Anonymous said...

Hi Dave,

Interesting project. What prices are you using in your backtests - OHLC or Bid/Ask? Thanks.

Anonymous said...

Hi Anonymous,

I'm using the midpoint of the bid/ask spread of each optoin.

Unfortunately, the EOD options data that I am using does not provide open, high, and low prices for the day...only bid and ask at the close. Interestingly, when I use 15 minute data for these tests, the performance of the trades relative to each other is very close to the relative performance when using EOD data.

Thanks,
Dave

Anonymous said...

Hi Dave,

So if I'm doing IC with 30 pt wings and like to take in $3.50 credit (try to go as wide as I can with that much credit) where I close them for 50% of the credit earned, should I go out to 80 days so I can make the trade wider? I want to get the DTE where I get the most decay to hit 50% in credit the quickest but still have safety of the price not hitting the short strikes. (I do have a plan to adj if the trade hits certain deltas)

Randu

Dave R. said...

There is a large gap between theoretical models (the charts above are based on the Black-Scholes model), and actual trades. These models hold up if there is very little movement in stock price (change in delta) and correspondingly little change in volatility (leading to vega impact). These two components (as well as others) lead to theta decay not progressing as outlined in the models (using constant price and volatility).

Other than this specific blog post, all of the other backtesting results posts on my blog are based on actual options prices, with trades evolving with the corresponding actual price movement...my results in this blog are not theoretical or model based.

As of today, I have posted 6 different DTE periods for RUT iron condors and 6 different DTE periods for SPX iron condors. Each of these periods show the results for iron condors at these DTE, and with short strikes at 4 different locations. This represents 48 7.5-year backtests in all ... at this point... many more to come!

So with all of that said, if price and volatility are constant, you will theoretically get greater theta decay in your high-prob (low delta shorts - 8 to 12 delta) ICs at 80 DTE than say 30 DTE. The problem really is price movement...and that movement may change your short strike deltas from say 8 delta initially to potentially 30 delta as the trade evolves...and 30 delta options decay differently than 8 delta options.

Unfortunately there is no "right" answer to your question. Hopefully my response makes sense to you.

Thanks,
Dave

Anonymous said...

With index sometimes it's really hard to fill at mid. John @ Park Research, LLC

Dave R. said...

Agreed. With live trading I typically have to give up $0.05 - $0.10 off the mid in order to get filled.

In my lengthy article above, I made the point several times that these backtests are comparing the relative performance of different strategies. With relative performance comparisons, it is not necessary to add in slippage and commissions since these components are present to the same degree across all strategies.

By removing these "terms" from the relative performance comparisons, I am simplifying the comparisons.

Thanks,
Dave

Spotik said...

What is the best way to protect VEGA exposure - is it using certain futures ? or for example buy long OTM higher delta BF 1:2:1 just above the IC short leg , for a small debit ?

Dave R. said...

Hi Spotik,

I typically don't setup my trades with vega protection in mind, but choose to respond to the situation when it occurs. With small vol increases, I will typically sit on my trade and wait for the vol to come out if an exit is not warranted. I will watch my short deltas, and support/resistance levels of the underlying, and evaluate the position if vol were to come out...it gets a bit complicated to explain. With large vol increases, I will roll my positions (as I did on Aug 24) to a further out strikes with later expirations.

In addition, I do carry downside hedges that are not part of my trade structures.

Lastly, I used to carry extra longs at set ratios for downside protection. My testing showed that these did not provide the protection that was described by the theory. If you could pick the one time that they were needed, then they worked. But, if you were to carry these on every trade, they lost money on the whole.

Thanks...good question!

Dave

Unknown said...

What kind of system do you use to backtest? Where do you get your option data?

Dave R. said...

I use a custom system written in Java, with data from iVolatlity stored in a MySQL database. The FAQ page has more info.

Thanks,
Dave

Post a Comment