Wednesday, 9 March 2011

Backtesting

I have always been a proponent of backtesting. Mrs EL told me this morning that I haven't written about it in a while so I am correcting the ommission.


While backtesting (or hypothetical trading as the U.S. government disclaimer calls it) is not a guarantee of future performance, it's pretty certain that what didn't work in the past is unlikely to work consistently in the future, assuming there have been no major changes. Further, not testing is living in hope.


Now there is backtesting and there is backtesting. Testing a pattern is more likely to be robust than testing specific indicator inputs. What this means is that if I observe something that happens at the beginning of a trend move and can capture that in code, then when that pattern repeats itself I can trade it and I can back test it. If my algo says that when widget 1 crosses above widget 2 then it will be less robust as the volatility of the market changes.


Now in Flo's algos, we have a stop loss. That stop loss is really a drop dead stop that is used if the other exit rules are not triggered. This drop dead stop may not be the best stop loss in the context of a particular trade or even of a particular day, but it's a number that Flo has found by looking back many days and deciding that if the stop loss is less or more than that particular number then the profitability over the whole backtest period would be less. So that stop loss is kind of an average number based on the average volatility over the backtest period. The same can hold true for a target if it is done in a way to look for the largest single number rather than trying to find first logical exit with a view to re-enter with new signals, looking for a very high win rate.


Better exits are dynamic exits that take into account the day to day and hour to hour volatility changes in the market.

The useful thing with Flo is that I can choose to work shorter hours. I have the benefit of stats that I can rely on so I can scale size in accordance with my account size and risk appetite. Remember, there are losing trades and they can happen any time. All it needs is for "they" to come in size and the best picture or setup can be a loser.


I didn't need to work too hard in the ES. Someone asked about yesterday's ES trades and you can see them on the chart. The setup has 3 targets but with current volatility the third target is the same as the second so 1/3rd of the position is exited at 1.5 points and 2/3rds at 3 points.

Go Flo!!!



12 comments:

  1. hello EL posted that comment the wrong day, was wondering would you have taken the long trades at 9:45 10:03 11:00 11:33 EST (wednesday), the CCI was in the red but we could have leaned against yesterday VAL, are those trades qualify as outside in
    thanks

    ReplyDelete
  2. How many days do you recommend backtesting for?

    ReplyDelete
  3. Tom, thanks for posting a Tradestation chart!
    looking at your CCI indicator it appears a bit off from what I've been using (out of box TS)
    Is this ELD available, or proprietary? Thanks so much for all you do.

    ReplyDelete
  4. Wes, Backtesting is more than a whole post. It depends on what info you want. Too many days and the stats are "too avaerage", not enough days and you get curve fitting but if you are looking for, say, the best stop loss, then usually the more days the better.

    ReplyDelete
  5. Rdftrd1, you can find a link to it at CHART SETTINGS & CHART DEFINITIONS under KEY POSTS in the right margin of this blog.

    ReplyDelete
  6. thank you for posting your ES chart

    ReplyDelete
  7. Joseph, outside in trades are easy to see after the fact so I can't honestly respond. However, mastering inside out trades first is a better way to CP. Newbies usually go for outside in trades because they look easy after the fact but knife catching is a dangerous sport. I look for my Fib and Profile support/resistance and/or 45CCI at extreme +-200+

    ReplyDelete
  8. quite a few neutral days recently in the bund and Estoxx. Think all of them have snapped back into the middle of the range. Just checking - do you consider the IB on the Eurex products to be the first 2 hours (7-9am), as the futures open 1 hour before the cash. Thanks for your knowledge Tom.

    ReplyDelete
  9. Anon 15:59, I use 1 hour for the IB and I run it on the full trading day as well as a trading day parallel to the cash trading hours - 2 separate profiles. 2 Gap trades.

    ReplyDelete
  10. Good Evening,

    The CCI your using for TS is under the chart settings? Didn't see it.

    Thanks,

    John

    ReplyDelete
  11. John, it's there now. Don't know how it disappeared, or use this url:
    http://www.sendspace.com/file/h3oxv1

    ReplyDelete