Paper trading bot guide (forward-test before real money)
A backtest tells you a strategy worked on the past. Live trading tells you it works now — at the cost of real money. Paper trading is the bridge: run the bot against the live market in real time, but with simulated money, so you find the bugs, the bad fills and the latency surprises before they cost you anything. It's the single most-skipped step between a pretty backtest and a blown account. This guide explains what paper trading proves, what it can't, and how to build a paper bot.
What paper trading is
Paper trading (a.k.a. forward testing, dry-run, or demo trading) runs your real strategy code against the real, live market feed in real time — but every “order” is recorded in a simulated account instead of being sent to the exchange. You experience the strategy unfolding bar by bar at today's prices, watching a simulated equity curve, without a cent at stake.
Why it's the missing bridge
This is the practical heart of backtesting vs forward testing. A backtest can be flawless and still fail live because of bugs that only appear with a live feed: timezone mistakes, off-by-one bar indexing, API rate limits, and over-optimistic fill assumptions. Paper trading surfaces those for free.
What paper trading actually tests
- The plumbing — data feed, order logic, error handling, reconnection.
- Realistic fills — does the price you assumed actually exist when you order?
- Latency & timing — how stale is your signal by the time the bot acts?
- Your own nerves — can you actually leave the bot alone, or will you interfere?
The code
python · paper_broker.pyclass PaperBroker:
def __init__(self, cash=10000, fee=0.001):
self.cash, self.pos, self.fee = cash, 0.0, fee
def buy(self, price, qty):
cost = price*qty*(1+self.fee) # model the real fee
if cost <= self.cash:
self.cash -= cost; self.pos += qty
def equity(self, price):
return self.cash + self.pos*price # mark-to-market
# feed it LIVE prices on each new bar; never touch the real exchange
What paper trading can't catch
Most paper engines assume you fill at the last price with no slippage and no market impact — kinder than reality, especially in thin markets. And no simulator fully replicates the gut-punch of real money on the line; people manage paper trades calmly and then panic with cash. Treat paper results as the optimistic case, and start live with the smallest size you can.
From paper to live
Run paper trading for long enough to span different market conditions — at least a few weeks, ideally through a trend and a chop. When the live equity curve roughly tracks the backtest and the bot has survived restarts and API hiccups, graduate to real money at minimum size, sized with the position calculator. Most serious platforms, including Freqtrade's dry-run, make this a first-class mode for exactly this reason.
Frequently asked questions
What is a paper trading bot?
A paper trading bot runs your real strategy code against the live market feed in real time, but records every order in a simulated account instead of sending it to the exchange. It lets you forward-test the strategy and its plumbing with no money at risk.
Why use paper trading before going live?
A backtest only proves an idea on past data; paper trading proves the live plumbing — data feeds, order logic, timing and fills — and surfaces bugs like timezone errors, rate limits and over-optimistic fills before they cost real money. It is the bridge between backtest and live.
What can't paper trading catch?
Paper engines usually assume perfect fills at the last price with no slippage or market impact, which is kinder than reality, especially in thin markets. They also can't replicate the emotional pressure of real money, so paper results should be treated as the optimistic case.
How long should you paper trade a bot?
Long enough to span different market conditions — typically at least a few weeks, ideally through both a trend and a choppy range — and long enough to survive restarts and API hiccups. Only graduate to live money when the paper curve roughly tracks the backtest.