Is this a Good Result for BackTest and Forward Test ?

 

Hi everyone,

I created an MT5 Expert Advisor (EA) that uses 2% risk management and two indicators (Moving Average and MACD).

I ran an optimization using 3 months of backtest data and 3 months of forward test data on XAUUSDc (M5 timeframe).

Results:

  • Backtest Profit: 15,714 USD
  • Forward Test Profit: 24,089 USD

As you can see, the forward test profit is much higher than the backtest profit, which seems unusual.

I have attached screenshots of the EA settings, Inputs, optimization results, and forward test results.

I am concerned that the EA may lose money in the future.

My questions are :-

  1. Is this considered a good optimization result?
  2. Is it normal for the forward test profit to be higher than the backtest profit?
  3. Should I increase the optimization period (for example, 1 year of backtest data + 6 months of forward test data) instead of using only 3 months + 3 months?
  4. Should I modify or completely change the EA strategy ?
  5. Based on these results, What should I do ?


Settings :-
Settings


Inputs (Start, Step & Stop) :-
Input 1

Input 1

Innput 2

Optimisation Results :-
Opt Result

Forward Results :-
For Result

Files:
TEST.mq5  59 kb
 
Consider connecting the results to myfxbbok and viewing the report there.
 
Forward profit beating backtest profit isn't necessarily good news; it usually just means your forward window happened to catch favorable trades, so I'd extend both periods to at least 6-12 months before drawing any conclusions.
 

Based on screenshot #1 in the OP, testing was performed on "Open price only." That should only be used where an EA solely references open prices.

 
Ryan L Johnson #:

Based on screenshot #1 in the OP, testing was performed on "Open price only." That should only be used where an EA solely references open prices.

Should I run optimization and test the EA using "Every tick based on real ticks" instead of "Open Price" ?
 
Smart Algotrade #:
Forward profit beating backtest profit isn't necessarily good news; it usually just means your forward window happened to catch favorable trades, so I'd extend both periods to at least 6-12 months before drawing any conclusions.
I understand your point. Do you think using 1 year of historical data for optimization and 6 months of data for forward testing is a good way to start ?
 
Vikram J U #:
Should I run optimization and test the EA using "Every tick based on real ticks" instead of "Open Price" ?

Ideally, yes. As a potential caveat, a lengthy test based on real ticks can be burdensome on hardware. If you have a beastly pc, network farm, or remote agents, the burden is eased. Some EA's, especially EA's that trade on bar close, can be reliably tested on OHLC prices wherein stops are approximated in the Tester.

 
Vikram J U #:
I understand your point. Do you think using 1 year of historical data for optimization and 6 months of data for forward testing is a good way to start ?

Personally, I'm not a big fan of optimizing simple EA's. In your case, you have a moving average and a MACD which is relatively simple. I tend to question whether I can actually randomly select the right sample period and forward period for such an EA. I like to refine my entire EA to be profitable in the long-term without optimizing.

A more advanced machine learning EA, for example, is a horse of different color. Therein, the EA could potentially statistically select the right sample period and forward period to apply. In this way, the EA could control its own rolling optimizations. I recall having seen an Article regarding that on this website. It was called a self-optimizing EA.

 
One thing out of many things, you are testing at 30ms latency whereas many EAs must be ran on VPS.... and VPS provides less than 1ms latency environment... so you must test at a realistic environment. 
 
Andrew Pun Magar #:
One thing out of many things, you are testing at 30ms latency whereas many EAs must be ran on VPS.... and VPS provides less than 1ms latency environment... so you must test at a realistic environment. 
As the OP simulated a 30ms latency, then that is presumably the OP's real client-side latency as is appropriate for testing. I don't see where the OP mentioned going live on a VPS.
 
Ryan L Johnson #:
As the OP simulated a 30ms latency, then that is presumably the OP's real client-side latency as is appropriate for testing. I don't see where the OP mentioned going live on a VPS.
The OP is using 5min timeframe, so the algo bot is prolly a scalper.... and scalping EAs must use VPS to stay accurate or else it will lose it's touch Anyways we must understand what actually the OP is trying to do. For me personally, 30ms latency is too slow.