Backtesting EA with Gold Futures

 

Hi all,


I'm trying to backtest my algorithm which trades on Gold futures connected to COMEX. I am using the every tick based on real ticks option but I seem to be getting innacurate results which are simply too good to be true. I know this for a fact because it says my system wouldn't have lost a single trade in the last few months, despite the fact that on my live account, there have been a couple of losses. 


What confuses me about the tick data is that it doesn't seem to give full visibility on the order book. For example it doesn't give 'time and sales' data which is available using the market depth tool. Taking this into account, how can this accurately backtest a strategy when it doesn't know if the volumes on the right hand side are buys or sells? My strategy is sensitive to slippage so it's very important for me to get an accurate read on a backtest. 


Am I missing something here? I do not claim to be an expert so please correct me if any of the statements I have made are incorrect.


Tick Data

 
George McCormick:

What confuses me about the tick data is that it doesn't seem to give full visibility on the order book. For example it doesn't give 'time and sales' data which is available using the market depth tool. Taking this into account, how can this accurately backtest a strategy when it doesn't know if the volumes on the right hand side are buys or sells? My strategy is sensitive to slippage so it's very important for me to get an accurate read on a backtest. 

You're right - there is no history of the order book (the market depth), only ticks and quotes (bars). You may ask MQ to implement this, I think, or probably use 3-d party sources.

 
Stanislav Korotky:

You're right - there is no history of the order book (the market depth), only ticks and quotes (bars). You may ask MQ to implement this, I think, or probably use 3-d party sources.

How can they claim accuracy of backtesting and inclusion of slippage etc if this crucial feature has been overlook? Honestly i'm quite surprised this isn't included already...considering it's already on the platform...

 
George McCormick:

How can they claim accuracy of backtesting and inclusion of slippage etc if this crucial feature has been overlook? Honestly i'm quite surprised this isn't included already...considering it's already on the platform...

Can you enlighten me, which type of algorithm exactly you use (in general terms)? Do you use market depth, or time and sales, or both, and how?

The problem with "slippage" is that it depends from many external factors, such as effective connection bandwidth in a realtime moment, so even with a history of the book or "time and sales" you'll not get exact state of those external factors in the tester and the "slippage" will differ.