Risk Management for Prediction-Market Bots
A prediction-market bot does exactly what you told it to, including the parts you got wrong. It has no situational awareness. It cannot tell that a data feed went stale, that a market is about to resolve, or that it has been buying into the same losing thesis fifteen times in a row. That gap is the whole reason a strategy needs a risk envelope: a set of hard limits that sit outside the strategy logic and stop it before a bug or a bad regime drains the account.
This matters more now because the venues are bigger and faster. According to a Pew Research Center analysis of data from The Block, combined monthly volume across Kalshi and Polymarket rose from under $5 billion in September 2025 to about $24 billion in April 2026. Deeper liquidity is good for fills, but more markets, more volume, and more automated participants mean more ways for an unsupervised bot to lose money quickly. The four controls below are the minimum. They are framework-agnostic, so you can implement them in your own code, and I will note where Banger enforces them declaratively.
Why the envelope lives outside the strategy
The core principle from bot risk-management practice is blunt: automated systems cannot recognize when market conditions have fundamentally changed, when a data feed is corrupted, or when a malfunction is generating bad signals.
So the risk layer has to include sanity checks and automatic shutdown triggers that a human would otherwise handle by instinct. If your position-sizing logic and your loss limits both live inside the same strategy code, a single bug can take out both at once. Keep the limits separate and dumb. They should be the one part of the system you trust when everything else is on fire.
Per-trade cap: size on what you can lose
The per-trade cap answers one question: what is the most this single order can cost me? The standard framing is to size on downside, not upside. Position size should be calculated based on how much you are willing to lose, not how much you hope to gain.
For prediction markets, a binary contract's max loss is bounded (you can lose your full stake if it resolves against you), which makes the cap easy to express as a fixed dollar amount or a percentage of bankroll. Common defaults for automated systems land in the fixed-percentage-per-trade range.
General bot guidance puts fixed-percentage risk around 0.5 to 2 percent per trade so exposure scales automatically with account size. Prediction-market operators run wider: some documented arbitrage bots cap positions at about 5 percent of bankroll using fractional Kelly sizing, typically 0.25x, specifically to survive losing streaks.
One research benchmark went a step further and imposed a 15 percent per-market concentration limit measured on cost basis, so a model could not put all its capital into one market.
Pick a number in that range based on your edge confidence and the market's liquidity, then let it scale with the account rather than re-tuning by hand.
Daily loss stop: cap the bad day
A per-trade cap does nothing against a run of small losses that compound. That is what the daily loss stop is for. It is a hard drawdown limit for the session: once realized-plus-open losses hit the threshold, the bot stops opening positions for the rest of the day.
The intent is engineering, not willpower. As one prop-firm risk write-up puts it, you want a circuit breaker that stops trading before the rule violation happens, not after you notice it.
Watch the tuning. A common failure is setting the stop too close to normal volatility, which trips you out of ordinary noise constantly.
Set the daily stop wide enough to absorb a normal losing sequence for your strategy, and pair it with a consecutive-loss cap so a broken signal that keeps firing gets shut off even before the dollar limit hits.
Max open positions: bound your correlated exposure
Per-trade and daily limits still let a bot pile into twenty positions that are all effectively the same bet. During a single event, many prediction markets move together: sports, politics, and crypto have driven the vast majority of volume on both venues, which means correlated books are everywhere.
Pew Research Center found that sports, politics, and crypto made up about 91 percent of global volume on Kalshi and about 90 percent on Polymarket since July 2024.
A max-open-positions limit caps how many concurrent bets the bot can hold, which bounds aggregate exposure and forces the strategy to be selective. Combine it with a per-market concentration cap so you do not end up with one nominal position that is really your entire thesis.
Kill switch: the last line
A kill switch is a hard stop triggered by a specific threshold, often automated, that disables trading and can liquidate open positions when losses reach a defined limit.
In practice it is less a single button than a suite: an immediate manual exit-all, plus automated triggers that act as portfolio circuit breakers.
Two design cautions from the literature. First, a switch keyed to a single variable is fragile; practitioners warn that a well-intentioned kill switch triggering at the wrong time can itself be destabilizing. Second, decide up front what happens to open positions when it fires, because on multi-leg strategies killing one leg can leave you with unhedged directional exposure. Build the kill switch so it either flattens cleanly or holds and alerts, never something in between.
Sensible starting defaults
There is no universal right number, but these are reasonable starting points to paper-test and then tighten:
- Per-trade cap: 1 to 2 percent of bankroll for discretionary-edge strategies, up toward 5 percent only for well-tested arb with fractional Kelly.
- Per-market concentration: cap any single market on cost basis, in the low double digits of percent, so no one resolution can end you.
- Daily loss stop: wide enough to clear a normal losing streak, plus a consecutive-loss cap as a faster tripwire.
- Max open positions: a hard integer, chosen so your worst-case simultaneous loss stays inside the daily stop.
- Kill switch: a manual exit-all you can hit instantly, plus an automated trigger at a loss level above the daily stop.
How Banger enforces this
The point of an envelope is that it does not depend on your strategy code being correct. In Banger you write the strategy as a banger.Strategy in Python, then attach the limits as a declarative risk envelope that the runtime enforces around it: per-trade cap, daily loss stop, max open positions, and a kill switch. The strategy proposes orders; the envelope decides whether they are allowed. You paper-trade against the live order book first, so you can watch the limits fire on real prices before any capital is at stake. Banger never custodies funds; you bring your own venue keys.
pip install bangertrades
banger run strategy.py --paperRun it in paper mode until the envelope trips the way you expect on a bad day, then go live. The controls above are worth building whatever framework you use. The account you save is the one that lets your edge compound.
A note on venues and access
Access rules differ by venue and change often, so verify current status before you deploy. As of mid-2026, Kalshi is regulated by the CFTC as a designated contract market. Polymarket usually refers to Polymarket International, which is not CFTC-regulated, while a separate, newly CFTC-regulated Polymarket US serves American users at much smaller volume.
Pew Research Center reported that in April 2026 Polymarket US saw $1.3 billion in trading volume versus $9 billion on Polymarket International. Confirm what is available to you in your jurisdiction before running anything live.
Sources
- Kalshi and Polymarket trading volumes dramatically increase since mid-2025
- Trading Bot Risk Management: Stop-Loss & Position Sizing
- Prediction Market Arbitrage: Strategies & Risks
- Prediction Arena: Benchmarking AI Models on Real-World Prediction Markets
- The Prop Firm Kill-Switch: How to Stop Drawdown Before It Violates the Rules
- Kill Switch Definition - Traders' Glossary
- Trading System Kill Switch: Panacea or Pandora's Box?
- What Is a Kill Switch in Trading Platforms?
- Kalshi vs Polymarket 2026: fees, volume, and US access compared