FRENESDE

Paper trading

Paper trading runs the strategy in real time on a demo account, with no money at stake. It reveals what the backtest does not show: latency, refused orders, real execution prices, connection drops.
Backtrader connects to some brokers through stores, for example bt.stores.IBStore for Interactive Brokers: you plug the store’s feed and broker into Cerebro, and the same strategy runs on live data.
Live, notify_data(self, data, status, *args, **kwargs) reports the state of the feed: data.LIVE when data arrives in real time, data.DELAYED while history is being backfilled, or a disconnection. Only send orders when the feed is truly live.
Set the duration and criteria in advance: several months, enough trades (often several dozen) and an acceptable gap with the backtest. Meanwhile you watch and take notes, without changing the rules.

Examples

Key terms

Paper trading
Simulated real-time trading on a demo account
Store
Backtrader connector to a broker or a live data source
Latency
Delay between the signal and the actual execution of the order
Slippage
Gap between the expected price and the price obtained
Take the mission on Doji Academy

← Back to the index