Skip to content
Archive
← r/algotrading
1
100%
u/Yann27 8 hours ago Infrastructure

Paper 2 Live (What mistakes did your trading bot make that you didn’t expect?)

For those of you who have taken an automated trading system from paper trading to a live account. **What errors, bugs, or unexpected problems did you encounter after going live?** I’m particularly interested in things that **didn’t show up during paper trading**, such as • Different fills or slippage • Order execution / rejection issues • Partial fills • Stop-loss or take-profit behaving differently • Race conditions or duplicate orders • Position/account state getting out of sync • API or broker differences between paper and live • Market-hours / timezone issues • Data-feed differences • Position sizing or buying-power surprises • Multiple bots interfering with each other • Restart/recovery problems • Network/API outages • Rounding, tick-size, or minimum-order issues • Anything that caused a bot to behave differently from what you tested I'm more interested in **mistakes you personally encountered or accumulated over time**. If you’ve been running bots live for months or years, what do you wish you had checked **before putting real money behind them?** Feel free to share the failure, how you discovered it, and what you changed to prevent it happening again. Thnx guys.
5 comments held Reddit says 0 on reddit ↗
  1. u/backtest_ai 1 7 hours ago
    Fills by far are the trickiest thing when going from backtest to paper to live. I trade a lot of options strategies and filling at mid almost never happens (especially on less liquid underlyings). Took me a a lot of iterations (and time) to refine my fill model. Initially (and naively) started with mid fills, which is obviously way to optimistic and led to a lot of wasted time on strategies that looked much better in tests than they would actually fare live. Then moved to a flat % based spread slippage model which is better but still arbitrary and misses nuances of fast moving markets and differing regimes. These days it’s probabilistic, basically odds of a fill based on where I’m resting and how long I’m sitting there. It’s calibrated using trade and quote data. That one change did more for a backtest matching live than any other single engine change. It also helped cut down on order churn since I can quantify how much to move my order to increase fill % rather than arbitrarily walking it down until it fills. Nobody warns you about this either but the strategy logic almost never breaks, the plumbing does. Broker APIs will reject an order with a useless error code, ack one then go quiet, or drop the session between your open and your close. Rule I run now: the broker’s view of my positions is the only truth. Reconcile on every restart and on a timer while running, and assume my own state won’t survive a crash. Because eventually it didn’t.
  2. u/skyshadex 1 7 hours ago
    I remember commenting once upon a time that I wasn't concerned with microstructure because I wasn't trading much faster than intraday. Today I would tell past me, microstructure absolutely matters, but it won't matter until you sort out all of the other issues.
  3. u/[deleted] 1 7 hours ago

    [removed] — already gone when the archive first saw it

  4. u/Dvorak_Pharmacology 1 7 hours ago
    IBKR paper gateway literally crashes for the most stupid thing but the live one works perfectly. So I spent months optimizing it for those crashes to then have to erase around 500 lines of code
  5. u/veskald 1 6 hours ago
    Two from crypto side, both invisible on paper. Partial fills. On kraken they arrive as separate events sharing one order id. Our bot treated each event as the whole order, so after a partial fill it was managing a position size that did not exist. Found it when a stop closed more than we actually held. Fix - keep the running filled total in your own state per order id, and treat every fill event as an increment, not a snapshot. Paper never shows this because paper fills are always clean and full. Second - backtest bugs that only live trading exposed. We started on open source backtest libs and found too many bugs there, mostly lookahead, plus zero flexibility, so we ended up writing the engine from scratch - backtest and live now run through the same code, with a side by side log(execution log): every backtest entry next to the fill the bot actually took, exchange timestamps on both. When entries drifted apart, the log pointed exactly where the test was lying, and each bug shows up as a different time and price of entry. Without that diff we would have blamed slippage for all of it. Looking back, strategy logic never broke once. All the damage came from the bot having a wrong picture of its own position, or the test having a picture of the market that was too clean.