Rusty Apple

The main objective of system trading is to create a trade system that has predictive value and can make money for years to come. If a system historically doesn’t make money, it’s not worth pursuing. Or is it? In the curious world of trade system development, some have stumbled upon good trading systems by fading their original idea, which performed so abysmally that you couldn’t lose that much money unless you started throwing it out the window as fast as you can. System trading can also provide other insights into market behavior that, if not yielding a tradeable system, can at least give you some ideas about developing one. From the twitter world, I got the following idea from AshRust: How about each time the VIX spikes X% buy AAPL, then sell after 5/15/30 days w/ 10% stop loss? It’s an interesting idea that’s contrarian and uses intermarket analysis to trigger a long trade. Does it work? Can you trade it? Or is it nothing more than a curious data-mined notion?

My first impression is that it’s not an idea one would actually trade real money with. But is it an interesting factoid? Well, to pursue the idea, I quickly coded the idea (I use TradersStudio) with three parameters that include VIX Spike, N Days to Hold and Percent Stop Loss. Preliminary research showed that fine-tuning a stop loss percentage was not all that meaningful, so I focused on varying only the amount of VIX spike that would trigger the trade, and the number of days to hold the long Apple stock. Since I’m not developing this idea as a trade system, I did not protect any data from the perils of optimization’s curve-fitting process. I didn’t even really backtest the idea since I’m not sure what parameter sets would make sense but instead ran straight into optimization. The period is from October 1, 1999 to October 1, 2009 (10 years). I stepped the N days to hold from 2 to 30 days in chunks of 2 days, and the VIX spike from 2% to 20% in chunks of 1%. That’s 285 permutations that yields the following space with respect to profitability (above zero line is profitable):

Of all the permutations, 41% were profitable. Hmmm, maybe we can improve on the idea. What if no trades were taken when there was a positive correlation between AAPL and VIX? After all, it is a contrarian trade idea. Well, a little line in the code does the trick and the following optimization space is the result:

It yields less trades with the filter (obviously) but there is also a decrease in the percentage of profitable parameter sets with the total coming to 36%. Oh well, at least now we know. Anyone who made money using this system over the past ten years did so on the basis of pure luck. If , however, you have a time machine that can go back to 1999, I suggest you buy APPL whenever the VIX spikes at least 4% and hold the long stock for 2 days. You will have been a genius and could brag about an annualized return of 47% over ten years.


2 Responses to “Rusty Apple”

  1. Jez Liberty Says:

    I like you last sentence – illustrates well the concept of over-optimisation and curve-fitting.

    I really like your 3D map charts. What do you use for these? Any special software?

  2. Milk Trader Says:

    Curve-fitting cannot be avoided with optimization since you're trying to organize data into a meaningful, predictable curve that has enough firmness quality to be useful. Over-fitting is optimization gone wrong, and is an exercise of self-delusion.
    Given enough time and willingness, I could keep adding conditions to the Rusty Apple and perhaps find a random instance of a specific parameter set that has 100% annualized returns. That would be cheating though. Not that nobody does it, but not here.

    Charts are made in TradersStudio with the 3D charting add-in. Basically it's an Excel pivot chart.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: