Is m1 backtesting flawed?

Created at 13 Dec 2017, 08:50
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
PA

paanoik@seznam.cz

Joined 13.12.2017

Is m1 backtesting flawed?
13 Dec 2017, 08:50


Hey.

I'm able to write a bot that makes like 10M from 1K in a year on m1, but when switched to ticks, account get broke quickly.

Tried to straighten code so it would work during t1 same way as during m1, like wait with trades for full minute, calculate hi/lo for previous minutes, etc. But it's getting only worse.

I've read few topics about this but it seems that m1 uses wrong prices for S/L and profit and/or don't count with spread. Did someone make some investigation or should I try to get into it? (As I really want to get that 10M jackpot :D)

T.

 


@paanoik@seznam.cz
Replies

ap11
13 Dec 2017, 12:34

Hi T.,

1. Do you have spread > 0 when backtesting on m1 bars?
Note that when backtesting on ticks, spread is taken from history. As tick data already has spread in it.
But when testing on 1 minute bars, spread is taken from settings.

2. Did you optimize your strategy?
If you did, there is a chance that strategy settings are overfitted. In this case any change in input might show absolutely different result.

Kind Regards,
Andrey

 


@ap11

paanoik@seznam.cz
13 Dec 2017, 16:39

Hi Andrey,

1) Well, I must admit that every time I've change ticks to m1 in settings, I've ignored new spread part inputs .. shame on me. Will look into this more deeply. However, as I've quickchecked .. spread is dynamic and changes between 1 to 5 pips so static value cause m1 backtesting useless.

2) I did .. however as I didn't change default (1.00) spread, it works with same "invalid way" .. actually my discovery was like ... wth, did I really made 100K out of 1K in a year? Let optimize it and find nicer parameters .. ok, not 100K but 13M. :)

 

Anyway .. thanks for your feedback. This helped me a lot.

 

T.


@paanoik@seznam.cz

Drummond360
11 Jan 2018, 14:36

Yes it is absolultey flawed as it uses only the open price...

If you have a trailing stop of 5 pips and the next candle open is 20 pips away (from previous open), then the price action reverses to meet the SL... In a 1 min backtest the result will assume your stop has had a nice smooth trail and register a profit of 15 pips...

If you run the same backtest with Tick data it will likley post a loss as the spot price darts around the candles highs and lows hitting stops along the way...

There's no point in trying to code this out.. When trading live we are at the mercy of the bid and ask levels, we can't ask our brokers to only respect the close or open prices... 

Is there really any need for other options in backtesting? We should all be testing with tick data, with acurate interbank spreads and every tick registering if it hits our stops or entries...

I really hope I'm wrong about all this but I fear I'm not!

 


@Drummond360

paanoik@seznam.cz
13 Jan 2018, 20:53

I think it has it's space here, as there are people who tests long term possitions (like days/weeks). In this case tick testing doesn't make any sense as it will only slow it down.


@paanoik@seznam.cz