Two operators, opposite calls
One operator sees a profitable backtest and approves a strategy for live orders. Another runs the same code in forward paper trading, sees limit orders miss their fills, and blocks deployment. Both calls can be reasonable: the first trusts the model, while the second has tested whether the agent can turn a signal into an order under current conditions.
Backtesting estimates how a strategy might have performed on historical data. Forward testing runs it against new market data, usually in a paper account, so its decisions and order handling face a live sequence of events.
Neither test proves future profitability. Together, they reveal different failure modes. This week's task is to compare those modes using the same strategy version, market universe and risk settings.
Write down the decision each test is meant to support. A backtest can reject a weak signal or expose sensitivity to costs. A forward test can reveal stale data, duplicate orders, rejected requests and fills that the simulator made too easy. Do not treat a paper PnL curve as a live performance estimate.
Freeze the replay before comparing
Start by recording the exact inputs and settings. Save the code commit, configuration, dependency versions, symbol list, calendar, data vendor and time zone.
Keep a separate record of every parameter change. If a strategy changes during the week, start a new comparison instead of blending the results.
Check that the historical replay uses information available at the decision time. A bar's close cannot be used to trade at that same close unless the order could actually have been submitted before the close.
For intraday systems, inspect timestamp conventions, delayed or corrected ticks, bid and ask quotes, and whether the feed includes halted or illiquid periods. For equities, account for splits, dividends, delistings and survivorship bias.
Run a short data audit before using the backtest as a baseline:
- Compare timestamps and market sessions across the strategy, feed and broker logs. Confirm daylight-saving changes and exchange holidays.
- Check for missing intervals, duplicate events, crossed quotes and outlier prices. Record how the programme handles each one.
- Recalculate entries and exits from bid and ask, not only mid or last price. Include commissions, exchange fees and financing where relevant.
- Repeat the replay with a plausible delay, wider spread and higher fee. Note whether returns or trade selection change materially.
Keep an untouched period for validation. If many parameter combinations were tested on the same history, the best result may reflect selection rather than a durable edge. A practical check is to compare performance across separate market regimes and to record how many variants were tried, not just the winning configuration.
Exercise order mechanics, not just signals
A backtest that assumes every order fills at the displayed price will usually overstate execution quality. Specify order type, time in force, price rounding, minimum quantity and what happens when an order is only partly filled.
For limit orders, a candle touching the limit is not proof that the agent would have joined the queue or received a fill. For marketable orders, model spread, fees and market impact, then test the assumptions against forward observations.
The table gives typical ranges for highly liquid instruments in normal market conditions. They are working reference points, not universal service levels. Asset, order size, broker, venue and volatility can move results outside them. Measure the same definitions in all three environments.
| Measure | Backtest, typical range | Forward paper, typical range | Live, typical range |
|---|---|---|---|
| Order acknowledgement round trip | 0-1 ms if simulated | 50-300 ms | 50-500 ms |
| Marketable-order cost versus mid, liquid instruments | 0.5-2 bps if modelled | 0.5-3 bps if modelled | 1-5 bps in normal conditions |
| Small marketable orders filled promptly | 100% in a basic full-fill model | 95-100% | 90-99% |
| Limit orders with partial or no fill | 0-10% with a queue model | 5-30% | 10-50%, depending on queue and price |
These ranges are broad by design. A paper system may simulate fills without representing venue queue position, routing or market impact. Record what the environment actually models. An agentic paper trading environment such as this platform for agent testing can be one place to exercise the agent loop, but its behaviour still needs comparison with the intended broker and venue.
Test the order state machine explicitly. After a timeout, the agent should query order status before resubmitting. Otherwise, an accepted order with a lost acknowledgement can become a duplicate. Test partial fills, cancel/replace races, rejected orders, rate limits, disconnected sessions and market closures. Verify that the agent reconciles its internal position against broker-reported positions after reconnecting.
Run this week's forward test
Choose a fixed set of symbols and run the strategy unchanged in paper mode during regular market hours. Use the same sizing and risk limits intended for deployment, but set a hard notional cap.
Log each decision, quote used, request, response, order update, fill, position and risk check with a common timestamp. A decision log without broker events cannot explain execution differences.
Run a daily review using one checklist:
- Match every intended order to an acknowledgement, rejection, cancellation or unresolved status. Investigate duplicates and orders without a final state.
- Compare signal-time bid and ask with the order price and any simulated fill. Track spread cost, slippage, fill rate, partial fills and time to acknowledgement.
- Check positions and cash against the paper account after each session. Confirm that cancels and partial fills update exposure correctly.
- Inject controlled faults in a non-live environment: delay a response, return a rate-limit error, disconnect the feed, and restart the agent with open orders. Verify safe recovery.
- Confirm that maximum position, order size, daily loss and stale-data limits block new orders. Test the kill switch and check that it cancels working orders where supported.
Set thresholds before looking at the week's results. For example, flag any unexplained order-state mismatch, any duplicate submission, or any exposure above the configured cap.
Choose latency and slippage limits from the strategy's expected holding period and edge, not from a generic benchmark. A strategy seeking a few basis points cannot tolerate the same execution error as one targeting a large move over several days.
Use the paper account to validate software behaviour, not to claim a live Sharpe ratio. Simulated fills do not establish queue priority or market impact. If the target broker offers a sandbox, check its order semantics and error responses, but do not assume that sandbox prices or fills reproduce live conditions.
Decide what evidence changes the call
Compare backtest and forward test at the order level as well as by daily PnL. For each signal, ask whether both systems saw the same data, made the same decision, sent an equivalent request and recorded a comparable fill. Classify differences as data, strategy, execution or risk-control issues. Fix the cause before retuning the strategy.
Do not require a short forward test to reproduce backtest returns. The sample may contain too few trades, and paper fills may omit real market effects.
Instead, use it to find operational defects and measure whether execution costs stay within the strategy's available edge. If the strategy trades infrequently, one week may produce little evidence about profitability; it can still test restarts, order updates and risk limits.
Write an explicit gate for the next stage. It might require zero duplicate orders, complete reconciliation on every session, no risk-limit breaches, and slippage within a pre-set budget across a minimum number of fills.
Set the minimum from the strategy's trading frequency and risk. If the test does not produce enough orders, extend it rather than treating silence as a pass.
This week, run one locked strategy version in forward paper mode and save its decision, order and fill logs for every session.
Frequently Asked Questions
What is the difference between backtesting and forward testing?
Backtesting replays a strategy over historical data. Forward testing runs it on new market data, usually in a paper environment, and exposes current timing and order-handling behaviour.
How long should I forward test a trading agent?
Run it long enough to exercise the expected order types, market sessions and failure paths. A week can expose operational faults, but low-frequency strategies may need longer to collect a meaningful set of orders.
Can paper trading prove a strategy will be profitable live?
No. Paper fills may not reproduce queue position, market impact or venue routing. Use paper trading to test the agent's decisions, order state handling and risk controls, not as proof of live profitability.
What should I compare between a backtest and a forward test?
Compare data timestamps, decisions, order requests, acknowledgements, fills, fees and position updates. Track slippage, fill rate, latency and risk-limit events using consistent definitions.
What should a trading agent do after an order request times out?
It should query the broker for the order's status before submitting again. A request may have been accepted even if the acknowledgement was lost, so retrying blindly can create duplicate exposure.