Studio notes
Can You Trust a Trading Bot's Profit Chart? 8 Questions to Ask About Its Backtest Before You Buy or Commission One
A trading bot's profit chart is usually a backtest, not real trading. Eight plain questions on overfitting, costs, drawdown and live tests before you trust it.
You have probably seen the ad: a trading bot next to a chart that climbs from the bottom left to the top right, smoothly and almost without a pause, labelled "results over the past five years." It is hard not to do the math in your head and wonder where you would be now if you had switched it on back then.
That chart, though, usually has nothing to do with real money. Most of the time it is a backtest: someone ran the bot's rules over past prices and worked out what would have happened if it had been trading on those days. Backtesting is a useful, necessary tool, but it has a built-in weakness. The person running it has already seen the answers.
This article is for people who don't write code and simply want to know how far they can trust the profit chart in front of them, whether they plan to buy a ready-made bot or have one built. Below are eight plain questions. Asking them takes no expertise, but the answers tell you a great deal. This article is educational only; it is not buy or sell advice and makes no promise of profit.
Backtesting in plain words
A backtest is a trial run of a trading method on the past. Say the rule is: "When the price bounces back after a few days of falling, buy; if it drops by a set amount, sell." Software applies that rule day by day to several years of past prices and hands back a list of hypothetical trades, their gains and losses, and a curve showing how the account balance would have moved.
The real value of a backtest is that it throws out bad ideas quickly. If a method didn't even work on the past, there is no reason to try it with real money. The trouble starts when a good backtest is treated as proof of future success.
Why does the past look so good?
Picture a student who has memorised the answers to last year's exam. Hand them the same paper again and they will score full marks. That score tells you nothing about this year's exam.
A bot can do the same thing. When the builder keeps adjusting the settings to make the past chart look nicer, the bot gradually stops learning a real pattern and starts memorising the random quirks of that particular stretch of history. This is called overfitting, sometimes curve fitting. The result is a bot tailored to the past, not to the future.
This is not just cynicism. In a paper published in 2014 in the Notices of the American Mathematical Society, four researchers, David Bailey, Jonathan Borwein, Marcos López de Prado and Qiji Jim Zhu, showed that impressive simulated results are easy to reach after trying a relatively small number of variations of a strategy, and that the more variations are tried, the more likely it is that the result is overfit. Their most useful point for a buyer: people rarely report how many variations they tried before arriving at the chart they show, so investors usually have no way to judge how overfit it is.
Eight questions worth asking
You don't need the technical details. Ask these questions and pay attention to the answers. A clear answer, even an unflattering one, is a good sign. Dodging is a bad one.
1. Is this real trading or a simulation?
First, ask whether the chart comes from trading real money, from a demo account, or only from a backtest. These are very different things.
In the United States, the Commodity Futures Trading Commission (CFTC) requires the advisers and fund operators covered by its rules to place a specific warning next to any simulated results. In substance it says: these results do not represent actual trading; because the trades were not actually executed, they may have under- or over-compensated for market factors such as lack of liquidity; they were designed with the benefit of hindsight; and no representation is made that any account will achieve similar profits or losses. The National Futures Association (NFA), the industry's self-regulatory body there, puts it even more bluntly in its own required wording: "In fact, there are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved."
These rules apply to that market and that country, not everywhere. The lesson travels well, though: when someone shows you a backtest as if it were a real track record, without any such caveat, it is a reason to be more careful.
2. How many versions did you try before settling on this one?
This may be the most important question and the one asked least often. If the builder tested dozens or hundreds of settings combinations and is showing you the best one, the chart is closer to a lottery winner than to proof that a method works.
An honest answer sounds something like: "We tried roughly this many versions and picked this one because it behaved fairly consistently across different periods." If the reply is "it came out like this the first time," or they simply don't know, you have every right to be sceptical.
There is a simple follow-up: ask what happens if the settings are changed a little. A sound method usually gets a bit worse or a bit better when its numbers shift slightly. A method that swings from impressive profit to loss with the smallest tweak has most likely just memorised the past.
3. How did it do on data that played no part in building it?
The main defence against overfitting is to set part of the data aside and test the bot on it only once, at the very end. This is called out-of-sample data, like an exam whose questions the student has never seen.
A fuller version is walk-forward testing: the bot is tuned on one period, tested on the following period it has not seen, then the window moves forward and the process repeats. It guarantees nothing, but it is far more honest than one seamless chart.
So ask: which part of this chart was used to build the bot and which part to test it? If the answer is that all of it did both jobs, the chart really only shows that the bot memorised the past well.
4. Are the costs included?
In a backtest, every trade fills at exactly the price shown on the chart. Real markets don't work that way. Three costs are always there:
- Commission: what the broker or exchange charges for each trade.
- Spread: the gap between the buying and selling price at any moment. You always buy a little higher and sell a little lower.
- Slippage: the gap between the price you expected and the price your order actually filled at, especially in fast markets or around major news.
For a bot that trades several times a day, these small costs add up and can eat the entire paper profit. For performance figures from real accounts, the NFA requires them to be shown net of all commissions, fees and expenses. Ask how much cost per trade the backtest assumed and whether that matches the account and market you will actually use. A good follow-up: "If costs doubled, would it still be profitable?"
5. What did its worst stretch look like?
Promotional charts are usually shown zoomed out, so the overall slope stands out and the dips disappear. Ask how large the biggest fall from a peak to the following low was. This is called drawdown. Then ask how long the longest period was in which the account stayed below its previous high.
These two numbers matter more than the annual return, because they tell you what you would actually have to sit through. The NFA's wording makes a subtle point here: hypothetical trading involves no financial risk, and the ability to withstand losses or to stick with a method through a losing spell is something a simulation cannot fully capture. On paper, a flat year is easy to tolerate. With your own money, many people switch the bot off halfway through.
If you want to think more about capping the loss on each trade, the Behvandi article "Where Should Your Stop-Loss Go? Why So Many Traders Set It Too Tight, or Not at All" covers it.
6. Did the bot see anything that wasn't known yet?
One of the most common and best-hidden backtest errors is look-ahead bias: in the simulation, the bot used information that would not have been available at the moment of the decision. A simple hypothetical: the bot decides to buy at 10 a.m., but its calculation uses that day's closing price, a price nobody knew at 10 a.m. A bot like that looks like a fortune-teller in the backtest, and the fortune-telling vanishes in the live market.
You don't have to find this error yourself. Just ask: "Are you sure the bot only used information that was available at each moment? How did you check?" An experienced builder takes that question seriously and has an answer.
7. Is the data complete, or only the survivors?
Survivorship bias means looking only at what is still around and forgetting what dropped out. The classic stock-market example: if a bot is tested only on the shares listed today, companies that went bust or were delisted along the way are left out, and the results look better than reality.
There is a version of this closer to home for a buyer: a seller with several bots or several accounts may show you only the best one. So ask: "Is this your only bot, or your only account? How did the others do?" For real-account performance, the NFA also requires the figures to be representative of all reasonably comparable accounts over the same period, not a hand-picked selection.
8. In a trial run, how closely did it match the backtest for the same days?
The last question is perhaps the most convincing one: has the bot run for a while on a demo account, or with a small amount on a real account? This stage is called forward testing, because the bot trades days that hadn't happened yet when it was built.
The key point isn't only whether that period made or lost money. What matters is how closely the trial results match a backtest of the same weeks. If the backtest for those days shows a profit and the live run shows a loss, something in the simulation is out of touch with reality: costs, execution speed, or one of the errors above. Keep in mind that demo accounts usually don't fully reflect real slippage and fills either. That is why the next step is a real account with an amount you could lose without it upending your life.
Warning signs in the chart itself
Sometimes the chart tells you things before you even ask:
- A curve that is too smooth: real markets go up and down. A chart with almost no dips either has a flaw in its simulation or is hiding a risk.
- A short period or few trades: a few months of data, or a few dozen trades, isn't enough to judge. The bot may have been tested in only one kind of market, such as a long rising stretch.
- Increasing size after losses: some bots raise the trade size after every loss, doubling it for example, so that the first bounce in price recovers the earlier loss. This tends to produce a very smooth, attractive chart, because most of the time it works. The arithmetic is simple, though: after seven losses in a row, the next trade is 128 times the size of the first. One long run against the position can wipe out a large part of the account in one go.
- A hand-picked starting point: if the chart begins right at the bottom of a market, almost any buying method looks good. Ask what happens if the start date is moved a few months earlier or later.
- No answers: if the seller won't answer any of the questions above and keeps pointing back at the same chart, that is the answer.
The CFTC's warnings about trading systems and bots also remind readers that no trading system can guarantee profits, and that claims such as "100 percent win rates" deserve suspicion.
A hypothetical example: two reports
Imagine two offers in front of you. The first has a very smooth chart with a dazzling annual return. When you ask how many versions were tried, how costs were handled or what the worst drawdown was, you are told that "the chart speaks for itself."
The second has a more ordinary chart with a few obvious dips. But it comes with an explanation of which period was used to build the bot and which to test it, how much cost was assumed per trade, how deep the worst drawdown was and how many months it took to recover, and a few weeks of trial running set side by side with the backtest for the same days.
Neither guarantees future profit. But the second at least lets you decide with your eyes open. The first only asks you to believe.
A short note on risk
No backtest, however careful and honest, guarantees the future. Markets change, and a method that worked for years may stop working tomorrow. Trading with a bot, like any trading, can lead to losses, including the loss of a large part of your capital. Only use money you could lose without it upending your life, and if you don't understand something, don't put money in until it is clear to you.
Final word
Backtesting isn't the enemy; it is a good tool for discarding bad ideas. It becomes deceptive when it is sold as a real track record, or when we treat it as proof of future success ourselves. These eight questions help you tell an honest test from a decorative chart.
If you are curious about the more technical side of these traps, read "The Deceptive Backtest: Why a Trading Bot That Wins on History Loses in Live Markets", and if you are still deciding whether to build or buy a bot, "Seven Things to Settle Before You Build or Buy a Trading Bot: From Writing the Rule to Testing and Controlling Risk" will help. Both are on the Behvandi website.
At Behvandi Studio, this is how we build and test trading bots: with realistic costs, with data held back for testing, and with reports that show the worst days too. If you have a bot whose backtest you would like a second pair of eyes on, or an idea you want to check is worth building, we would be glad to hear from you through the "Contact us" page on the Behvandi website.
Sources
- eCFR — 17 CFR § 4.41: the CFTC's required statement for simulated or hypothetical performance
- NFA — Compliance Rule 2-29: required disclaimer for hypothetical results; real-account performance net of all costs and representative of all comparable accounts
- CFTC — Fraud Advisory: Commodity Trading Systems Sold on the Internet
- CFTC — Customer Advisory on trading bots and promised returns
- Bailey, Borwein, López de Prado & Zhu (2014) — Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance, Notices of the AMS 61(5)
- Bailey, Borwein, López de Prado & Zhu (2017) — The Probability of Backtest Overfitting, Journal of Computational Finance 20(4)
Comments
No comments yet. Be the first to write one.