More projects · Side project

Kalshi Trading System

A probability model, risk controls, and automated execution for BTC 15-minute binary markets. Built to learn whether it could be sustainably profitable, and honest about what it found.

v0.06.65

A fully automated bot for Kalshi's 15-minute BTC markets: a Black-Scholes probability model against the market's ask, five weighted exchange feeds, and a live dashboard logging every trade, skip, and model internal. Trades only when the model's probability clears 80% and the edge over the market clears a threshold.

Stack

Python + Flask, SQLite

Built with

Claude

Scale

5,776 lines, 138 versions

Status

Live, +$43.74 over 326 trades

How it was built

I built this with Claude as a technical collaborator, acting as owner and decision maker. The workflow hardened fast: no code before we agreed on a plan, every strategy change simulated against the trade database first, every change versioned with a changelog entry. That discipline of logging everything (trades, skipped cycles, model internals) is what turned three months of trading into a dataset that could prove the model wrong.

The instrument

The dashboard is the design work here. Read from the top down it is four sections: what the model thinks, what the market is offering, what has actually happened, and the record that made every improvement possible.

The model's verdict was never enough on its own. The panel shows the probability, the market's ask, the edge between them, and then the gate's reasoning in plain language: distance below minimum, LOW-sigma regime, K in effect. When the bot declines a trade, it says why.

I screenshotted Kalshi's own book showing 518 contracts at 98 cents against roughly 24,000 at 99 cents. That observation became a panel: depth on both sides, in the dashboard, so entry logic could account for liquidity instead of assuming it.

Live money and simulated money never share a number here. The split exists because a dry-run win rate flattering the real one is how you talk yourself into a strategy that is not working. The all-time figures span several strategy generations, which is why the headline number on this page is scoped to the current lineage: the earlier data came from models that no longer exist.

This table is the dataset every improvement came from. It logs every cycle, not just the trades: probability, edge, sigma, and d2, and for a skip, the reason and the prices it would have hit, so untaken trades can be reconstructed later. Every strategy change was simulated against this history before it shipped, and this is where the model's overconfidence above 90% showed up.

an early build: one feed, empty panels, no version number yet
v0.02: tabs, four weighted feeds, and the model in place

The dashboard is what made the real discovery possible: the data showed the model was systematically overconfident above 90%.

The fix wasn't more trading. It was gates that cut the trades the model shouldn't take, turning the backtest positive by trading less.

What it taught

The instrument you build to watch a system is what lets you find its flaws. Every kill (conviction adds, a cross-platform arbitrage pivot) came from the data, not the mood.

Where it's headed

The bot is live, and from here it's an open-ended tuning project: keep adjusting the model against the trade database to make it a little sharper each cycle. In the background, a shadow model keeps logging distance-dependent volatility data as a candidate to replace the flat sigma floor it proved wrong.

Next side project

The Dossyer

An interactive AI newsletter with cited answers and honest sourcing, run on one rule: systems, not bandaids.