How it worksResearchPricingSign inCreate account
Signal
How it worksResearchUFC modelEdgeFinderQuant deskPricingSign inCreate account

Research analytics, not betting advice. Fair probabilities are devigged sharp-sportsbook lines; matches can be wrong, prices move, and past results never guarantee future returns. Public market data from Polymarket's Gamma and CLOB APIs.

ResearchDesk unavailable

A market-making desk,
built from scratch.

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.

/Polymarket websocket
/L2 queue simulator
/Avellaneda–Stoikov
/Paper only
  1. Question
  2. /Method
  3. /Sample
  4. /Verdict
  5. /Caveats
  6. ← All research

What was built

Source5,156lines across 41 modules
Tests passing200across 23 test files
Test code3,948lines — near 1:1 with source
Live orders placed0by design, never wired up

Six subsystems. Plain words first, the language of the field second.

01

Data

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.

02

Signals

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.

What the strategy is trying to do

sell price−buy price=the spread

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.

01

Offer both prices at once

It posts an offer to buy at, say, 47¢ and an offer to sell at 49¢ on the same contract — never picking a side.

02

Wait for someone to take it

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.

03

Close the loop

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.

Desk unavailable

Quant desk unavailable

Export the paper-trading archive with npm run quant:export and restart the analytics interface.

What would change this

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.

The words this page could not avoid

Maker (or post-only)

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.

Fill rate

The share of posted offers that somebody actually traded against. Low is normal here.

Inventory

Contracts it is still holding. Until they are sold, their value moves with the market — that is a bet, not a spread.

Mark-to-mid

Valuing something you still hold at the market's current midpoint price. A paper number, not cash in hand.

Round trip

A buy and a sell matched against each other. Until both legs are done, there is no realised profit.

Backtest overfitting

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.

03

Quoting

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.

04

Simulator

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.

05

Validation

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.

06

Risk

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.