Thursday 17 March 2011

Traps in Testing

Testing is a very critical thing for both discretionary and algo trading. As usual, the problems come from what you don't know that you don't know. As with most endeavors, if you don't even know what questions to ask then you will find it difficult to succeed.

One of the many traps in back testing is which combination of platform and data feed you are using, as well as both the latency between you and the data feed and you and your broker. Then add in the bandwidth of your internet connection and finally the load on your PC and the actual combination of these that any one trader has, is pretty unique. That means getting identical results from testing using the same trading rules is therefore pretty impossible.

The two tables below represent the results of a new algo we are developing. Both are EXACTLY the same easylanguage text testing the ES on the same PC located in the cloud, with the first running on MultiCharts and eSignal data and the second running on TradeStation and TradeStation data.

My first conclusion is that after I have finalised a configuration for Flo for a particular market, if anything changes then I have to re-configure. If I am in London it's different to the config I use in France. If I am running out of the cloud I must do a new config for different PCs.



10 comments:

  1. That's a dramatic difference. Are you using the IntraBarOrderGeneration setting within your code, and if so, is it functioning correctly with TradeStation? That might account for the variance, but that's just a relatively uninformed guess.

    ReplyDelete
  2. Jeff, yes! Interestingly, the number of bars in the TradeStation chart is fewer than the MultiCharts fed by eSignal. We make assumptions about data that are not really correct. It's not that the TS data is "bad", it's just that you need to backtest and trade on the same data. It gets more interesting when you use 2 data streams in a chart, 1 for charting and the other for trading.

    ReplyDelete
  3. EL: do you use trendlines? If so, how? thanks!

    ReplyDelete
  4. EL: how's your daughter doing? It's been close to 18 months in the business now.

    ReplyDelete
  5. Anon 11:19, no trendlines although I notice breaks in trend for outside in trades.
    Anon 11:27. Kiki's great. I'm just glad she hasn't headed for Japan yet. It's quite frightening seeing all that's happening to those poor people there.

    ReplyDelete
  6. EL, you are so right. I run TradeStation with an automated entry system very similar to yours, and my statistical results are close to the TradeStation results you posted, but as you've taught, the stats get quite a bit better with dynamic scaled-exit/stop management. I've found that 1 point momentum bars in TS are giving me the best long term results instead of 1.25 or .75.

    [BTW, if you're new here and to trading, listen to what he teaches about backtesting. It's absolutely essential. </soap box mode off]

    ReplyDelete
  7. I notice different results between backtests on different platforms and walkforward testing as well. It seems backtest applications vary greatly on the fill you get. Ninja-Trader and Investor/RT are very optimistic on their fills in backtests. Sierra charts "backtests" are quite good, because it's all done via replay and they only let you sell the bid or buy the ask, this gives a slightly pessimistic results. But in general it's much easier to buy the Bid or sell the ask in a backtest (or most SIM environments) than in real-life.

    ReplyDelete
  8. Anon 20:19, I make sure that I enable the setting that doesn't give me a fill unless the market trades THROUGH my price. Important. Also, I enter on LIMIT orders. With a deep market like ES, I don't get slippage because there is enough on the bid/ask most of the time.

    ReplyDelete
  9. When you enter a position in a retracement trade back to the 33EMA, and it's based on the close of a bar, do you enter a limit order based on the close of the current signal bar or the open of the next bar? When do you enter? I'm not seeing good limit fills with TradeStation immediately after signals--the slippage is at least one tick or, worse, the profitable trades run away while the losers stay, so I'm investigating and evaluating what I might do about this. Thank you.

    ReplyDelete
  10. Jeff, I usually enter Outside In trades leaning against support or resistance during the formation bar and you often know I'm wrong quickly or know I need to double down and have a place already picked out just in case.

    ReplyDelete