Result difference for Backtesting and Optimization for the same bot with the same parameters

Created at 11 Apr 2015, 01:33
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!
OT

ottopost

Joined 11.04.2015

Result difference for Backtesting and Optimization for the same bot with the same parameters
11 Apr 2015, 01:33


Hello everybody,

I am quite new to cAlgo and I have faced a problem. After the Optimization I apply parameters and do a Backtesting for the same period of time. Timeframe, Symbol, Comission, Spread - everything is the same in both cases. But! Number of trades differs! As a consequence, results for backtesting and optimization are completely different. Optimization has been running in Generic algorithm regime. 

It brings me to the idea, that Optimization is not a Backtesting evaluated many times:) Kindly asking for any information concerning this topic.

Looking forward to your replies!

Thank you! 

 


@ottopost
Replies

WhiteSage
17 Apr 2015, 19:34

Under Backtesting and Optimization is a little gear, in there is a pull down menu for 'Data'.
Be sure both are set to the same value (tick data, or 1m) and also be sure both are set to exactly the same start and end dates.
Hopefully that helps.
 


@WhiteSage

WhiteSage
17 Apr 2015, 19:50

I just discovered that during an Optimization the initial length of the marketSeries (and therefore indicators) is MUCH MUCH shorter than a trading window or a Backtest.

Print("Market Length " + MarketSeries.Open.Count);

Optimization: Market Length 122
Back test:  Market Length 8157

If you have any indicators that have long MA's uses Min or Max values or has accumulation the results will be different.

 


@WhiteSage