iBankCoin
Joined Nov 11, 2007
1,458 Blog Posts

Backtesting: Buy the Nasdaq Above The 200 Day Average?

More simple testing of what happens after price crosses a major moving average.

For this test, I used the $COMPX, tested from today to February 5, 1971.

Rules: Buy the next open after price closes above the 200 day average.

Sell the next open after price closes below the 200 day average.

$10,000 per trade.

This simple system is profitable. The profit factor and ratio of average win to average loss is worth noting as it is very good.

Also, the win percentage of 43.88% is consistent with that of trend following systems.

What jumped out at me, as I try to determine what my bias should be over the next few weeks, is the number of days one would be in this trade before it loses (Avg. Bars in Losing Trades). If this trade is going to fail, on average it fails within approximately 8 days. What I take from this is that if the Nasdaq can maintain the 200 day moving average, for a couple of weeks, then I need to be considering the reality that the Nasdaq has bottomed.

Along the same lines, the average winning trade lasted for 137 days. It would not be fun to fight that kind of trend, on the short side.

These statistics highlight that the Nasdaq has closed at a critical level today, as it closed 2 points over the 200 day average.

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

11 comments

  1. bhh

    Nice study Wood. I haven’t actually run the following test before but I’ve read that using a change in the direction of the slope on the 200dMA rather than a price cross will result in fewer whipsaws and better performance metrics. Buy when the slope changes from negative to positive, sell the reverse.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  2. The Fly

    I bet you ran this test while eating smoked ribs and cole slaw.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  3. alphadawgg

    Is the max drawdown (-$11,558)? That is a pretty large %, isn’t it?

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

    Smoked, plucked emu ribs.

    _

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  5. pn

    After looking at a bunch of stocks that crossed the 200dma, I noticed that the price repects the 50 week MA much more than the 200dma–take the q’s as one example.

    Perhaps you can run the above test on the 50wma to see the results.

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

    I think Marlyn at Filtering Wall Street had a linear regression slope script for StockFetcher that did something similar to what BHH is talking about.

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

    Nah, home-made pizza, tonight. Fed 5. Cost, less than 4 bucks.

    ADawg, that is the max drawdown, on an open trade. That trade was initiated in Nov of 1998 and caught the HUGE bull run in the techs. However, it gave back a ton of profits as the Nasdaq rolled over, and eventually closed beneath its 200 day moving average. Still, the trade added 7,246, a gain of 81.25%.

    The max drawdown from trade close to trade close is what you are interested in.

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

    Pn, the 50 day works, also.

    Net Profit 53,457
    Total Number of Trades 232
    Winning Trades 83
    Winning % 35.78
    Avg. Trade Net Profit 230.42
    Avg. Winner 882.78
    Avg. Loser 132.98

    Basically, you are sacrificing avg. trade profit for a larger number of opportunities.

    Note that the 50 day cross had 9 losing trades in a row. Also, the average loser length was 8.5 days.

    The Nasdaq crossed the 50 day 4 days ago.

    Using that statistic, the bears may still have a chance, over the next week.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  9. The Fly

    Then I bet you were eating BBQ ribs on your way to work this morning, while discarding the bones onto the pavement below.

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

    Close. I was actually throwing the bones out the window of my pick ’em up truck to the dog, who was riding in the back with his front legs up on my truck box.

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

    Shed, I meant 50 Week ma, not 50 day. The nasd is still just under that ma…

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