Developer's Rust Trading Bot Backtest Reveals Hidden Losses Masked by Lucky Trades
A software developer running a Rust-based trading bot on Polymarket for six months discovered through backtesting that two strategies were quietly losing money, obscured by gains on a few large positions. To replay historical data, the developer used tick-level L2 order book data from a third-party provider, since Polymarket's public API offers no historical endpoint. Rather than building a separate backtesting system, the developer reused the live bot's existing architecture, swapping only the data source between a WebSocket feed and a local file replay. This approach ensured the strategy engine, order book logic, and risk manager ran identically in both live and backtest modes. The exercise highlighted how trade-only historical data can mask slippage and produce misleadingly clean backtest results compared to full order book depth data.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in