Backtesting Basics: Building a Repeatable Process Without Curve-Fitting
Shaanti Trades
Research Team
5 min read read
Backtesting Basics: Building a Repeatable Process Without Curve-Fitting
Most retail backtests fail for a boring reason: the process was never repeatable. The trader changes one parameter, reruns the test, likes the new equity curve, changes another parameter, and repeats until the curve looks beautiful. That is not validation. That is curve-fitting with extra steps, and it usually collapses the moment the market stops cooperating with the fitted parameters.
This article is not about what a moving average is. It is about a decision every systematic trader faces: how do I know that what I just tested is a rule and not a coincidence? We will walk through sample size, out-of-sample checks, transaction cost assumptions, and the overfitting traps that hit simple rules hardest, because simple rules are exactly where traders are tempted to add "just one more filter."
Start from a decision, not a definition
The decision is this: before you risk a single unit of capital on a rule, you need a process that a stranger could reproduce from your notes and get the same trades. If your backtest cannot be reproduced by someone else, it is not evidence. It is a story.
In our videos on the Trading 002 channel, and in the way we build robots such as IndexPulse3, DaxPulse and PropGuard, the practice is always the same: a rule is written down in plain language first, then coded, then tested on data the rule has never seen. The rule is fixed before the test begins. We treat that as a discipline, not a result. Nothing about writing a rule down tells you it will work; it only tells you whether you are testing the same thing twice.
Sample size: enough trades to say anything at all
A backtest with 12 trades is an anecdote. A backtest with 40 trades is a small sample. A backtest with several hundred trades across different market regimes starts to be something you can reason about. The exact number depends on the rule, but the principle is fixed: the fewer trades, the wider the range of outcomes that are pure luck.
Practical anchors we use:
Out-of-sample testing: the only honest test
The core idea is simple. You develop on one slice of data (in-sample), then you evaluate on a different slice the rule has never touched (out-of-sample). If the rule only works in-sample, you have fitted noise.
A workflow that survives contact with reality:
1. Fix the rule in writing, including entry, exit, stop and position sizing.
2. Reserve a final holdout of data you will not look at until the very end. Write down the date range and do not touch it.
3. Develop on the earlier data. Any parameter choice happens here.
4. Run one out-of-sample check. Not five. One. Every additional look erodes the out-of-sample property.
5. If it fails out-of-sample, do not re-tune on the holdout. Go back, form a new hypothesis, and reserve a new holdout.
Walk-forward testing is the same logic applied repeatedly: optimise on a window, test on the next window, roll forward. It is more work, but it mirrors how a rule actually gets used, one unseen period at a time.
Transaction costs: the assumption that decides everything
A backtest without costs is a fantasy. Every trade pays something: spread, commission, swap or financing, and slippage. If your rule trades frequently, costs are not a detail; they are the strategy.
Three cost assumptions to make explicit before you test:
A worked example: the arithmetic of one trade
Suppose a trader risks a fixed amount per trade on an index CFD-style instrument. The account is 10,000 EUR, risk per trade is 1% (100 EUR), the stop distance is 20 points, and the instrument's point value is 1 EUR per point per lot. Position size follows from the risk budget, not from a feeling.
| Item | Value |
|---|---|
| Account equity | 10,000 EUR |
| Risk per trade (1%) | 100 EUR |
| Stop distance | 20 points |
| Value per point per lot | 1 EUR |
| Position size (100 / (20 × 1)) | 5 lots |
| Spread cost assumed (2 points × 5 lots) | 10 EUR |
| Slippage assumed (1 point × 5 lots) | 5 EUR |
| Total cost on the trade | 15 EUR |
| Loss if stop is hit, costs included | 115 EUR |
Two lessons fall out of that table. First, the real risk is not 100 EUR; it is 115 EUR once costs are counted, so the true risk per trade is closer to 1.15%. Second, on a rule that trades often, those 15 EUR compound quickly. A rule that looks marginal before costs is usually negative after them.
Margin matters too. Position size is capped by available margin, and margin requirements can change. A backtest that assumes unlimited leverage is testing a portfolio no retail account can actually hold.
The overfitting traps that hit simple rules hardest
Simple rules are vulnerable precisely because they are easy to tweak. The most common traps:
A useful discipline: count your attempts. If you tested 200 variations and one looked good, that one is expected by chance alone. Keep a log of every test you ran, not just the winner.
Actionable checklist
What we cannot verify
This article does not prove that any specific rule, parameter set or instrument will be profitable. It does not establish a required sample size that guarantees statistical significance, because that depends on the rule, the market and the data quality. It does not verify the data source you use, and vendor data can contain gaps, errors and different session definitions. It does not claim that out-of-sample testing eliminates overfitting; it only reduces one specific form of it. And it does not claim that our videos, robots or live signals on [our home page](https://marketsignals24.com/en) constitute validated performance. They are a practice and a process, not evidence of future results.
Where this fits in our work
On the Trading 002 channel, each video covers one strategy, and the recurring theme is process: define the rule, fix it, test it on unseen data, and be honest about costs. Our robots on the MQL5 Market, IndexPulse3, DaxPulse and PropGuard, follow the same discipline in their design: explicit rules, explicit risk, explicit assumptions. If you want to see how we structure the workflow around signals and tools, the [pricing page](https://marketsignals24.com/tarifs) and the [blog](https://marketsignals24.com/blog) go deeper, and you can reach us via the [contact page](https://marketsignals24.com/contact).
Risk warning
Trading leveraged instruments, CFDs, forex, crypto and turbo products carries a high risk of loss and is not suitable for everyone. You can lose more than you initially deposit in some products, and past behaviour of any rule, backtest or model says nothing about future outcomes. Costs, spreads, slippage and margin requirements can change without notice. Never risk capital you cannot afford to lose, and treat every backtest as a hypothesis to be tested, not a promise to be trusted. Please read the full [risk disclosure](https://marketsignals24.com/trading-risks) before acting on anything described here.
About the author
Written in the voice of a trader with nine years of market experience, more than a thousand students trained and over 220 videos published on the Trading 002 YouTube channel. More background is available on the [about page](https://marketsignals24.com/about).
Ready to Trade Smarter?
Get AI-powered signals delivered in real time. Join thousands of traders already using Market Signals24.
Start Free TrialPour aller plus loin
Trading Education
Comprendre avant de risquer
Guides gratuits et sans paywall : RSI, effet de levier, backtesting, gestion du risque. La base méthodologique qui manque à 90 % des traders.
Trade Comparator
Choisir un courtier sans se tromper
Frais, spreads, dépôt minimum et régulation comparés côte à côte. Aucun classement sponsorisé.
Imparami
Progresser avec un tuteur
Cours particuliers en ligne avec des tuteurs vérifiés : langues, mathématiques, finance. Séance d'essai possible.