Backtest data is different from live data

Created at 11 Nov 2017, 10:32
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!
lec0456's avatar

lec0456

Joined 14.11.2012

Backtest data is different from live data
11 Nov 2017, 10:32


I was backtesting using OctaFX but the backtest data was different than the live data. For example on Nov. 7 2017 at 16:15(UTC+3) opening pice for backtest is 1.15621 but live is 1.15617.

It gives me different results between live bots and the backtest which affects the ability to write a successful algorithm. Why is that happening?

 


@lec0456
Replies

PanagiotisCharalampous
20 Nov 2017, 10:40

Hi lec0456,

Can you please check if the difference between the backtesting data and the live data is constant i.e. 0.4 pips? It could be that there is some additional markup on the price from your broker.

Best Regards,

Panagiotis


@PanagiotisCharalampous

lec0456
21 Nov 2017, 06:04

Yes it seems like the live data is consistently .4 pips under the backtest data. Itcompletely destroys the value of backtesting if the data is different. 

One thing I noticed was that the server identified for cAlgo and cTrader are different. One points to Amsterdam-2 and the other Amsterda-4.

But in cAlgo, if you look at the live trading tab, it is also different from the backtest tab within the same cAlgo App. So, the server it is using doesn't seem to be making the difference.

 

 

 


@lec0456

lec0456
22 Nov 2017, 21:45

Look at the response from the broker below.  Incredible...beware! 

 

Sam (OctaFX)

Nov 22, 08:44 EET

Dear Louis Ernest Cespedes,

As I already said, I will forward your feedback and Spotware company might integrate quotes from our liquidity providers in future.
But at the moment there is nothing we can do right now and it remains the same way.

Thank you for understanding.

Best regards,

Sam
Trade Compliance Department

Louis Cespedes

Nov 22, 08:33 EET

That is not how any other broker operates. Your backtest data should come from the same place. Backtesting an algorithm should provide exactly the same results as the actual market when using tick data. You can't design an algorithm using approximate data. There is real money at stake here.

________________________________

Sam (OctaFX)

Nov 22, 08:18 EET

Dear Louis Ernest Cespedes,

Please note that backtesting in cAlgo is not using quotes from our liquidity providers. That's why you may see such difference in prices.
I can forward your feedback to the Department in charge but at the moment these prices are different.
Bear in mind that backtesting is aimed to let you test your cBot’s performance in general.

Best regards,

Sam
Trade Compliance Department


@lec0456

PanagiotisCharalampous
23 Nov 2017, 11:12

Hi Louis,

Maybe there was a misunderstanding here in the communication with your broker. Indeed, Spotware cAlgo does not use your broker's feed as each broker has a different feed. However your broker's cAlgo gets the feed of the broker. In your case the discrepancy is not a result of a different feed but due to a cAlgo issue that results to a steady difference in the spread (in your case 0.4 pips). It is the same feed with 0.4 pips difference in the price. In general, this should not affect a lot your cBot's behavior. An idea could be to compensate for the steady difference with additional commission in backtesting settings i.e.+ $40. 

In any case, cAlgo team has reviewed the issue and it will be fixed a future release. 

Best Regards,

Panagiotis


@PanagiotisCharalampous

lec0456
23 Nov 2017, 19:24

It definately affects the behavior of the results of the cBot. It can change the average price of multiple positions and cause them not to close in realtime while closing just fine during a backtest.

I knew the agent's response was not accurate, but I was not going to agrue with him.  I don't think I could convince him that the feed was his data.

However, if cAlgo has confirmed that there is an issue that can be fixed, that is great news. I am curious to know what exactly is the issue?

 


@lec0456