Logicull
Trading systems and research: growing trading strategies instead of writing them, after five generations of Kalshi bots and six papers on what those markets really pay.
Dove is the newest engine in Logicull: genomes mutate, generations compete, natural selection does the tuning, and the survivors make markets.
It grew out of five generations of trading bots on Kalshi, a seven-market system on AWS that retrains itself every night, and six papers I published on what those markets really pay.
- Python
- NumPy
- scikit-learn
- asyncio
- Kalshi API
- Databento
- Redis
- SQLite
- AWS EC2
- Claude
- pandas
- LaTeX


Strategies as organisms, under selection pressure.
Markets drift, so a strategy tuned to last year slowly goes wrong while still looking fine. Dove reads the Adaptive Market Hypothesis literally: every strategy is an organism under selection pressure. Instead of me re-fitting parameters after a drawdown, a genetic algorithm keeps breeding a population against a fitness function with statistical guards, and only what survives out-of-sample validation earns capital.
One generation
- SeedGeneration zero: 30% textbook strategies, 70% small mutations of them
- BreedUniform crossover between parents of the same species, then Gaussian mutation
- CompeteEvery genome trades a backtest of CME micro futures order books
- SelectRanked by utility; the top 25% survive, and a Deflated Sharpe Ratio decides whether surviving means anything
- Make marketsA recurrent Double DQN sets risk aversion and skew; a GLFT market-making model turns them into quotes
- 4,000
- strategies in a full population, each a two-tier genome
- 25%
- of every generation survives to breed
- 20
- moves the network can make: risk aversion × quote skew
- 112 → 22
- market features, cut down by a two-stage selection
| Trend | Pattern | |
|---|---|---|
| Gen 0 | 21 ticks | 5 ticks |
| Gen 1 | 38 ticks | 10 ticks |
| Gen 2 | 55 ticks | 13 ticks |
| Gen 3 | 61 ticks | 14 ticks |
| Gen 4 | 66 ticks | 17 ticks |
| Gen 5 | 80 ticks | 19 ticks |
| Gen 6 | 88 ticks | 25 ticks |
| Gen 7 | 97 ticks | 31 ticks |
| Gen 8 | 118 ticks | 33 ticks |
| Gen 9 | 137 ticks | 35 ticks |
Dove · Phase 3b acceptance record · MES, Aug 2026
| Bred on | Never seen | |
|---|---|---|
| Quoting avatar | $3.64 | −$0.40 |
| Trend | $3.46 | $0.69 |
| Pattern | $1.17 | $0.10 |
Dove · holdout re-score · MES, Aug 19–20, 2026
A positive edge, not yet a significant one.
On a session it never saw, the best trend strategy still made $0.69 a fill before costs, and stayed positive after the cheapest commission. That’s a positive edge, but at t = 0.95 it isn’t statistically significant yet.
The next fixes are specific: the search stopped exploring within a few generations, and the fitness function could barely tell genomes apart. A wider search on more data is what settles it.
Five generations of trading bots on Kalshi.
Kalshi lists binary contracts that settle at $1 or $0, like whether Bitcoin will be above a price in 15 minutes. Their prices often trail the data they depend on. My bots read that data and the order book together, and only traded when the odds were better than the price.
It grew from a single Bitcoin bot in March 2026 to a seven-market system on AWS that retrains itself every night.
How the production bot trades
- FeedsKalshi’s WebSocket for the book and my fills, plus prices, funding and order books from Gate.io, Binance.US, Coinbase and others
- SignalsRecomputed every 2 seconds per market: momentum, funding, order-book imbalance, Bitcoin’s lead
- GatesTiming window, price tier, chop halt, cooldowns and cross-market agreement
- LookupThe win rate for this exact setup, from 38,040 settled samplesBayesian
- TradeHalf-Kelly size, limit at ask +1¢, watched every 1.5 s until it settles or a stop fires
- 83.7%
- real-money win rate on the AWS bot, 98 trades
- 82.0%
- win rate it needed to break even
- ~40ms
- market-data latency
- 38,040
- samples in the table it retrains nightly
Five generations
NuthatchMar 2026Paper · 234 trades · 93.6%
Bitcoin only. Fourteen signals, a four-path entry cascade, a Claude Haiku analyst that set direction and size, and, on borderline trades, a second Claude call told to find reasons not to trade.
HeronMar 2026Paper · 141 trades · 96.5%
Four markets at once as parallel async loops, a five-tier window classifier and a fair-value model per asset.
OrioleMar 2026Paper · 131 trades · 97.0%
A 95¢ evening floor after four of five losses landed between 20:00 and midnight UTC, and independent signal suites for each altcoin.
RazorbillLate Mar 2026
Separate price and signal loops, a Polymarket signal, a stop at 80% of entry, and a filter that needs three same-direction reads.
Razorbill on AWSApr – May 2026Real money · 98 trades · 83.7%
Claude replaced by a Bayesian lookup table that retrains every night. Fills confirmed over the WebSocket, three stop systems, chop halts and seven markets.
A high win rate isn’t an edge.
Buy a contract at 94¢ and a win pays 6¢ while a loss costs 94¢. You have to win about 94% of the time just to break even. My bots won most of their trades, so the win rate looked great. The question that mattered was whether they beat breakeven by enough.
Across 486 real-money trades on three bots, the total came to $6.39. So I wrote up what these markets actually cost, and how to measure an edge without fooling yourself, in six papers.
Click a paper to read the synopsis
- trading-bot (V1)15-min crypto · 98 trades
- Razorbill v215-min crypto · 28 trades
- Cardinal15-min crypto · 360 trades
- Quanta (shadow)15-min crypto · 1,577 trades
- Sparrowhourly crypto · 73 trades
- Sparrow deep-favouritehourly crypto · 448 trades
- quanta_hourly scf_no_thr95hourly crypto · 380 trades
- quanta_hourly momentum_mlhourly crypto · 67 trades← −38.9 pp
| trading-bot (V1) | +1.7 pp (−5.6 pp to +8.9 pp) |
|---|---|
| Razorbill v2 | −9.4 pp (−24.1 pp to +5.3 pp) |
| Cardinal | +2.4 pp (−1.5 pp to +6.3 pp) |
| Quanta (shadow) | −1.7 pp (−3 pp to −0.5 pp) |
| Sparrow | −1.4 pp (−8.9 pp to +6.2 pp) |
| Sparrow deep-favourite | −0.2 pp (−1.2 pp to +0.9 pp) |
| quanta_hourly scf_no_thr95 | +0.7 pp (−1 pp to +2.4 pp) |
| quanta_hourly momentum_ml | −38.9 pp (−48.5 pp to −29.3 pp) |
Figure 7 · data as of Aug 14, 2026
Contract price
| Contract price | Kalshi fee | Half-spread |
|---|---|---|
| 0–5¢ | 0.16¢ | 0.5¢ |
| 5–10¢ | 0.47¢ | 0.5¢ |
| 10–15¢ | 0.76¢ | 0.5¢ |
| 15–20¢ | 1.01¢ | 0.5¢ |
| 20–25¢ | 1.22¢ | 0.5¢ |
| 25–30¢ | 1.39¢ | 0.5¢ |
| 30–35¢ | 1.53¢ | 0.5¢ |
| 35–40¢ | 1.64¢ | 0.5¢ |
| 40–45¢ | 1.71¢ | 0.5¢ |
| 45–50¢ | 1.75¢ | 0.5¢ |
| 50–55¢ | 1.75¢ | 0.5¢ |
| 55–60¢ | 1.71¢ | 0.5¢ |
| 60–65¢ | 1.64¢ | 0.5¢ |
| 65–70¢ | 1.54¢ | 0.5¢ |
| 70–75¢ | 1.4¢ | 0.5¢ |
| 75–80¢ | 1.22¢ | 0.5¢ |
| 80–85¢ | 1.02¢ | 0.5¢ |
| 85–90¢ | 0.77¢ | 0.5¢ |
| 90–95¢ | 0.48¢ | 0.5¢ |
| 95–100¢ | 0.17¢ | 0.5¢ |
Paper I · Aug 4–14, 2026
Hour (UTC)
| 00 | 46.4% |
|---|---|
| 01 | 45.1% |
| 02 | 44.6% |
| 03 | 44.4% |
| 04 | 44.0% |
| 05 | 51.6% |
| 06 | 65.7% |
| 07 | 70.2% |
| 08 | 83.0% |
| 09 | 82.7% |
| 10 | 82.5% |
| 11 | 80.2% |
| 12 | 75.8% |
| 13 | 74.3% |
| 14 | 85.5% |
| 15 | 83.5% |
| 16 | 80.9% |
| 17 | 77.4% |
| 18 | 73.6% |
| 19 | 70.0% |
| 20 | 65.6% |
| 21 | 59.9% |
| 22 | 54.7% |
| 23 | 50.4% |
Paper I · Jun 1 – Aug 14, 2026
| Market price | My model | |
|---|---|---|
| 14:00 UTC | 0.37 | 0.05 |
| 18:00 UTC | 0.53 | 0.05 |
| 23:00 UTC | 0.81 | 0.06 |
Paper IV · Calibrated but Uninformative
How a claim gets into a paper
- Pre-registerThe whole family of hypotheses is pinned with a hash before any test runs
- No look-aheadA market snapshot refuses any field timestamped after the decision
- Sealed holdoutOnly allowlisted queries, and every peek is logged before results come back
- ProvenanceEach number is marked [A] re-derived by script or [B] reported and not reproduced
- CIFigures rebuilt twice with no source data and checked byte for byte; PDFs attached to the release
What live trading taught the code
Two bots, one account
Two instances raced on the same account. A file lock now allows exactly one.
The order that wasn’t there
Kalshi’s REST API returned nothing for orders that had already filled, so the bot bought eight contracts on a single signal. It now trusts the WebSocket fill event.
A book that drifted
The order-book delta feed drifted 3–11¢ because cancellations aren’t published, so it was replaced with the ticker channel and a REST check that can halt trading.
Fills above the screen
Live fills came in at 95–98¢ when the screen showed 92¢, so entry limits dropped from 3¢ over the ask to 1¢.

