CustomMenu

Wednesday, September 17, 2014

Delta Neutral Iron Condor

This post is the introduction for my next series of iron condor (IC) backtest posts. See my post Thoughts on Options Strategy Backtests for some background on my testing approach.

The last series of IC backtest posts looked at the performance of a symmetric (equal quantities of long and short calls and puts) "no touch" IC on the RUT, SPX, and NDX.  The structure of these ICs resembled the image below.


I modeled this trade in TOS today, with 64 days to expiration (DTE).  With approximately 8 delta short strikes and a 20 point wing width, this RUT condor is short almost 18 delta.  The maximum profit on this trade is $2,320, with a maximum risk of $17,680.

In my next series of IC backtests, we will look at a delta neutral version of this trade.  In order to modify the position deltas, I will decrease the quantity of call spreads.  I will leave the strikes in the same positions that they were in for the symmetric "no touch" backtests.  If we take the trade in the image above and decrease the number of call spreads from 10 to 5, the delta of the position will change from -18, to +1.  This new structure is shown in the image below.


This trade has a maximum profit of $1,735, and a maximum risk of $18,265.

In my new series of posts, the automated backtester will construct broken wing ICs that are delta neutral.  The quantity of call spreads will change from trade to trade in order to start with a delta neutral IC.  In some situations, trades may start with 5 call spreads and in other situations the trades may start with 7 or 8 call spreads.  This quantity will be automatically adjusted to create a delta neutral starting structure.   The backtester can automate adjustments, but in this series the trades will again be "no touch" ... no intra-trade adjustments.


Sunday, September 14, 2014

Historical Data and Momentum Rotation Strategies

We are going to take a slight detour with this post, and look at stock/ETF/mutual fund rotation strategies.  I actively trade rotation strategies in several accounts, and have been evolving my rotation strategies for about ten years.  If you'd like some information on how to build a rotation strategy, please take a look at the articles below:


These articles are from the blogs of MarketSci and Woodshedder who have both written a number of posts (more than I've listed above) on the topic of rotation strategies.  Both seem to be semi-retired now and do not blog much.  In my post we will not look at the strategies themselves, but rather the data that they use.

----

A few years ago I began to realize that the signals I was receiving (and trading on!) from my rotation strategies were occasionally inconsistent with the backtests of these same strategies.  I didn't spend much time digging into the issue at the time, but it remained in the back of my mind until late December, 2013.

For the trades that were generated from my systems for December 2013 (my rotation systems reassess monthly), I not only recorded the vehicles that were selected, but also their associated rotation rank/score.  I have been tracking this information in spreadsheets since that time...a period which currently includes nine rotation cycles (9 months).

In the middle of last month, August 2014, I decided to backtest my live rotation strategies across the same period that I had actively traded with these same rotation strategies.  I was not surprised to find that a number of the trades in the backtests did not match the trades I had actually executed and recorded in my spreadsheets.

I use AmiBroker and Yahoo! end-of-data data (Yahoo Data Info 1, Yahoo Data Info 2) for my rotation strategies.  I knew that Amibroker was configured by default to use the adjusted close rather than the actual close in it's database, but I didn't think too much about this detail.  I had been consciously using this adjusted close rather than the actual close for nearly ten years, but had not truly considered the impact of using adjusted close data with rotation/ranking strategies. The line in the AmiBroker aqh.format file that you should be aware of is highlighted below:

 
# AmiQuote historical quotes download format (.AQH extension)
# Revision 1.1 - removed $VOLFACTOR 0.01
$FORMAT Date_DMY,Open,High,Low,Close,Volume,AdjClose
$SKIPLINES 0
$BREAKONERR 0
$SEPARATOR ,
$DEBUG 1
$AUTOADD 1
$CONT 1
$GROUP 254
# the following switches are optional - please consult
# the read-me for description of those options
# $RAWCLOSE2OI 1   
# $RECALCSPLITS 1
# $ROUNDADJ 4

If you would like to use the actual close rather than the adjusted close in Ambroker, replace the highlighted line above, with the line below and re-download all of your historical data from Yahoo.

 
$FORMAT Date_DMY,Open,High,Low,Close,Volume

As a reminder, the adjusted close time series is a modified version of the actual close time series that includes gains from dividends and capital gains.  This means that a buy price shown in a backtest will not be the actual buy price that you could have received trading on that day (for any stock or ETF that at some point later in time issued a dividend or capital gain).  It is very important to think about this point and the impact it can have on your backtest versus live results!

This issue has a big impact on trade entry and exit signals with rotation/ranking systems...a system where a group of stocks/ETFs/mutual funds are being compared to each other based on open/high/low/close (OHLC) price data.

As an example, take a look at the historical data for the iShares Core US Aggregate Bond (AGG).  An excerpt of this historical data is shown in the image below.



If your rotation system happened to be using adjusted close prices and had AGG in its basket of rotation vehicles, AGG's score for August 29 would have been different on August 29 when you traded it, than when you run your backtest for that date on say September 2 (after the dividend issuance).  You will notice that the August 29 close is 109.98, but the adjusted close is 109.79...and this issue compounds with every dividend and capital gain that is issued...every past adjusted close is modified when a new dividend is issued.  Take a look at the difference between the adjusted close and actual close just two years ago:



The close on August 29, 2012 is 111.95, while the adjusted close on that date is 106.33.  As new dividends are issued in the future, the 106.33 adjusted close price will get increasingly smaller, which will have an impact on the rotation ranking/score for AGG in all backtests.  This same issue occurs with any vehicle that issues dividends and capital gains.

----

If we use actual closing prices for our backtests, we will generate signals based on prices that actually occurred in the past.  The trade off is that we will not see the positive impact of dividends and capital gains in the returns of our backtests.  As an illustration, I can show the results of several rotation strategy variations run against the following basket of ETFs:


In the image below, you can see the equity curves for several different rotation strategies run against the 10 ETFs in the list above, but using the adjusted close time series.  (click on the image to see a larger version).



In the top pane, the green, purple, and red lines are the equity curves for three different rotation strategies run against the 10 vehicles in the list above.  The other three curves are the "buy and hold" curves for SPY, IWM, and QQQ.  The lower pane displays SPY (orange), and the same green, purple, and red equity curves from the upper pane.  In addition, the lower pane contains seven equity curves for other rotation strategy variations on the same list of 10 ETFs.  The y-axis is percent return, while the text for each strategy lists the cumulative dollar return for that strategy (the initial capital for each strategy was $100,000).

Now let's look at the results for the exact same strategies run against the same 10 vehicles, but using the actual closing price time series data.  We expect the returns to be lower, since dividends and capital gains are not reflected in the time series.



The difference in equity curves is large, as expected.  But how do the entry and exit signals compare between the adjusted close data and the actual close data.

In the table below, is the comparison of entry and exit dates and vehicles for the strategy with the green equity curve in the above two charts.  Recall that the equity curves in the two charts above was generated by the same rotation strategy run against the same 10 ETFs in the list above...the only difference between the equity curves is the data...adjusted close data versus actual close data.


These are not vastly different selections between the adjusted close time series and the actual close time series with this rotation strategy and the 10 ETFs in the list above.  I have noticed significantly greater differences with different baskets of ETFs and mutual funds.

So what's the point?  Ideally, for rotation/ranking strategies we should generate our entry and exit signals based on the actual close time series, but calculate our returns on those trades using the adjusted close time series.  If we can only use one time series, then we should consider using the actual close time series rather than the adjusted close time series.  If we can live with equity curves that show smaller returns, using actual close time series data will result in generated entry/exit signals in our backtests that match our actual entry/exit signals that we received in real trading.

And one last point...be sure to check the data that paid and free rotation strategy services use...it's most likely adjusted close data...which means the signals they show in their backtests may not match the signals that they actually sent you!

Good trading!


Sunday, September 7, 2014

Iron Condor Articles Summary

For the time being, I am finished with the backtests and analysis of the standard "no touch" Iron Condor (IC) on the RUT, SPX, and NDX.  I have published a number of posts on this standard "no touch" IC, and this post is a categorized summary of all of those past posts.  This post should make it a bit easier to find the backtest or analysis that you are looking for.

Shortly, I will discuss the next IC strategy that I will backtest.

RUT "no touch" Iron Condor Blog Posts:


SPX "no touch" Iron Condor Blog Posts:

NDX "no touch" Iron Condor Blog Posts:

Summary Statistics Blog Posts:

Losing Trades Posts: