Backtest a Trading Strategy in Plain English (No Code)
Short answer: write your setup as rules a stranger could follow (market, timeframe, entry, stop, target and when not to trade), run those rules over years of history with costs included, then check four things: how many trades it took, the result per trade in R, the worst losing stretch, and whether it beats random entries. You do not need to code any of it. You need clear rules.
What a backtest is, and what it is not
A backtest asks one question: if I had followed these exact rules over this stretch of history, what would have happened? It is a way to throw out bad ideas cheaply and to learn how a setup behaves, including how ugly its losing streaks get.
It is not a forecast. Markets change, and past results do not predict future ones. A good backtest tells you a setup is worth practising. It never tells you it will make money.
Step 1: Write the setup as rules, not a feeling
Many setups live in a trader's head as a feeling: buy the pullback in an uptrend. A backtest needs every word pinned down. Use this checklist:
- Market and timeframe: which contract, which bar size.
- Entry: the exact condition that triggers a trade.
- Direction: long only, short only, or both.
- Stop: where it goes, as a distance you can measure.
- Target or exit: a fixed multiple of risk, a trailing stop, a time exit or an opposite signal.
- Filters: sessions, days or conditions when you do not trade.
- Size: a fixed risk per trade, so every result can be read in R.
Here is the same idea, first vague and then clear.
Vague: "buy the pullback when NQ is trending."
Clear: "On NQ 1-hour bars, go long when the 20 EMA crosses above the 50 EMA. Stop at 2 x ATR(14). Target 2R."
If a friend could take the trades from your sentence without asking you a single question, it is ready to test.
Step 2: Choose the test period and include costs
Test over a long enough stretch to include different conditions: trending months, choppy months, quiet weeks and news weeks. A setup that only worked in one kind of market is a bet on that market coming back.
Always include costs. Commissions and slippage are paid on every trade, win or lose. A setup that makes a little per trade before costs can lose after them, and setups that trade often feel this the most.
Read results in R, the amount risked per trade. R lets you compare setups fairly and maps straight onto prop account rules, which are limits on how much you can lose.
Step 3: Run it
There are three ways to run a backtest.
By hand. Scroll through charts bar by bar and record each trade. It teaches you a lot, but it is slow, and it is easy to see trades that fit what you hoped for.
With code. Write the rules in a scripting language and run them on data. It is fast once it works, but it means learning to code and debugging every rule.
In plain English. Describe the setup in words, let the software read it into rules, check that the reading matches what you meant, then run it. This is what Test in Lemnal does: you write the setup in plain English, it shows the rules it read, and it runs an automated backtest with trust checks. You can name the strategy, save it, and run it again with changed settings.
Whichever way you choose, always check the rules that actually ran. A backtest of the wrong rules is worse than no backtest.
Step 4: Read the results like a skeptic
The total result is the least useful number on the page. Look at these first.
- Number of trades. Ten trades tell you almost nothing. You want enough trades that a few lucky ones cannot carry the result.
- Result per trade in R, after costs. This is the setup's expectancy. A small positive number after costs is a fair start.
- Deepest drawdown and longest losing streak, in R. Compare these with your prop account's drawdown in R. If the backtest's worst stretch would have ended your account, the setup and the account do not fit.
- Consistency over time. Split the test period into thirds. Did each third make money, or did one stretch carry everything?
- Dependence on the best trades. How much of the total came from the best three trades? If removing them wipes out the result, you are relying on rare outliers.
- Random-entry control. Would random entries with the same exposure have done as well? Test runs 400 random-entry versions and shows how many of them your rules beat. The random versions pay no costs while your rules do, so the comparison leans against your rules. If random entries do just as well, the result likely came from the market's drift, not your entry.
Step 5: Change one thing at a time
Once you have a first result, it is tempting to tweak until the numbers look great. That is called overfitting: shaping the rules around the past until they describe history instead of a repeatable setup.
Change one setting, re-run, and write down what changed. For example, add a rule like "move my stop to break even at 1R" and compare the two runs side by side. We did exactly that in does moving your stop to break-even help, and the result is worth a look before you add the rule to your own trading.
Fewer, simpler rules are less likely to be fitted to the past.
Common backtesting mistakes
- Testing only on the period you built it on. Keep a stretch of history aside and test on it last.
- Leaving out costs. Small edges disappear fast.
- Too few trades. A great result on 15 trades is a coin toss with a story.
- Lookahead. Using information that was not available at the moment of the trade, such as the day's high before the day ended.
- Same-bar guesses. When a stop and a target sit inside the same bar, a bar-based test has to assume which came first. Assume the worst: Lemnal's engine always takes the stop.
- Quietly changing the rules. If you change a rule after seeing the results, it is a new strategy. Test it again from scratch.
From backtest to practice
A backtest is only the first step. Next, practise the setup, log every trade and compare your real results in R with the backtest. If your live trades look nothing like the test, the gap is usually in how the rules are being followed, and a journal shows you where. See how to keep a trading journal you will actually use and how to pass a prop firm evaluation.
General advice warning: The information on this site is general in nature only. It does not take into account your objectives, financial situation or needs, and it is not a recommendation to buy, sell or hold any financial product. Before acting on it, consider whether it is appropriate for you and seek independent professional advice. Trading futures carries a high risk of loss, and losses can exceed your deposit. Backtest results are hypothetical and do not predict future results.