Research guide / Kelix Lab

Backtest the rules.
Question the result.

A prediction-market backtest asks how fixed rules would have behaved on historical event contracts. A useful test accounts for the information, quotes and costs available at each moment.

1. Define the settlement rules

Contracts with similar names may resolve differently. Check the venue, station or reference source, observation period and settlement criteria. In Lab, start with resolved Kalshi markets and inspect the dataset's source and sampling notes.

2. Respect simulated time

Future prices and final outcomes must not influence earlier decisions. Lab exposes data only through the current bar and withholds results until settlement. External inputs need publication timestamps: today's forecast cannot stand in for yesterday's forecast.

3. Include spread, fees and liquidity

A midpoint is not necessarily executable. Lab simulates fills against quoted sides, charges Kalshi taker fees and caps participation using each hour's volume. These are approximations: hourly candles do not establish queue priority or prove a live fill.

4. Split by event and time

Contracts in an event share information and outcomes. Lab reserves the last 30% of events chronologically for held-out reporting. Develop on earlier events, freeze parameters, then compare the later result. Repeatedly selecting rules using the held-out period turns it into development data.

5. Look beyond total profit

Compare net P&L, costs, drawdown, trade counts and event concentration. Test nearby parameters and smaller participation rates. A result driven by a few events or one setting needs more evidence.

Build an experiment

Describe a hypothesis, inspect the generated JavaScript, load a dataset and run a backtest. Keep assumptions in setup.txt and compare development and held-out results before making changes.

See the Lab workspace and plans