Monday, August 18, 2008

The Price of Risk

Inputs: RSILength(2), OverSold(28), Overbought(86), Oversold2(20), Overbought2(86), CCILen(8), OverSold3(21), OverBought3(100), OverSold4(23), OverBought4(100);
If RSI(Close, RSILength) Crosses Below Overbought

and CCI(CCILen) Crosses Below Overbought2
Then Sell This Bar on Close;
If RSI(Close, RSILength) < Oversold
and CCI(CCILen) < Oversold2
Then ExitShort on Close;
If RSI(Close, RSILength) Crosses Above OverSold3

and CCI(CCILen) Crosses Above OverSold4
Then Buy at Market;
If RSI(Close, RSILength) > OverBought3
and CCI(CCILen) > OverBought4
Then Exitlong at Market;

Inputs: RSILength(2), OverSold(32), Overbought(90), Oversold2(32), Overbought2(98),CCILen(8), OverSold3(32), OverBought3(78), OverSold4(32), OverBought4(86);
If Currentbar > 1 AND RSI(Close, RSILength) > Overbought

and CCI(CCILen) > Overbought2
Then Sell This Bar on Close;
If RSI(Close, RSILength) < Oversold
and CCI(CCILen) < Oversold2
Then ExitShort at Close;
If Currentbar > 1 AND RSI(Close, RSILength) < Oversold 3
and CCI(CCILen) < Oversold 4
Then Buy This Bar on Close;
If RSI(Close, RSILength) > OverBought3
and CCI(CCILen) > OverBought4
Then Exitlong at Market;

I recently profiled a system I called the Grand Slam Cross (GSC) which was based on the CROSS OVER (cross back over) of overbought and oversold CCI and RSI levels. IMHO the system had a number if attractive features including a monthly frequency, relatively muted max intraday drawdown and a geat winners/losers ratio, especially the consecutive ones, which tend to make most traders waffle about the reliability of the system on anything above 3.
As I was fiddling around with the code, I tested several variations of the inputs in an attempt to goose the overall return. This is the result.

While the GSC generated respectable returns, the second system . . Grand Slam 2 (GS2), uses the same thinking but executes on the threshold of overbought and oversold levels. The Input values are optimized for the GS2 and, as expected, trigger at different levels since they are looking for the initial cross rather than the cross back. Triggers on the immediate threshold cross typically leave some money on the table as momentum is often not yet exhausted at the cross. That being said, the GS2 system puts that thinking to the test as it reflects over twice the return for the IWM over the same test period.GS2 has 3 times as many trades and the winners/losers (including consecutive losers) is still acceptable. However, what you buy with the GS2 system is the added max intraday drawdown and an increased size of the losing trades.

As usual, I have not applied any stops to this little test and, based on the results of previous studies profiled here, a breakeven floor stop or a simple stop loss should decrease that intraday drawdown and increase the bottom line.


6 comments:

GS751 said...

Good Post. I ran across your blog and am adding it to my list of blogs that I check daily. George

Unknown said...

Results are very impressive, especially considering that it based on a relatively simple setup.

I attempted to replicate your results in my backtesting software and got similar results. However, i was wondering what time frame are you backtesting on?

Also, I tried testing this on a few other instruments (ES, YM, etc.) over longer timeframes. The short trades continue to perform well, but the long trades seems to degrade quickly. This is probably typical behavior of overbought/oversold based systems, but I was wondering if you noticed the same thing.

Finally, it seems that 1/3 * ATR(10) makes for a very nice stop.

bzbtrader said...

muhammad,
Thanks for the ATR stop. That's what I'm talking about when I ask traders to share their results with these systems, whether it be good or bad.
Unless otherwise indicated, the tests are run on daily bars for 5 years. On the TS Performance Summary, the line above ALL TRADES notes the system name and the time frame tested. As I mentioned in Tuesday's post, the IWM behaves differently than the DIA or SPY with respect to technical alignment. I suspect that's what you may be picking up with your off-IWM tests, but that just a guess.

Unknown said...

Bob,

Sorry that I overlooked the text at the top of the results .jpg. I mistakenly thought this was an intraday system.

You'll be happy to know this also works pretty well on intraday timeframes! (5 min, 1 min) - particularly short. The 1/3 * ATR(10)stop works well for intraday timeframes, but is probably inappropriate for multiday swing trades.

LP said...

Bob,

I too ran similar tests in the past and I found some inconsistencies when i deployed the backtest/walk forward method.

Basically with any test I performed, I noticed that I was over optimizing. For example you have the RSI 28/86. I found a 4/96 RSI2 preformed real real well. But then I started reading a few of these really freakin boring books about back testing and I decided to try the walk for method. For those that may not know (I don't think there are many here), all you do is pick to sets of dates. The first set you develop your system with. Once you are happy with it you then use those variables on the second set of dates. If you keep the test honest and the results are fairly similar, then you may have a nice winner. However, you will notice that many tests fail this method.

When I started to doing this I noticed that the best variables that did well with both back/walk forward test where roundish numbers like 5, 10, 15, 20 etc...

Just my two cents. While I may not agree with your variables (entirely), I find the thought process behind each one of these posts to be far to valuable to pass up. Keep up the good work and thanks for sharing in a thankless world/blogosphere.

LP said...

additional note: from my tests, I've found very few strategies that work well in both bull and bear markets. What worked well in one market was usually choppy at best in another. So I followed Will's recommendation and applied a crappy 50/200 sma (I couldn't think of better one) to differentiated a bull/bear market. That improved the results dramatically. However it did cut down the number of trades immensely (40 -50%) and a small portion (maybe 20%) of the overall profits as well.

Which led me to believe that I can deploy more capital into subsequent signals via pyramiding and that help increase profits substantially.