Guide
Position sizing in Polymarket backtests
Position sizing is where a backtest meets the real book. The same order that is invisible on Bitcoin moves Zcash, and the backtester exposes both max_trades_per_market and a budget so position logic is part of the plan, not an afterthought.
What this guide covers
- Measured 3-day depth ranges from 2,044 (zec) to 57,147 (btc); position size must scale with it
- max_trades_per_market caps how many trades one market contributes to a sample
- The budget parameter bounds total simulated capital (5 to 10,000)
- Full L2 depth in the archive lets you size an order to a fraction of resting liquidity
Size relative to depth, not fixed
A fixed contract size is the wrong abstraction because depth varies 28x across assets. A size that is 1% of Bitcoin's top-of-book depth is over half of Zcash's. Sizing as a fraction of measured depth keeps the market impact comparable across assets.
The backtest exposes top-of-book levels per snapshot, so you can set size to a target fraction - say 10% of resting depth on each side. That keeps slippage assumptions consistent and prevents a thin asset from producing fantasy fills.
max_trades_per_market
One market can be entered several times within its window, but treating each as independent overstates the effective sample size. max_trades_per_market caps the trades drawn from a single market, which keeps the sample honest when markets are highly correlated within a window.
On a 5-minute market with a few entries, the cap is usually not binding. On longer windows where a strategy might re-enter repeatedly, it prevents one market from dominating the statistics.
Budget as a capital constraint
The budget parameter (5 to 10,000) bounds total simulated capital, which matters because a strategy's edge can only be realized at the size the budget allows. A strategy that is profitable you cannot scale is only conditionally useful.
Set the budget to something realistic for your account and re-run. If the measured edge collapses when you raise the budget - because larger orders walk the book - the strategy has a capacity limit, which is a crucial fact to know before deploying it.
Position sizing and ruin
On binaries, oversizing is fatal: a run of losses at too large a fraction of capital can end the account before the edge appears. Size so the worst realistic streak does not approach ruin, and use the backtest's max_drawdown as the input to that calculation rather than hoping.
Kelly-style sizing is a useful upper bound, but it assumes the win probability is known exactly - which in a backtest it never is. Halve the Kelly fraction as a starting point and let the drawdown measurement adjust it downward.
Code examples
# Size an order as a fraction of resting top-of-book depth.
def size_for(depth, fraction=0.10, cap=None):
qty = depth * fraction
if cap is not None:
qty = min(qty, cap)
return qty
depths = {"btc": 57147, "eth": 26844, "sol": 18132,
"xrp": 16649, "doge": 12054, "bnb": 11710,
"hype": 5390, "zec": 2044}
for coin, d in depths.items():
print(coin, int(size_for(d)))Free tier
The Starter plan is free, includes order books, prices, and metrics at 250ms resolution, with 3 days of history, 60 requests/min, 1,000/day, 1 free AI backtest, and 3 strategy backtests. No credit card required.
Paid data windows from $19/mo extend history to 30–120 days at higher throughput. Backtest AI add-on is +$19/mo or standalone at $29/mo.
FAQ
Does the backtester support position sizing?
It exposes max_trades_per_market and a budget bound (5 to 10,000). Size should be set relative to the market's measured depth rather than as a fixed contract count.
Why size as a fraction of depth?
Because depth varies 28x across assets. A fixed size that is negligible on BTC can be over half the book on ZEC, so a fraction keeps market impact comparable.
What is budget for?
It bounds total simulated capital. Raising it reveals capacity limits: if the edge collapses at larger sizes, the strategy cannot absorb more capital.
Should I use full Kelly sizing?
No. Kelly assumes the win probability is known exactly, which a backtest never provides. Use half-Kelly as a starting point and reduce further based on measured drawdown.