How to Backtest Correctly: Strategy VS Backtesting Protocol

AriaS

Well-known member
Messages
363
Likes
121
When we backtest trading strategies, we must be careful and do it in a way that makes our backtests reliable.

For example, we design a strategy and want to backtest it. We might think that the more historical data we use, the better the result will be. So we take three years of data, optimize the strategy, choose the best setup, and assume it will work well going forward on a live account.

This is a common trap. At this stage, we don’t know whether the strategy is genuinely robust or just another curve-fitted result. We haven’t validated it, and we haven’t developed a recurring backtesting protocol that itself has been tested.

The main step we missed earlier is validation (also known as out-of-sample validation). We don’t want our live trading to be the validation period. What if it fails? Isn’t it better to validate on historical data first? The answer is obvious.

So our next steps should be the following.

First, we choose a period to optimize on. This requires experimentation. On one hand, the period must be long enough to produce a sufficient number of trades so the results are statistically meaningful. On the other hand, it must not be too long, because market behavior changes, and we want our tests to be as relevant to the present as possible.

Let’s say we decide on a three-month period. Now we are going to backtest our backtesting protocol. One possible approach is:

  1. Optimize on January 2025 – March 2025 (I suggest ranking results by Recovery Factor).
  2. Validate out-of-sample on October 2024 – December 2024. Test each optimization result, from best to worst, preferably with more trades rather than fewer, until we find a setup with a satisfactory Recovery Factor (for example, above 2.0).
  3. Test this chosen setup on April 2025 – June 2025, as if it were the future. Did it work? Did it make a profit? If yes, then we may be onto something real.
  4. Repeat steps 1–3, shifting everything one month forward.
  5. Repeat steps 1–4.
I hope you can now see what we did here 🙂 Wishing you all success!


My strategy for finding a profitable strategy (which I will attach to all my posts):

Borrow or design a strategy → backtest and optimize to see if it truly works (not MT4!) → validate out-of-sample → start with the smallest possible account → scale → adapt to market changes by repeating steps 2 and 3 as often as possible.

Wishing you all success!
 
Last edited:
What you are saying makes perfect sense.

The real question is: is it enough?

Maybe the market is efficient and there are no predictive signals, just lucky trackrecords and overfitted backtests.
An unpopular opinion in a website named trade2win 😏
 
I believe we can never prove an edge; we can only increase confidence in its existence. It’s like the speed of light — we can never reach it, only approach it. We optimize frequently for a certain market behavior and assume that this behavior has some probability of persisting for a while. In that sense, it’s closer to regime following than to overfitting.
 
Most of the backtesting "protocols" are wrong, written by people who did not pass the learning curve. This post is quite correct, but not the full answer. I think best is to provide the traders with the tools, and let traders make their own conclusions, else we are back to start where you try teach traders to trade the same method.

Visiting various forums from time to stay updated, the problems of traders are very much the same, they are asking for the same. Problem is nothing new has been introduced since 2005, if you ask JP Morgan since the 80és.

It is today essentially impossible by programming, completely impossible using scripting languages and cloud backtesting. So you either quit or find a development platform using visual development, not a quant platform cause you cant brute force your way any more, but old school hands on development where programming has been replaced - 90% brain the rest computing power.

For automated trading and strategy development, the main barrier is the learning curve, 5-10 years by programming, more than a lifetime if using Python. Without any guarantee you will ever be able to develop anything useful. Then comes time to market of the strategies them self, since they have to be developed/modified frequently. Which empathize programming is not an option any more unless you are JP Morgan.

When you post such recommendations, you should at the same time point at a platform where such can operationally be used, else there is no audience.
 
Last edited:
Most of the backtesting "protocols" are wrong, written by people who did not pass the learning curve. This post is quite correct, but not the full answer. I think best is to provide the traders with the tools, and let traders make their own conclusions, else we are back to start where you try teach traders to trade the same method.
I shared a principle, not a method. But I can share my tools too.
It is today essentially impossible by programming, completely impossible using scripting languages and cloud backtesting. So you either quit or find a development platform using visual development, not a quant platform cause you cant brute force your way any more, but old school hands on development where programming has been replaced - 90% brain the rest computing power.
I don't think I even understand what you are talking about. I do in on Metatrader 5: perfect backtesting (from longtime experience), easy coding by LLMs (I use claude) or cheap enough to order on MQL5 website. How I know that my backtesting is perfect: it's 99% identical to my live trading, fast and leads me to be profitable on a live account. What else does anyone need? The learning curve to backtest as I do is several hours, maximum 2 days.
When you post such recommendations, you should at the same time point at a platform where such can operationally be used, else there is no audience.
You are right. Now I did.
 
The trading and backtesting platform does'nt make a significant difference.
Those who sell backtesting tools want you to believe so.
There could be some difference if you scalp m1 chart, not for high timeframes.
 
Back
Top