Turn a Prediction-Market Hypothesis Into a Test Specification
Most prediction-market ideas die as a sentence in a notebook: "YES looks cheap after a big move." That sentence is not testable. It hides the input you would read, the rule you would apply, and the result that would prove you wrong. This post gives you a one-page specification that forces those decisions before you write any code. It builds on the first-paper-strategy walkthrough rather than repeating it, so if you have not met the no-order market observer yet, start there and come back.
Why a spec, and why before code
A hypothesis you cannot falsify is not a hypothesis. A spec is cheap insurance against three failure modes: measuring something other than what you meant, moving the goalposts after seeing results, and declaring victory on a simulated fill that a real venue would never have given you. Write the spec first and your later code, logs, and backtests become checks against a fixed claim, not a search for one that flatters the idea.
Keep the spec to one page with five fields. If a field is empty, the idea is not ready to test.
The five fields
- Research question. One sentence, one market behavior, no verbs like "beat" or "profit" yet. Example (hypothetical): "On Kalshi binary markets, does the YES mid-price tend to revert within an hour after a move of more than 10 cents in 5 minutes?"
- Observable input. The exact fields you will read, their types, and what happens when they are missing. Name the ticker. You cannot test a vague "the market."
- Decision rule. The deterministic condition that fires, stated as a comparison on the observable input. If two people reading it would act differently, it is underspecified.
- Falsification criterion. The result that would make you abandon or revise the claim, chosen now, before you see any data.
- Missing evidence. Everything the test does not model: fills, fees, depth, data gaps, rule edge cases. This field is where honesty lives.
Pin the observable input to real contract semantics
Vague inputs are where specs rot, so anchor them to how the venue actually works. On Kalshi, every market is a yes-or-no event contract, and prices trade between 1 and 99 cents. A correct contract settles at $1 and an incorrect one at $0, so the price behaves like the market's implied probability. That gives you a well-defined input: a mid-price bounded in (0,1), a YES/NO pair, and a known settlement value.
Do not over-generalize that dollar. Kalshi's own documentation notes that scalar or special-rule outcomes can resolve to non-standard values, so the ordinary $1/$0 payout is not universal across every contract type. Your "missing evidence" field should flag that your rule assumes a plain binary and may not hold for scalar or exception markets.
For the input itself, write down the SDK types you will touch. In the public Banger SDK, a strategy implements on_market_tick(self, market, tick, ctx); tick prices are Decimal, bid and ask can be absent, and the timestamp is a datetime. "Bid/ask can be absent" is not a footnote. It is a branch your decision rule must handle, and a line in your missing-evidence field when a quote is missing.
A worked example (clearly hypothetical)
Below is a filled-in spec. The numbers are chosen inputs for illustration, not a calibrated parameter, a backtest result, or a recommendation.
RESEARCH QUESTION
On a chosen Kalshi binary market, after YES mid moves > 0.10
within 5 min, does mid revert >= 0.03 within the next 60 min?
OBSERVABLE INPUT
market ticker: <EXACT current ticker, pinned and preserved>
tick.yes mid = (bid + ask) / 2 # Decimal; skip tick if bid or ask absent
timestamp: datetime (UTC)
DECISION RULE (observer only, no orders)
track 5-min rolling change in yes mid
when |change| > 0.10: log a "signal" event + timestamp + mid
60 min later: log realized mid change from the signal mid
FALSIFICATION CRITERION
chosen before running: if, across logged signals, the median
60-min reversion is <= 0 (no reversion), the reversion claim
fails for this market/window and is dropped.
MISSING EVIDENCE
- no orders placed, so no fills, no fees, no slippage modeled
- missing quotes cause skipped ticks (not interpolated)
- single ticker, single window: not evidence of a general effect
- assumes plain $1/$0 binary, not scalar/special-rule outcomesNotice what the rule does not do: it never places an order. The first evidence check is an observer that reads public market data and logs what it sees. Public market observation does not require venue trading keys, and you should not fund an account or hand over trading secrets to run a no-order read. Observation answers a narrower question than a trading signal: does the pattern even occur, with the frequency and sign you assumed? If it does not, you have saved yourself the entire execution-modeling exercise.
Keep the observer honest, then stop
Treat the observer as a measurement instrument, not a strategy. A log count bounds how much output you collect; it does not bound the idea's lifetime. Run a short, supervised local check, watch the logged events, and Ctrl+C when you have enough to judge the falsification criterion. Preserve the exact ticker you used, because "take the first market discovery returns" is not a reproducible test specification.
Where paper testing fits, and where it does not
Only after the observer confirms the pattern exists do you add a decision that would act. That is the moment to be most skeptical of your own results. A paper fill is evidence under a specific data, fill, fee, and valuation model, not proof that a real venue would have executed you. Banger is a paper-research beta: public live deployments and local --live are blocked, and hosted historical backtesting currently covers Kalshi binary markets. Inspect the actual result model that produced any number before you trust it, and keep settled cash, marked value, and hypothetical executable proceeds as separate quantities in your head.
RiskEnvelope limits like max_position_usd and max_daily_loss_usd are per-context guardrails on a paper run, not an account-wide guarantee and not an automatic flatten. They belong in your spec's missing-evidence field, not in a profitability claim. The spec's job is to tell you what you have actually learned, which is almost always narrower than the original hunch, and that narrowness is the point.
The one-page takeaway
Write the research question, the observable input with real contract semantics, the deterministic decision rule, the falsification criterion you commit to in advance, and an honest missing-evidence list. Test the cheapest version first with a no-order observer on a pinned ticker. Let the spec, not the result, decide whether the idea survives.
To check current SDK contracts and feature availability before you build, see the Banger CLI docs at https://www.bangertrades.com/docs/cli. If you want to run bounded paper experiments against current market data, you can explore paper research via https://www.bangertrades.com/sign-up. No fills or returns are promised; it is a place to test a spec, not to be told one works.