iBankCoin
Joined Nov 11, 2007
1,458 Blog Posts

Trade With The Trend While Trading Against It: Part Two

Now I will present the system to be used for the study that was described in Part One.

The System

The system uses an entry and exit signal generated from the CCI (Commodity Channel Index) indicator. For more information on the CCI, here is a helpful explanation: Commodity Channel Index.

BZBTrader and MarketSci have written about systems using the CCI. Both blogs titles are hot-linked to open directly to the posts demonstrating CCI systems.

As systems go, this is not one of my favorites, although it is profitable. I have not spent an inordinate amount of time developing my version of it. As the system makes money from being contrarian, it will work well for this study.

The Entry

All entry and exit signals are based on the end-of-day CCI(8) reading and will be triggered on the next market open.

A Buy signal is generated when CCI(8) crosses above -150 from below. This means that the system is buying weakness.

A Sell Short signal is generated when CCI(8) crosses below 90 from above. This indicates that the system is shorting on strength.

The Exit

An exit signal for any long position is generated when CCI(8) is rising and crosses above 40 from below, meaning the system is selling the long position into strength.

A Buy to Cover signal for any short position is generated when CCI(8) falls to below 50, meaning the system is covering into weakness.

System Specifics and Results

Period Tested: 10 years back ending on 12/31/2008 using the SPY.

10,000 per trade with no compounding of gains. Gains are purposely not compounded during back testing. It will be best to cover the rationale for not compounding gains during proof-of-concept testing in a future post.

Commissions of .01/share are included. I have not included any returns generated from the cash available when the system is out of the market (It is only in the market about 50% of the time).

Some Chart Porn

The equity curve is fairly smooth, except for the end of 2008 (This will be improved in Part Three).

The weekly drawdowns are not awful, but will also be improved in Part Three.

The above graph shows the recent trades and the CCI indicator in the lower pane. Also plotted is the 50 day moving average. The 50 day moving average will be the intermediate trend indicator. Note the long entry (LE) that was made on 10/1/08. The CCI system entered long in oversold conditions, and then the market cratered, getting more and more oversold. This particular stretch of market history caused a lot of angst for traders of mean-reversion systems.

Summary

Presented above is a mean-reversion (contrarian) system. As such, it seeks to buy when the market is going down and sell when it is going up. Unfortunately, as shown in the October trade, the system will often take a trade against the intermediate trend (as shown by the declining 50 day moving average). Occasionally these trades against the trend will result in large drawdowns.

Now that the system has been presented, Part Three will use the intermediate trend (50 day average) to determine position-sizing and leverage. The final result will be the proof-of-concept of a “best of both worlds” system with decreased drawdowns and increased profits.

If you enjoy the content at iBankCoin, please follow us on Twitter

16 comments

  1. Just For Fun

    This would explain your obvious position to go long the SPY this morning even if only for a swing trade. This does make me feel good though, as I was already in the position when your reptilian mind allowed you the same. Good Luck (Not that I see it necessary to wish the apparent reward) Although we have all sat back and watched all the news events of late, the stock market will always be just that……

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  2. Woodshedder

    Just For- I do not trade this system and really have spent very little time developing it. You are right though, this system is set to go long the SPY on tomorrow’s open.

    As for luck, which is I think what you are hinting at, I quit trading discretionary systems and moved to mechanical because I couldn’t determine whether I was lucky, or skillful…

    For you, I wish you to always be skillful. That will get you a lot farther than luck!

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  3. Just For Fun

    Wood,

    Perhaps my attempt at trying to be subliminal was a bit lame. I honestly saw no “luck” in this but saw only the benefit of a positive return. I personally only rely on mechanical systems as there is always a tool handy to tweak anything mechanical. I oppose any type of emotion being involved in any decision I make in relationship to anything controlled by others. My personal opinion (not all that skillful yet) is that we test some new lows here and there. We will not be testing any of the 6000’s like I read here frequently by those who only seem to want a collapse of which I greatly oppose. Maybe we see 7200-7400 (for now), but I do see a bounce that will end most of the b.s. in the 2nd quarter. Maybe it won’t last past that due to new “stimulus” and growth that may be necessary in the 3rd and 4th quarters. I am neither a bull or a bear, but simply a man that tries to make skillful decisions. I will be with you on the ride up the SPY ladder even if it’s only for a day or two this time.

    Happy Trading,

    JFF

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  4. Woodshedder

    JFF, good stuff my friend. Your attempt was not lame…I just read your comment too quickly.

    I’ve got my fingers and toes crossed on the SPY long as it just doesn’t feel right.

    I’m looking for significant new lows as well. Because they feel as though they might appear any day now, it will probably be weeks or months 😉

    Although it has no real influence on the trades I make, I do not believe that we will see a significant rally from here. I think we go lower first. Its been a long time since I marked my charts up in anticipation of new lows, but if memory serves, I think we could easily see another 10-15% lower from here. SPX 700. Dow 6750.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  5. Just For Fun

    LOL Wood, if it felt right we wouldn’t be playing the game because we would already know the outcome. I am with you about the fact there won’t be any kind of a substantial rally. Money is too tight everywhere out there (aside from Gold that is gearing for the pullback)to let any option money go unscathed. I am sure that CNBC will take full credit for any type of short term rally we have, afterall, they are the “Einstein” of Wall Street (typed as Dewars emerges from the nostrils). The next couple of weeks will be rough before the next bounce which will likely resemble the one we are about to experience. Very nice to see another with the same philosophy.

    I admire all the bloggers and their efforts, although some are a bit too dismal for the immediate future. iBankCoin is a wonderful name and I hope everybody out there is doing just that.

    JFF

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  6. Alvari40

    Shedder,

    Thanks for the information – very interesting. Any reason why slippage was not included. I trade auto systems and it is a unfortunate reality that affects the bottom line. Was the 14k net profit for all 10 years? The 2 profit factor and 63% win percentage show that this is a good start for an auto system.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  7. Woodshedder

    Alvari, the system is not that important. It is what I’m building up to in part 3 that I care about. I didn’t even mean to include commissions, but that setting was left on from a previous test.

    As for slippage, do you find that it is pretty bad for the SPY on the open?

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  8. Alvari40

    I do not have a lot of auto experience with the SPY. However, the volatility at the open combined with the system dependence on entry at open would lead me to believe that slippage would be a factor when it comes to real time trading. I prevent my auto systems from trading the first 10 minutes of the day due to this issue. Have you sim traded it yet? I have both sim and live trading accounts and would be happy to sim trade the system for you. I am aware of the sensitivity surrounding sharing of systems; however to get a read on the actual slippage involved without paying for it (if you know what I mean), I can sim trade a watered down version of your real system so as to determine what type of slippage we are talking about. I am playing around with the CCI code right now – maybe I can come up with something that I can plug into the sim trader the next day or so.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  9. Woodshedder

    Sure, do anything you want with it. Compounding gains would have yielded 13.69% annualized.

    My SPY trade this a.m. filled .02 above the open. That is a good idea to sim trade them.

    Part of the reason I haven’t been worried so much about slippage is that the main strategy I’m working on will use leveraged, EOD mutual funds. No slippage and no commissions.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  10. ManuelStop

    Wood–I’m wondering whether I missed a stop loss of some sort in the system(?).

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  11. Woodshedder

    Manuel, nope you didn’t. No stop was used. I did not build in any sort of abnormal filter, either.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  12. jaybee216

    I may have missed it , but does this only work on SPY or can any equity stock or ETF work?

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  13. ManuelStop

    Wood: I did miss the mutual/annunity aspect–makes perfect sense now. The CCI(8-20,3) is a good indicator/trigger for the system.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  14. Woodshedder

    Jaybee, I just ran really quick tests over the QQQQ and IWM and it is profitable. The equity curves are not nearly as nice or stable.

    With some tweaking, it could probably be part on an entry signal for common stock.

    • 0
    • 0
    • 0 Deem this to be "Fake News"