A live market-data recorder, a simulator that replays a trading day tick by tick, two academic quoting models, and a test suite whose job is to prove the results wrong.
The strategy it runs is the simplest one available, on purpose. The engineering is the work. It has never placed a real order or risked a real dollar.
Six subsystems. Plain words first, the language of the field second.
Records every price change coming out of Polymarket, so any run can be replayed exactly as it happened.
Production Polymarket WebSocket client with reconnect, heartbeat watchdog, and sequence tracking. JSONL capture partitioned by UTC date, replayed deterministically with gap detection.
Reads the queue of resting orders for clues about which way the next trade is likely to go.
Rolling-window order-flow imbalance, Stoikov microprice, prediction-market-normalised VPIN, and a Hawkes intensity tracker with MLE fitting.
It does not try to guess who wins. It earns the gap between what buyers pay and what sellers ask, the way a money changer at the airport earns the gap rather than betting on currencies.
It posts an offer to buy at, say, 47¢ and an offer to sell at 49¢ on the same contract — never picking a side.
Impatient traders cross the gap. When one of them trades against an offer, that offer is filled. Most are never reached, and get cancelled and reposted instead.
Buy at 47¢, later sell at 49¢, and the 2¢ gap is the profit. That matched pair is a round trip — the only kind of profit here that is genuinely banked.
Quant desk unavailable
Export the paper-trading archive with npm run quant:export and restart the analytics interface.
Every fill is simulated. The desk replays recorded book data and assumes its resting order would have been filled when the market traded through it. Real queue position is not modelled, so the true fill count is an upper bound — and the fill rate is already near zero.
Realised is not the same as profitable. Realised net counts only round trips that closed. Inventory still open at the end of a session carries mark-to-market risk that never appears in the headline figure, which is exactly why the two are reported apart.
The sample cannot be annualised. Round trips here are sequential rather than concurrent, so return on capital cycled is not a portfolio return. Multiplying it out to a yearly figure would be meaningless.
Nothing has faced adverse selection. On paper the counterparty is indifferent. In a live book the traders most eager to hit a resting quote are the ones who know something, and that cost lands entirely outside this simulation.
Posting a price and waiting, instead of taking someone else's. Exchanges pay a small rebate for it, because it is what gives everyone else something to trade against.
The share of posted offers that somebody actually traded against. Low is normal here.
Contracts it is still holding. Until they are sold, their value moves with the market — that is a bet, not a spread.
Valuing something you still hold at the market's current midpoint price. A paper number, not cash in hand.
A buy and a sell matched against each other. Until both legs are done, there is no realised profit.
A strategy tuned so closely to past data that it only works on that data. The validation suite exists to catch exactly this.
Research artifacts from paper trading only — no live orders, no capital, and no betting advice. Results on a sample this small carry no predictive claim.
Picks the two prices to post, and shifts them when it is holding more than it wants on one side.
Avellaneda–Stoikov and Guéant–Lehalle–Fernandez–Tapia market makers with inventory skew, plus a constant-spread baseline to beat.
Replays a real trading day step by step, including waiting in line behind everyone else at the same price.
Event-driven backtester with real L2 queue-position tracking, Polymarket V2 fee accounting, and an injectable latency model.
Actively tries to prove the results were luck. Most strategies that look good in testing die here.
Purged combinatorial cross-validation, Deflated Sharpe, Probability of Backtest Overfit, Diebold–Mariano with Newey–West HAC, delay injection, and a timestamp-shuffle null test.
Shuts everything off automatically if losses, silence, or position size cross a preset limit.
Kill switch enforcing max drawdown, heartbeat timeout, daily loss limit, and a per-side inventory cap.