Hot summer promotion: 20% off all challenges · Limited time only

Backtesting Trading Strategies: A Practical Guide

How to backtest trading strategies step by step, the biases that ruin most tests, forward testing, and moving from a backtest to a funded account.

Vittorio De AngelisAug 1, 202611 min read
Share article
Backtesting Trading Strategies: A Practical Guide

Backtesting trading strategies means running a fixed set of rules against historical price data to see how it would have performed before any real money is at risk. Done honestly, it is the filter that separates a durable edge from a curve-fit accident. This guide walks through what backtesting is, how to backtest a trading strategy step by step, the biases that ruin most tests, and how a validated system moves from a backtest to a live funded account.

Highlights of this article

  • Backtesting measures how a rule set would have behaved on past data, and forward testing confirms it still holds on new data.
  • Lookahead bias, overfitting, and survivorship bias are the 3 errors that make a backtest look better than the strategy really is.
  • Splitting data into in-sample and out-of-sample segments is the single most useful discipline for honest testing.
  • A backtest is a hypothesis, not a promise. Forward testing on live data is what confirms it.
  • Velotrade allows bots, EAs, and full API access on every account, so a validated automated strategy can be deployed on funded capital without risking personal savings.

What backtesting is

Backtesting is the process of applying a trading strategy to historical market data and recording every trade the rules would have produced. The output is a track record you never had to fund: entries, exits, win rate, average win, average loss, maximum drawdown, and the equity curve over time.

The point is not to admire a profitable chart. The point is to answer one question. Does this set of rules have a real, repeatable edge, or does it only look good because it was shaped to fit the exact data you tested it on?

A backtest is only as trustworthy as the data and the assumptions behind it. Clean historical data, realistic spreads, and honest fees are what separate a useful test from a fantasy. If your backtest assumes perfect fills at the exact price you wanted, it is measuring a market that does not exist.

Why backtesting matters

Most traders fail challenges and blow accounts for the same reason. They deploy a strategy they have never actually measured. Backtesting forces the strategy to defend itself with numbers before it touches capital.

It matters for 3 concrete reasons. First, it sets expectations. If a system produced a 22% maximum drawdown over 3 years of history, you know not to panic at a 10% drop in live trading. Second, it exposes fragility. A strategy that only made money in 1 specific year, or on 1 specific asset, is telling you it has no general edge. Third, it builds discipline. A rule set you can state precisely enough to backtest is a rule set you can follow under pressure.

Algorithmic trading system setup
Backtesting runs a rule set against historical data before any money is risked

Backtesting is also the foundation of any automated approach. You cannot code a bot without first defining exact, testable rules. This is where quant trading starts, and it is worth reading the quant trading pillar for how the wider discipline fits together.

How to backtest a trading strategy step by step

A backtest is only useful if the process is structured. Here is a clean sequence.

  1. Define the rules exactly. Entry conditions, exit conditions, position size, and risk per trade must be unambiguous. If a human has to interpret the rule, a backtest cannot test it.
  2. Choose the market and timeframe. Test on the asset and interval you actually intend to trade. A strategy validated on daily forex bars tells you little about 5-minute crypto.
  3. Gather clean historical data. Use a reliable source with accurate highs, lows, and timestamps. Gaps and bad ticks produce phantom trades.
  4. Set realistic costs. Include spread, commission, and slippage. Skipping these is the most common way to turn a losing strategy into a fake winner.
  5. Run the test over a meaningful sample. Cover multiple market conditions: trending, ranging, and volatile periods. A few hundred trades is a starting point, not thousands of hand-picked ones.
  6. Record the full statistics. Win rate alone means nothing. Log profit factor, maximum drawdown, average trade, and the shape of the equity curve.
  7. Review the trade log, not just the summary. The worst 10 trades usually reveal whether the edge is real or whether a handful of lucky outliers carried the whole result.

The output of this process is a hypothesis with evidence attached. It is not proof that the strategy will work tomorrow.

Common pitfalls that ruin a backtest

Three biases quietly inflate almost every amateur backtest. Understanding them is what makes your testing honest.

Lookahead bias happens when the backtest uses information that was not available at the moment of the trade. A classic case is using the closing price of a bar to decide an entry that supposedly happened at the open of that same bar. The strategy appears to predict the future because, in the test, it literally did.

Overfitting is the most seductive error. You keep adding parameters and filters until the strategy fits the historical data almost perfectly. The result is a system tuned to noise, not signal. It describes the past beautifully and predicts nothing. A strategy with 15 optimized parameters that only worked on 1 dataset is overfit by definition.

Survivorship bias creeps in when your data only includes assets that still exist today. Test a stock strategy only on companies currently in an index and you have silently deleted every company that went to zero. The backtest looks safe because the failures were removed before you started.

Bias What it does How to fix it
Lookahead bias Uses data not yet available at trade time Only feed the model information known at that bar
Overfitting Fits noise with too many parameters Keep rules simple, validate out-of-sample
Survivorship bias Ignores assets that failed or delisted Use point-in-time data including dead assets
Ignoring costs Assumes perfect fills, no fees Add spread, commission, and slippage

In-sample versus out-of-sample testing

The strongest defense against overfitting is to never let the strategy see all your data at once. Split the history into 2 parts.

The in-sample segment is where you build and tune the strategy. You are allowed to optimize here. The out-of-sample segment is data the strategy has never touched during development. You run the finished rules on it once and see whether the edge survives.

A common split is 70% in-sample and 30% out-of-sample. If a strategy earns a 1.8 profit factor in-sample and collapses to 0.9 out-of-sample, it was curve-fit. If it holds a similar profit factor across both, you have real evidence of an edge. The gap between the 2 results is your honesty check.

Ready to get funded? Start your challenge →

Forward testing: the final filter

Out-of-sample testing still uses old data. Forward testing, sometimes called paper trading or a walk-forward test, runs the strategy on live, incoming market data in real time without risking capital. This is the closest thing to reality before you commit money.

Risk monitoring dashboard
Forward testing confirms the backtest held up on live data

Forward testing catches problems a backtest structurally cannot. Real spreads widen during news. Orders slip. Liquidity dries up at exactly the wrong moment. A strategy that assumed frictionless fills in the backtest often behaves very differently when the market is live. If the forward test tracks the backtest reasonably closely, confidence is justified. If it diverges sharply, the backtest was hiding something.

Dimension Backtesting Forward testing
Data Historical Live, real time
Speed Instant, years in seconds Real time, plays out live
Cost realism Assumed, easy to fake Actual market conditions
Main risk Overfitting to the past Requires patience
Best used for Building and validating rules Confirming the edge holds

The sequence that works is simple. Backtest to form the hypothesis. Split in-sample and out-of-sample to check for overfitting. Forward test to confirm the edge survives live conditions. Only then does the strategy earn real capital.

Moving from a backtest to a live funded account

A validated strategy still needs capital to matter, and this is where most independent traders stall. Risking personal savings on a system that is only 6 months into forward testing is exactly the mistake backtesting was supposed to prevent.

A prop firm challenge is a cleaner path. You demonstrate the strategy on a simulated account, and if it meets the target, you trade firm capital and keep a share of the profit. Velotrade runs 1-Step and 2-Step challenges across crypto, forex, stocks, indices, and commodities on the DXtrade platform, with profit splits up to 90% paid in USDC or USDT.

For a tested, rule-based system, Velotrade fits how quant traders actually work. It allows EAs, bots, and algorithmic trading on every account, with full REST and WebSocket API access at no extra fee and no approval step. Most prop firms restrict or ban automation, which makes deploying a backtested bot difficult. Velotrade is one of the few that allows it cleanly.

The rules also suit systematic trading. There is no consistency rule at any stage, so a strategy that makes most of its money on a few high-conviction days is not penalized. The maximum drawdown is static, meaning the loss floor is fixed from your starting balance and never trails your equity up, which makes risk far easier to model in a backtest. There is no per-trade risk cap and no maximum lot size to code around.

If you plan to run automation, the guides on running a trading bot on a funded crypto account and algo and bot trading at a crypto prop firm cover the practical setup. It is also worth understanding static maximum drawdown before you size positions, and reviewing why traders fail prop challenges so your tested edge is not undone by avoidable mistakes.

Velotrade provides education and simulated trading only. It is not a broker, bank, or regulated financial institution and does not provide investment advice. Backtested and past results are hypothetical and are not indicative of future performance.


Frequently Asked Questions

About the author

Vittorio De Angelis

Vittorio De Angelis

Executive Chairman

Former equity-derivatives trader at JP Morgan, Dresdner Kleinwort and Bank of America in London. Later Head of Brokerage at a global broker in Hong Kong.

View author page

Ready to trade with
$200,000 capital?

Up to 90% profit split

Keep most of what you earn

Zero personal risk

Trade with our capital

Instant payouts

Withdraw anytime