
BLUF – Backtesting trading strategies that look great on paper is surprisingly easy. Keeping that edge once you add realistic latency, real opening spreads, passive market drift, bad exchange prints, and true out-of-sample data is a very different story. Across six strategies in Kestrel and a graveyard of screened ideas, almost everything collapsed under honest testing. Adding 130 ms of order latency flipped a “profitable” crypto market maker into a consistent loser. A 30-minute live run then matched the simulator’s penalty within 0.01 bps (though across just 43 fills, some of that precision was luck). Only one strategy, a volatility-sized crypto Donchian trend ensemble, passed every condition of a pre-registered out-of-sample test. It held up on a second exchange’s data and across every setting I varied. Then it failed the same kind of test on US stocks and ETFs.
In this post:
- Keeping the Scoreboard Honest (Costs, Drift, Bad Prints, Lucky Coins, and My Own Backtester)
- The Six Strategies Implemented in Kestrel
- Market Making: How 130 Milliseconds Flipped Everything
- Breakout & Chart Patterns: Great in Six Months, Gone in Four Years
- Momentum Rotation, Mean Reversion, and Moving Averages
- Trend Ensemble: The One Strategy That Passed Out-of-Sample
- The Graveyard of Screened Ideas (FVGs, Turtles, and Intraday Signals)
- Where Things Stand (Live Paper Runs and What’s Next)
- Conclusion
In the first post in this series I introduced Kestrel, an open-source C++23 library and command-line tool for pulling stock and crypto market data, backtesting strategies, paper trading, and executing live orders. The full source is on GitHub if you want to check my math or run the tests yourself. So is the complete research log this post is drawn from (docs/strategy-tests.md).
In the second post, I walked through the guardrails and multi-model code reviews I used to build Kestrel with AI coding agents without turning it into spaghetti. In the third post I dug into fixed-point decimal math, unknown-outcome order recovery, HTTP session pooling, and TimescaleDB batching. And in the fourth post I covered the brokerage and exchange plumbing across Binance.US, Kraken, Charles Schwab, and Databento.
To wrap up this initial five-part series, it’s time to answer the obvious question: what actually happened when I ran real strategies through Kestrel?
As before, nothing here is financial advice. I’m a software engineer by trade, not a quant, and I’m not an expert on trading or market signals. I’m also under no illusion that throwing a C++ bot at the markets is an easy way to print money (though I wish it was). In fact, the most valuable thing Kestrel has done so far is prove with math, recorded quotes, and a little bit of live money why most “obvious” trading ideas lose once reality shows up.
Keeping the Scoreboard Honest (Costs, Drift, Bad Prints, Lucky Coins, and My Own Backtester)
Before looking at any strategy numbers, it’s worth talking about the traps that nearly fooled me along the way. If you don’t actively hunt for ways your backtest is lying to you, it will happily flatter almost any idea you throw at it. AI coding agents have the same blind spot. As I covered in the second post, a model will gladly rationalize a bug that makes the numbers look good unless another model checks its work.
Here are the six things that repeatedly turned “working” strategies into mirages:
1. The Single-Coin Distortion (the ZEC Problem): My main seven-pair crypto test set on Binance.US (BTC/USDT, SOL/USDT, ZEC/USDT, ETH/USD, ADA/USD, XRP/USD, and HYPE/USD) included Zcash (ZEC/USDT). That single pair went on a massive +767% rally over the 2022–2026 window. Time after time, a strategy would show huge total profits. Then a per-pair breakdown would reveal that ZEC produced 70–90% of the gains while everything else was flat or losing. Every multi-coin test now gets reported both with and without ZEC.
2. Passive Drift in a Bull Market: Across the 35 US stocks and ETFs I pulled from Schwab from January 2016 to November 2026, the stocks rose roughly 1,355% together. If a daily chart pattern buys a stock and holds it for 15 to 28 trading days, passive upward drift alone hands you +0.9% to +1.7% per trade. That’s true even if your entry signal is a coin flip. Measuring raw return per trade without subtracting passive drift (or comparing against random entries on the same symbols) makes almost any long-only stock pattern look profitable.
3. Silent Data Gaps and Bad Exchange Prints: Real historical data is dirty. Early on, a 1-hour breakout test reported +0.17%/trade across 2022–2026; that is until I noticed one ADA/USD trade had stayed open for 19 months across Binance.US’s USD outage (July 2023–February 2025) for a +163% gain. Fixing that dropped the real average to +0.11%/trade and flipped ADA from +0.44% to −0.14%. Similarly an XRP/USDT delisting gap in trend_ensemble silently stitched 2021 prices to 2023 prices and stalled rebalances across other coins until a code review caught it.
That prompted a full audit of the 264 series and 4,744,006 bars stored in my database at the time across Binance.US, Kraken, and Schwab. Nine Schwab bars failed basic OHLC shape checks, with an open or close sitting outside the high–low range. The outlier scan also raised 73 clearly bad flags and 1,019 suspect ones (counting each timeframe that stores a bad print). Highlights included BTC/USDT spiking to $138,070 on Binance.US on June 21, 2023 while Kraken topped out at $30,795. ZEC/USDT printed $2,355 on November 7, 2025, and XMR opened at $0.01 on Kraken (down from ~$400) right after a January 2018 outage. That single $0.01 print skewed a random-entry benchmark’s 95th percentile to +1,555% per trade.
4. Real Opening Spreads on Stocks: Daily equity strategies typically execute at the 09:30 ET open (OnSessionOpen). That’s when the spread (the gap between the best bid and the best ask) is widest. I measured live Schwab quotes from November 18–24, 2026. First-minute spreads were a median 1.9× mid-day spreads on 13 major ETFs and 2.9× mid-day on individual stocks. In the table below, 1 bp (basis point) is 0.01%:
| Symbol | 09:30:00–09:30:15 | 09:30–09:31 | 11:00–14:00 | 15:50–16:00 |
|---|---|---|---|---|
| SPY | 0.68 bps | 0.68 bps | 0.42 bps | 0.27 bps |
| XLK | 8.21 bps | 6.07 bps | 1.23 bps | 0.62 bps |
| MSFT | 9.60 bps | 7.92 bps | 2.61 bps | 1.25 bps |
| MMM | 103.26 bps | 69.28 bps | 8.16 bps | 3.87 bps |
Paying half the spread on a market order at the open costs less than 1 bp on SPY/QQQ. It costs 2–5 bps on sector ETFs and mega-caps, ~14 bps on BA, 35–50 bps on MMM, and 60–290 bps on small caps. A flat “5 bps slippage” assumption hides a lot of pain outside liquid ETFs.
5. Overfitting to One Regime: Most exploratory tests tried multiple parameter settings and looked at 2022–2026 Binance.US data first. To stop fooling myself, I started pre-registering out-of-sample tests (tests on data the strategy was never designed or tuned on). I wrote down the exact rules, symbols, costs, and pass/fail criteria in docs/strategy-tests.md before importing Kraken’s 2015–2021 daily archive and running the numbers.
6. Bugs in Your Own Backtester: This one stung. While setting up a test of how much a late fill costs trend_ensemble, an order due exactly on the hour filled at the previous hour’s price. Tracking that down showed Kestrel’s backtester stepped each symbol all the way through its bar—advancing the shared simulation clock to the end of the bar—before replaying the next symbol’s open. With one symbol, that’s harmless. Across a basket of stocks and ETFs, about 70–75% of the orders meant for the next day’s open actually filled at the close they were decided on—a price that’s already gone once you’ve seen it.
I replaced that logic with a single time-ordered walk across every symbol and reran every multi-symbol test on the fixed build. No pass/fail verdict changed, though some numbers moved a lot. Single-stock trend_ensemble lost 0.07–0.12 of its Sharpe ratio, and momentum_rotation‘s 2018–2021 Kraken return dropped from −17% to −34%. The fix cut the other way too: trend_ensemble‘s Binance.US holdout Sharpe rose from 0.23 to 0.30. Single-symbol runs (BTC on its own, SPY on its own, and the market maker’s quote replays) came out identical on both builds. Every Kestrel backtest number below comes from the fixed build. (The graveyard screens ran in standalone Python scripts.)
Baseline cost assumptions: Unless noted otherwise, Binance.US tests assume 2 bps taker / 0 bps maker plus 5 bps slippage per side (~14 bps round trip on market orders). Stock tests assume 0 commission plus 5 bps slippage (or estimated spread). Kraken’s pre-registered test ran at both 10 bps/side (5 bps fee + 5 bps slippage) and 35 bps/side (30 bps fee + 5 bps slippage, close to Kraken’s actual 35–40 bps retail taker fee).
Reading the numbers: Sharpe ratio measures return per unit of risk (higher is better). Max drawdown (DD) is the largest peak-to-trough percentage drop of the equity curve, shown as a negative number. For statistical checks, the usual bar for confidence is |t| >= 2.0 or p < 0.05.
The Six Strategies Implemented in Kestrel
Every strategy in Kestrel implements the same Strategy interface (OnBar, OnQuote, OnFill, OnOrderUpdate, OnSessionOpen, OnSessionClosing). Each one runs the same strategy code across historical backtests, live paper trading, and live execution. The first post introduced five of them. I added the sixth, trend_ensemble, after watching those five struggle:
| Strategy | Core Idea | Primary Literature / Reference | Verdict So Far |
|---|---|---|---|
ma_crossover |
Fast/slow SMA or EMA cross | Brock, Lakonishok & LeBaron (1992) | Worked example only |
market_maker |
Two-sided quoting with inventory skew | Avellaneda & Stoikov (2008) | Failed: adverse selection at retail latency |
breakout |
14 chart/range breakout setups + stop/target management | Kirkpatrick’s chart-pattern deck, after Kirkpatrick & Dahlquist | Mostly failed; daily 10-day crypto breakout conditional |
momentum_rotation |
Periodic rotation into top N performers | Liu, Tsyvinski & Wu (2022) / Antonacci | Failed out-of-sample |
mean_reversion |
RSI + optional Bollinger / 200-day trend filter | Wilder RSI(14) / Connors RSI(2) | Thin edge on stocks, none on ETFs |
trend_ensemble |
Multi-lookback Donchian ensemble, vol-targeted | Zarattini, Pagani & Barbon (2025) | Passed on crypto; no edge on stocks or ETFs |
None of the six is a straight copy of its source. The biggest differences:
ma_crossover: Brock, Lakonishok & LeBaron hold the position while the fast average is above the slow one. Kestrel only trades on the bar where the averages cross, so a missed or refused order waits for the next cross.market_maker: Avellaneda & Stoikov derive the spread and inventory lean from volatility and the time left in the session. Kestrel uses a fixed half-spread and a fixed lean in bps, quotes on a real order book with ticks and queues, and caps inventory.breakout: The deck’s patterns are read by eye. Kestrel turns each into exact rules, enters setups on a buy-stop above the pattern by default, and measures targets from the fill. It skips wedges, flags, pennants, and candlestick patterns, and adds three setups the deck doesn’t have (range,fvg, andopening_range).momentum_rotation: The paper goes long the top fifth of hundreds of coins and short the bottom fifth, value-weighted. Kestrel is long-only on a hand-picked basket, with equal-weight slots, and adds Antonacci’s absolute-momentum filter (positive_only).mean_reversion: Connors buys just before the close and exits only at the 5-day average. Kestrel buys at the next open instead. Since its RSI exit can’t be disabled yet, the Connors setup parks that threshold at 90. It’s also long-only.trend_ensemble: The paper allows up to 2× leverage and re-picks the top 20 coins by volume each month. Kestrel is spot-only (1× cap) on a fixed basket, and resizes at every rebalance instead of drifting within the month.
Now let’s walk through what actually happened when each one met real data.
Market Making: How 130 Milliseconds Flipped Everything
A market maker posts buy and sell quotes at the same time and tries to earn the gap between them. Kestrel’s version follows the inventory skew in Avellaneda & Stoikov. The danger is adverse selection: the traders who hit your quotes are often the ones who know the price is about to move.
market_maker was the first serious strategy I built. It was also the first one I put live money behind on Binance.US (ZEC/USDT). On paper it looked genuinely promising, at least in a zero-latency replay of recorded quotes and trades from October 19 and October 30, 2026.
Quoting a fixed 4 to 6 bps half-spread around the mid-price beat holding ZEC/USDT by +5.9 USDT (at 4 bps) and +10.0 USDT (at 6 bps) over 24 hours on October 30. Tighter 1–2 bps half-spreads filled constantly and got run over by informed flow (−10.5 USDT at 2 bps). Scaling spreads by short-term volatility (vol_multiplier) never beat a fixed spread of the same average width.
Then I turned on realistic network latency in Kestrel’s paper simulator: 130 ms order latency and 600 ms report latency for fill polling. (Remember from the third post that even with pooled HTTPS sessions, my California-to-Binance.US median round trip was 129 ms.)
Everything flipped upside down:
- On October 30, the 4 bps setting went from +5.9 USDT to −2.0 USDT vs. holding.
- The 2 bps setting plunged from −10.5 USDT to −33.1 USDT.
- Total fills jumped 3× to 6×. That wasn’t because the strategy was suddenly capturing more spread. Cancels in flight were getting filled right as the market moved through them. On average, the price was already 3 to 5 bps worse just one second after getting filled.
Verifying the Simulator Against Live Money (Run 12)
Before trusting the simulator’s bad news, I checked it against a live Binance.US run. Run 12 traded ZEC/USDT for 30 minutes on October 29 (23:28–23:58 UTC) while I recorded the live quote stream at the same time.
The number to watch is the 1-second markout: how far the price moved against me one second after each fill.
- Live Run 12: 43 fills, average 1-second post-fill markout of −3.00 bps.
- Backtest with 130 ms / 600 ms latency: 55 fills, average 1-second post-fill markout of −2.99 bps.
- Backtest with zero latency: average 1-second markout of −2.43 bps.
That −3.00 bps live vs. −2.99 bps simulated markout match was a big moment for Kestrel, even if it was terrible news for the strategy. It’s one 30-minute run with 43 fills which I treat it as a strong hint rather than a calibration. The simulator still over-counted fills by ~28% (55 vs. 43). Without full order-book data, it can’t know exactly where my order sits in the queue, so it’s optimistic. The price at the moment of each fill was also off: −0.74 bps from the mid in the simulation vs. +0.76 bps live. But the adverse selection penalty a second later matched almost exactly.
Side Note: An earlier live run (Run 10) taught two operational lessons the hard way. First, without post_only, 41 of 106 fills accidentally crossed the spread and paid taker fees instead of resting passively. Second, Binance.US took the fee on those taker buys out of the ZEC itself. My inventory tracker didn’t know that, so 99 later sells were rejected for insufficient balance until I taught market_maker to deduct base-asset fees from inventory.
Throwing Engineering Fixes at It (and Accepting Reality)
I didn’t give up immediately. I implemented and tested almost every textbook market-making refinement I could wire up, all with the 130 / 600 ms latency left on:
- Asymmetric requoting (
requote_bps = 6,requote_toward_bps = 0): Pull quotes immediately when the market moves toward them, and leave them alone when it drifts away. That rescued wide requoting on October 30, dropping fills from 8,542 (and −49.2 USDT) to 402 fills (and +0.6 USDT). It also produced +5.4 USDT at 6 bps that day. Yet 1-second markouts stayed stubbornly negative (−4 to −5 bps). - Microprice centering and trade-flow pull: Kestrel uses a simpler size-weighted mid rather than Stoikov’s estimated micro-price. Order-book imbalance had a tiny predictive signal (−0.33 to +0.51 bps on the next mid move). That’s a rounding error compared to −5 bps of adverse selection in one second. Two-thirds of fills happened with zero trades in the prior 5 seconds. Sweeps hit within 200 ms, which is faster than a residential HTTPS cancel can cross the Pacific.
- Queue-position joining (
touch = "join"), quadratic/aged inventory skew, multi-level quoting, andquiet_pull_ms: None turned the math positive. Every setting—even the best one—lost to holding across four recorded windows (−19 USDT at 6 bps). On an out-of-sample falling ZEC window (Nov 1–3), the best setting finished −19.7 USDT behind holding (−6.2 bps 1s markout). - Expanding to all seven crypto pairs (Nov 7–9, 2026): I ran it with
post_only, 130/600 ms latency, and asymmetric requoting (~$60 per quote, $600 max inventory). Every single pair lost to holding, with negative 1-second markouts on every pair every day. The total was −200 USDT at 4 bps and −137 USDT at 6 bps (ZEC −37.5, ETH −29.5, XRP −27.7, HYPE −16.5, ADA −10.1, SOL −9.3, BTC −6.5).
The takeaway: you can’t out-cancel informed flow over a 130 ms retail HTTPS link on Binance.US. market_maker stays in Kestrel because it’s a good stress test for order-lifecycle code. It’s not something I expect to make money with from my desk in California.
Breakout & Chart Patterns: Great in Six Months, Gone in Four Years
If millisecond games belong to colocated market makers, the logical move is to slow down to hourly and daily bars where 130 ms doesn’t matter.
breakout became Kestrel’s Swiss Army knife for price-action setups, covering 14 setups in total. Eleven come from Charles Kirkpatrick’s chart-pattern webinar deck for Fidelity, which builds on Kirkpatrick & Dahlquist’s Technical Analysis. Those cover narrow range (nr), inside bar (inside), rectangle, pipe bottom (pipe), failed_breakdown, double_bottom / triple_bottom, inverse_head_shoulders, ascending and symmetrical triangles, and cup_handle. The other three are Kestrel’s own additions: an N-bar range breakout (range), the opening-range breakout (opening_range), and the Fair Value Gap (fvg). Short setups mirror bar prices internally, so the state machine only has to be written once.
Crypto Breakouts: The Six-Month Illusion vs. Four-Year Reality
On an initial 6-month crypto sample (May–October 2026, 1-hour bars, ~$1,000/trade, filled on 1-minute bars), breakout looked awesome:
- 1-hour
rangebreakouts made +4,677 USDT (−7.0% max drawdown). Adding stop-and-reverse pushed that to +5,541 USDT. - 1-hour
double_bottomsetups made +1,386 USDT (61% win rate, 6 of 7 pairs up, −1.9% max drawdown). - Symmetrical triangles made +1,187 USDT (mostly ZEC).
Then I pulled four years of history (2022–October 2026) and watched almost all of it evaporate:
- Unfiltered 1-hour
rangebreakouts dropped to −0.05%/trade across 5,174 trades.double_bottomdropped to −0.01%/trade. ZEC, the hero of May–October 2026, was actually the worst pair over the full four years. - Adding a
trend_sma = 1000filter rescued 1-hourrangebreakouts only to +0.11%/trade (2,709 trades, +0.10% without ZEC). Even then it was flat or negative in 2022, 2024, and 2025 (without ZEC: −0.30% in 2025).
The one crypto breakout configuration that survived the 4-year test was dead simple. It’s a daily 10-day-high breakout (setup = "range", range_bars = 10) with a buy stop, held for 1 day (max_hold_bars = 1):
- Across the 7 Binance.US pairs from 2022 to November 2026 (after fixing a subtle hold-bar off-by-one bug in commit
8f3e7be), it logged 697 trades at +0.82%/trade (+0.79% without ZEC) and a 51% win rate. All 7 of 7 pairs were positive, and only 2022 was negative (−0.29%). - Compounding each pair on its own 1/7th slice of the account returned roughly +93% vs. +111% for buy-and-hold. Without ZEC, it returned +98% vs. +1% for buy-and-hold. (Sharing one account across all 7 pairs below reached +112%, since one pair’s gains enlarge the equity sizing every later trade.)
Testing the 10-Day Breakout Out-of-Sample on Kraken (2015–2021)
I had already looked at 2022–2026 Binance.US data, so I pre-registered an out-of-sample test. It used 11 Kraken USD pairs from 2015–2017 (Period A) and 2018–2021 (Period B), checked against 1,000 random-entry simulations. I included faded coins like ETC, DASH, REP, and EOS so survivorship bias wouldn’t sneak in.
| 10-Day Crypto Breakout (Kraken, 11 pairs) | Period A, 2015–2017 (10 bps) | Period B, 2018–2021 (10 bps) | Period A (35 bps) | Period B (35 bps) |
|---|---|---|---|---|
| Avg return over drift / trade | +1.99% (457 trades) | +0.67% (1,277 trades) | +1.48% | +0.16% |
| Day-clustered random 95th pct | +0.95% | +0.52% | +0.44% | +0.02% |
| Share of clustered random runs >= breakout | 0.001 | 0.018 | 0.001 | 0.018 |
Breakouts cluster on market-wide green days, so I also clustered the random entries by calendar day. Since trading fees hit both the strategy and the random entries equally, it beat the random baseline at both cost levels (once two bad January 2018 opens were dropped). That passed the per-trade test I had pre-registered and earned it a paper-trading run. Still, its net profit over drift thinned out in 2018–2021 (clustered t = 1.54 at 10 bps), and at 35 bps (t = 0.38) that gain wasn’t distinguishable from zero.
The catch showed up in a second pre-registered check, when I ran all pairs inside one shared portfolio account. Each entry took 1/N of daily equity (1/11th on Kraken, 1/7th on Binance.US), leaving out the 9 trades that touched bad prints (5 on Kraken and 4 on Binance.US). The “BTC + cash at same volatility” benchmark holds just enough Bitcoin, with the rest in cash, to match the strategy’s ups and downs:
| One-Account 10-Day Breakout | Kraken A (10 bps) | Kraken B (10 bps) | Kraken B (35 bps) | Binance.US 2022–2026 (7 bps) |
|---|---|---|---|---|
| Strategy Sharpe / Total Return | 2.41 / +303% | 1.00 / +153% | 0.46 / +42% | 1.13 / +112% |
| BTC + cash at same volatility | 2.05 / +224% | 0.78 / +99% | 0.78 / +98% | 0.46 / +32% |
| Max Drawdown | −11.8% | −22.6% | −31.4% | −17.1% |
It failed one of the five conditions. At Kraken’s 35 bps/side retail taker fee in 2018–2021, fees ate the edge (+42% vs. +98% for vol-matched BTC+cash). At 35 bps in 2015–2017 it barely stayed ahead (Sharpe 2.08 vs. 2.05). None of the leads it did have were statistically significant either (the best p-value was 0.08, on Binance.US). It has a few other drawbacks too:
- It sits in cash 45–59% of the time.
- Its worst single-day drops reach −10.1%. That happens when 8+ coins break out together and reverse.
- It correlates +0.59 to +0.68 with
trend_ensemble, because both buy the same rising coins.
It’s strictly a low-fee-venue strategy (like Binance.US’s 2 bps taker). Even there it doesn’t cleanly replace trend_ensemble.
Stock Chart Patterns: Defeated by Passive Drift
On equities, intraday setups lost money: double bottoms on 1m–15m bars lost 5–21 bps/trade after estimated spreads, and every opening-range breakout variant lost 7–19 bps/trade.
Daily chart patterns across 35 Schwab stocks and ETFs (January 2016 – November 2026) looked promising at first glance. Then I subtracted passive drift and checked how much depended on a handful of lottery-ticket winners:
| Daily Stock Setup (35 symbols, 2016–2026) | Trades | Avg / Trade | Passive Drift | Over Drift | t-stat | Without Best 5 Trades |
|---|---|---|---|---|---|---|
Ascending triangle (range_bars=60) |
407 | +1.90% | +1.24% | +0.67% | 1.3 | +0.06% |
Cup-and-handle (range_bars=250) |
152 | +2.30% | +1.67% | +0.62% | 0.7 | −0.66% |
Double bottom (range_bars=60) |
327 | +0.90% | +0.89% | +0.01% | 0.0 | — |
| Failed breakdown | 967 | +0.95% | +1.38% | −0.43% | −1.4 | — |
Those are four of the six chart setups I tested (the full table is in the research log). Not a single stock chart pattern beat buy-and-hold with statistical confidence. Drop the five luckiest trades (including a single DKI trade at +90% over drift), and ascending triangles collapse to +0.06%. Cup-and-handle turns negative at −0.66%. Shorting the mirror patterns (double tops, descending triangles, inverted cups) lost on almost everything, even before borrow fees. Adding stop-and-reverse or resting limit targets made the long setups worse.
Momentum Rotation, Mean Reversion, and Moving Averages
ma_crossover (The Control Group)
ma_crossover (10/30 SMA or EMA) exists mainly as a clean, readable worked example of Kestrel’s Strategy interface. On May–October 2026 crypto 1-hour bars it made +2,301 USDT with an SMA (+2,023 from ZEC alone) and +1,067 USDT with an EMA (+1,053 from ZEC). It’s great for verifying that the paper and live plumbing work. It’s not meant to be traded seriously.
momentum_rotation (A Textbook Out-of-Sample Warning)
momentum_rotation was inspired by Liu, Tsyvinski & Wu (2022) and Antonacci’s Dual Momentum. It ranks a basket of coins by trailing return (lookback_bars = 28) and skips coins with a negative return (positive_only = true). Every 7 days it rebalances into the top three (top_n = 3).
On 11 Binance.US USDT pairs (2022–October 2026), it looked like a monster:
| Setting (11 Binance.US USDT pairs) | Return | Max Drawdown | Without ZEC | Max Drawdown (No ZEC) |
|---|---|---|---|---|
| 28d lookback, top 3 (default) | +609% | −68% | +51% | −71% |
| 7d lookback, top 1 | +1,212% | −81% | −51% | −84% |
| Hold BTC | +66% | −67% | — | — |
Look at 7d / top 1: +1,212% with ZEC, −51% without it. The default got about $54k of its $61k profit from ZEC, and without ZEC (+51%) it trailed just holding Bitcoin (+66%). Of the four settings I tried, only the 14-day lookback beat BTC without ZEC.
When I ran it through the pre-registered Kraken 2015–2021 out-of-sample test, reality hit hard.
Portfolio tests use Period A8 in place of Period A. EOS, REP, and XLM are missing Kraken bars from August 2017 to February 2018. Holding them in a benchmark would have frozen their prices right through the 2017 bubble peak, so Period A8 runs 2015–2017 on the other eight coins. (The 10-day breakout’s per-trade test didn’t need a portfolio benchmark, so it used all 11.) momentum_rotation also held cash until it could rank enough coins, so its A8 numbers start at its first trade in September 2016.
- 2015–2017 (A8, 10 bps): Sharpe 2.99 (+2,085%, −49.1% DD). That’s actually behind volatility-matched BTC+cash at Sharpe 3.32 (+3,153%).
- 2018–2021 (B, 10 bps): Sharpe 0.32, −34.3% return, and a brutal −89.9% drawdown (vs. vol-matched BTC+cash at Sharpe 0.79 and +231%). At 35 bps it fell to −49.7%.
momentum_rotation failed. Even with the ZEC warning, a +609% equity curve is awfully tempting to put live money behind. The pre-registered Kraken test is what settled it.
mean_reversion (Connors RSI(2) Pullbacks on Stocks)
mean_reversion defaults to Wilder’s RSI(14). Its hourly example buys when RSI(14) dips below the lower Bollinger band, with a stop 2.5× ATR below entry. (ATR, or Average True Range, measures how much a bar typically moves.) On 1h BTC/USDT from January 2025 to November 2026, that setup lost 2.27% of a 10,000 USDT account over 155 trades. It also supports Larry Connors’s classic RSI(2) daily stock pullback: buy when RSI(2) = 90).
On SPY and QQQ from March 2016 to November 2026 (15 shares from a $10k account, next-open fills):
| Symbol & Setup | Return | Max Drawdown | Trades | Win Rate | Days Invested |
|---|---|---|---|---|---|
| SPY Connors + 200d SMA | +23.26% | −5.77% | 93 | 70% | 11% |
| SPY Connors (no 200d filter) | +26.48% | −14.74% | 125 | 67% | 16% |
| QQQ Connors + 200d SMA | +18.74% | −4.94% | 89 | 66% | 12% |
| Buy & Hold 15 shares (SPY / QQQ) | +85% / +88% | — | 1 | — | 100% |
It sits in cash almost 90% of the time and wins roughly two-thirds of its trades. The 200-day filter cut SPY’s 2020 crash drawdown from −14.7% to −5.8%. But because it’s barely invested, it makes a fraction of buy-and-hold’s dollar return.
Does RSI(2) <= 10 have a real timing edge beyond uptrend drift? To find out, I ran it across 34 Schwab symbols (2,396 trades, 2016–2026) against random uptrend entries using the exact same exit:
- Overall: +0.136%/trade over drift (22 of 34 symbols positive). That beat 100% of plain random-entry runs (95th pct: +0.046%).
- Stocks vs. ETFs: Almost all of the edge came from 20 individual stocks (+0.239%/trade). Across 14 ETFs it was essentially noise (+0.014%/trade).
- Day-clustered random entries: Selloffs can trigger up to 23 symbols on the same day, so I also clustered random entries by day. It still beat the 95th percentile overall (share 0.016), but not in either half alone (2016–2021 0.058, 2022–2026 0.172; clustered t = 1.3).
Verdict: A mild, plausible short-term pullback edge on individual stocks, practically invisible on ETFs. Swapping the flat 5 bps slippage for each stock’s measured 09:30–09:31 half-spread only trims the 20-stock average from +0.24% to +0.21%/trade (tight 2–4 bps mega-caps offset wide names like MMM at 35 bps). Even so, its entries pile into the same market-wide selloffs, and once the statistics account for that clustering (t = 1.3–1.4), there’s very little standalone portfolio edge left.
Trend Ensemble: The One Strategy That Passed Out-of-Sample
After watching market making, chart patterns, and momentum rotation fall apart, I implemented trend_ensemble. It’s based on Zarattini, Pagani & Barbon’s 2025 paper “Catching Crypto Trends.”
The rules are simple. Every number comes from the paper, and I didn’t tune any of them:
- For each coin, run 9 Donchian channel trend models (
lookbacks = [5, 10, 20, 30, 60, 90, 150, 250, 360]days). Each model goes long when the day’s close is the highest close of its last N days. It exits on a ratcheting stop at the channel’s midpoint—halfway between the N-day highest and lowest closes—which moves up after each bar and never drops:max(prior_stop, (highest_close + lowest_close) / 2). - Size each coin’s position by the fraction of models currently long, scaled to an annualized 25% volatility target (90-day realized volatility) and capped at 1× spot (no leverage). It trades whenever the number of models long changes. To cut down on churn when that count stays the same, it only resizes if the target position shifts by more than 20% (
rebalance_threshold = 0.2).
Step 1: Replicating the Paper on Kraken BTC (2015–2025)
Before trusting my C++ implementation, I checked it against the paper’s published Bitcoin results in two steps. First, I wrote a small Python replication of the paper’s formulas and ran it on Kraken’s daily BTC bars (January 2015 – March 2025):
| BTC/USD (Jan 2015 – Mar 2025) | CAGR | Volatility | Sharpe | Max Drawdown |
|---|---|---|---|---|
| Paper Table 3 (10 bps, 20% threshold) | 30% | 17% | 1.56 | −19% |
| Python replication (10 bps, 20% threshold) | 27.3% | 16.6% | 1.53 | −19.5% |
| Hold BTC | 73.1% | 70.5% | 1.13 | −83.6% |
The replication landed within 0.03 of the paper’s Sharpe and within a point of its max drawdown. Returns ran 2–3 points a year lower. That’s most likely because Kraken’s thin 2013–2015 market differs from the paper’s multi-exchange index.
Second, I ran Kestrel’s own C++ trend_ensemble on the same bars. It needs 1,081 days of warm-up, so it starts in September 2016. From there to March 2025, Kestrel and the replication produced the same result: 28.6% a year at 16.4% volatility, a Sharpe of 1.61, and a −19.5% max drawdown. (Holding BTC over that window made 79.5% a year with a −83.6% max drawdown.)
That gave me real confidence that Kestrel’s math was faithful to the rules.
Step 2: 11 Binance.US USDT Pairs (Dev + Holdout)
On 11 Binance.US pairs (1,000 USDT, 2 bps taker + 5 bps slippage):
| 11 Binance.US USDT Pairs | Dev (Jan 2022 – Dec 2024) | Holdout (Jan 2025 – Nov 14, 2026) |
|---|---|---|
trend_ensemble (default 9 lookbacks) |
+31.8%, −7.2% DD, Sharpe 1.21 | +3.4%, −5.8% DD, Sharpe 0.30 |
trend_ensemble without ZEC |
+35.4%, −7.6% DD, Sharpe 1.28 | −1.6%, −8.1% DD, Sharpe −0.09 |
| BTC + cash (same volatility, ~15% BTC) | +16.4%, −13.2% DD, Sharpe 0.68 | −3.7%, −10.2% DD, Sharpe −0.26 |
| Hold BTC | +96%, −67% DD | −32%, −53% DD |
This was the first strategy in the entire project to beat a volatility-matched BTC+cash benchmark in a holdout period even without ZEC (−1.6% vs. −3.8% for its risk-matched mix, Sharpe −0.09 vs. −0.26). It also cut max drawdown nearly in half. Still, that margin without ZEC was just ~2 percentage points across two years of falling prices. It averaged only ~10% of equity invested (peaking around 40%), and idle USDT on Binance.US earns 0% interest.
Step 3: The Pre-Registered Kraken Out-of-Sample Test (2015–2021)
Then came the real stress test. I ran it on 11 Kraken USD pairs (eight of them in 2015–2017, the A8 set from earlier, and all 11 in 2018–2021) at both 10 bps and 35 bps per side. Cells show the Sharpe, then the total return:
| Pre-Registered Kraken Test | Period A8 (10 bps) | Period B (10 bps) | Period A8 (35 bps) | Period B (35 bps) | Max DD (A8 / B) |
|---|---|---|---|---|---|
trend_ensemble (default) |
3.01, +74.2% | 1.05, +40.2% | 2.94, +71.8% | 0.95, +35.7% | −4.2% / −7.5% |
| BTC + cash (same vol) | 2.04, +45.4% | 0.79, +28.7% | — | — | — |
trend_ensemble [20, 55] |
3.02, +87.3% | 1.15, +55.8% | 2.97, +85.0% | 1.09, +51.9% | −4.6% / −7.3% |
| Equal-weight coins | 2.00 | 0.56 | — | — | — |
trend_ensemble passed every pre-registered hurdle. It beat volatility-matched BTC+cash and equal-weight coins in both periods at both cost levels. As with the other leads in this post, individual 2–4 year Sharpe gaps are mostly within noise in a paired 20-day block bootstrap. Only Kraken A8 at 10 bps sits near p = 0.05 (0.04–0.06), while Kraken B and Binance.US land at p = 0.20–0.38. Chaining the full 12-year crypto span from 2015 to 2026 (Sharpe 1.38 vs. 1.00, +233% vs. +136%) gives p ≈ 0.09–0.12—a consistent edge across regimes, not a statistical slam dunk.
Its drawdowns also stayed in single digits (−4.2% and −7.5%) during years when crypto crashed 80%+. Even better, profits weren’t carried by one lucky coin:
- In Period A8 (+$74,183), gains came from BTC (27%), ETH (23%), LTC (12%), ETC (10%), XMR (9%), ZEC (7%), XRP (7%), and DASH (6%).
- In Period B (+$40,156), all 11 coins contributed positively (led by ETH 22%, BTC 20%, ETC 14%, XRP 9%, XMR 8%, LTC 8%).
Side Note: A stripped-down 2-model variant (lookbacks = [20, 55]) cut fills by ~75% and actually scored slightly higher. It made +11.0% vs. +3.4% in the Binance.US holdout through November 14, and posted a Sharpe of 1.15 vs. 1.05 on Kraken B. Across the Kraken periods and fee tiers, none of those Sharpe differences were statistically significant (p = 0.16 to 0.52). So the 9-model paper default stays the baseline, while [20, 55] runs alongside it in forward paper testing.
Step 4: Another Exchange, Other Settings, and Slower Fills
Since this was the one strategy I was going to write about as a success, I pre-registered two more checks before running them. Was the Binance.US result an artifact of one exchange’s thin order books? And did it depend on the paper’s exact settings, or on trading right at the daily close?
- Kraken’s bars for the same 11 coins: Sharpe 1.18 in 2022–2024 and 0.65 in January 2025 – September 2026, vs. 0.68 and 0.06 for Kraken BTC+cash at the same volatility. Binance.US’s bars gave 1.21 and 0.66 over the same days, with a 0.98 daily correlation between the two runs. Kraken’s downloadable archive stops on September 30. Extending the Binance.US run through November 14 took its holdout return from +7.8% down to +3.4% (Sharpe 0.66 to 0.30, matching Step 2), while BTC+cash dropped from 0.05 to −0.26.
- Six settings, one at a time:
target_volat 0.125 and 0.5,rebalance_thresholdat 0.1 and 0.4, andvol_barsat 45 and 180. Every variant beat BTC+cash in all four periods (Kraken A8, Kraken B, and both Binance.US periods). The closest call wasvol_bars = 180in the Binance.US holdout (Sharpe 0.22 vs. −0.26). Doubling or halvingtarget_voljust doubled or halved the return, volatility, and drawdown, with the Sharpe within 0.07 of the default’s. - Filling 1, 4, or 12 hours after the 00:00 UTC close: At first I modeled late fills with order latency, but that delayed rebalance buys twice because buys wait for sells to clear first. Setting up that test is also what uncovered the walk bug in Trap #6. I fixed the walk and added a dedicated
--fill-delayflag that holds only close-triggered orders. Delaying fills 12 hours to 12:00 UTC cost just 0.05 of Sharpe in 2022–2024 and 0.10 in the holdout, and it still beat BTC+cash (0.19 vs. −0.26).
Both checks held up. There was one catch, though, and it’s the ZEC problem again. On both exchanges, ZEC made most of the 2025–2026 profit (95% of it on Kraken’s bars, 84% on Binance.US’s). Without ZEC, the Binance.US holdout lost 1.6% (Sharpe −0.09). That’s still ahead of BTC+cash at the same risk (−0.26), but only because Bitcoin lost more.
vol_bars = 45 did best in three of the four periods. I didn’t switch to it. With nine variants and three data sets, one of them doing better is what you’d expect by chance.
Step 5: Does trend_ensemble Work on US Stocks and ETFs?
No—at least not better than just holding the same things at the same risk. I ran it on Schwab daily bars with days_per_year = 252, 100,000 USD in whole shares, filled at the next open at 5 bps per side. The single-stock and 2003–2014 tests were pre-registered. Again, each cell shows the Sharpe and the total return, with the benchmark mixed with cash to the strategy’s volatility:
| Test | Period | trend_ensemble |
Benchmark (same volatility) |
|---|---|---|---|
| 13 ETFs | Sep 2019 – Dec 2022 | 0.46, +7.9% | SPY + cash: 0.46, +8.0% |
| 13 ETFs (holdout) | Jan 2023 – Nov 2026 | 0.79, +16.8% | SPY + cash: 1.21, +27.4% |
| 13 ETFs | Jan 2003 – Dec 2008 | 0.44, +14.2% | SPY + cash: 0.10, +2.2% |
| 13 ETFs | Jan 2009 – Dec 2014 | 0.48, +16.1% | SPY + cash: 0.82, +30.2% |
| 18 single stocks | Aug 2019 – Dec 2022 | 1.00, +20.3% | The 18 held equally: 0.59, +11.3% |
| 18 single stocks | Jan 2023 – Nov 2026 | 0.80, +15.3% | The 18 held equally: 1.27, +25.9% |
The ETFs are SPY, QQQ, IWM, DIA, EEM, EFA, GLD, TLT, and five sector SPDRs. Until then I had only tested 2019–2026, a stretch with one long rally and two brief selloffs. Trend following’s whole case rests on long bear markets. Since Schwab serves daily bars back to 1999, I ran 2003–2014 to include the 2007–2009 crash:
- 2003–2008 is the case for trend following, and it shows. In SPY’s 51.8% crash from October 2007 to November 2008,
trend_ensemblelost 8.0% vs. 16.0% for SPY+cash at its volatility. Most of its six-year lead over SPY came from emerging markets, gold, and energy rising while SPY went sideways (EEM, GLD, XLE, and EFA drove 99% of its profit). Measured against an equal-weight basket of all 13 ETFs—which owned those winners too—it was basically a wash (Sharpe 0.44 vs. 0.36, p = 0.43). - 2009–2014 looks just like 2019–2026. Once the market bottomed in March 2009, a multi-year bull run took over, and sitting half in cash cost more than dodging the tail end of the crash saved.
The single stocks needed a different benchmark. Those 18 are the stocks I happened to store bars for, picked in 2026 because they matter now. Holding NVDA, TSLA, META, and AMD beats SPY handily with no timing at all, so I judged it against the same 18 stocks held equally. It led in 2019–2022 (not significantly, p = 0.16) and trailed in 2023–2026. It ran very quietly (about 5% volatility, 29% invested on average), but quiet isn’t the same as better.
The stored Schwab bars omit dividends and pay 0% on idle cash. Crediting historical 3-month T-bill yields and dividends to both sides changes no verdict, and in 2023–2026 it widens the benchmark’s lead. At ~5% volatility, SPY+cash holds more idle cash (65–78%) than the diversified 13-ETF strategy (52–59%), so ~4.5% T-bill rates push SPY+cash to +44.8% vs. +31.8% for the strategy. On the 18 stocks, the same stocks held equally with cash reach +45.9% vs. +32.9%.
Why It Works on Crypto and Not on Stocks
To see why, I split each run’s days into bear markets and everything else. Here, a bear market runs from a peak to the lowest close before a new high, using a 30%+ drop threshold for BTC and 20%+ for SPY. Each strategy is compared against its volatility-matched benchmark:
| Run | Bear Markets: Strategy / Benchmark | Everything Else: Strategy / Benchmark |
|---|---|---|
| Kraken, 2015–2017 (vs. BTC) | −9.6% / −15.8% | +92.6% / +72.7% |
| Kraken, 2018–2021 (vs. BTC) | −8.9% / −22.9% | +53.8% / +66.9% |
| Binance.US, 2022–Nov 2026 (vs. BTC) | −9.3% / −21.4% | +51.0% / +43.4% |
| 13 ETFs, 2019–2026 (vs. SPY) | −9.2% / −16.5% | +39.6% / +58.2% |
| 18 stocks, 2019–2026 (vs. the 18) | −13.2% / −17.1% | +59.9% / +65.8% |
It lost less during bear markets in every single run. What differs is how long and deep those bear markets are. Crypto’s were brutal: BTC fell 81% over 343 days in 2018 and 67% over 324 days in 2022. Sidestepping most of that damage easily outweighed what trend_ensemble gave back during recoveries. On US ETFs, the selloffs were brief (the 2020 COVID crash lasted just 23 trading days) and the recoveries turned into multi-year rallies, leaving it behind.
Side Note: Since crypto trend_ensemble barely moves with SPY (a daily correlation of +0.19), I also checked it as a slice beside SPY from 2022 to November 2026. Sixty percent SPY, 20% trend_ensemble, and 20% cash made +39.4%, vs. +30.9% for 60% SPY and 40% cash at about the same volatility. Replacing 20% of an all-SPY portfolio with it cut max drawdown from −25.4% to −21.3% while giving up 2 points of total return. Still, none of those differences cleared statistical significance (p = 0.09–0.11) over a single sub-five-year span, so I’m filing this under “interesting” rather than “proven.”
The Graveyard of Screened Ideas (FVGs, Turtles, and Intraday Signals)
I didn’t write a C++ version of every idea floating around trading blogs and YouTube. Instead, I screened several popular strategies directly against Kestrel’s database first. A few highlights from the rejection pile:
- Fair Value Gaps (FVGs): An FVG is a three-candle pattern where the first and third candles’ wicks don’t overlap. I tested these across 11–14 crypto pairs (1h, 4h, 1d) and 35 Schwab stocks (30m, 1d) against a control group of ordinary 3-bar up moves of the exact same ATR size. Do price gaps fill or bounce any differently than normal bars? No. Fill rates were 71–76% for gaps vs. 68–79% for non-gap controls. Once filled, both hit their stop first 62–74% of the time. Every resting-limit variant either lost money or lagged passive drift, including the full textbook setup: an FVG inside a Fibonacci pullback after a trend-break “change of character” (CHoCH). Kestrel’s built-in
fvgsetup buys a breakout above the third candle instead of waiting for a pullback. It lost 0.07% to 0.15%/trade on crypto 1h and trailed passive drift by 0.10%/trade on daily stocks. - Modified “YouTube Turtle” Breakouts (20/10 & 55/20, 2 ATR stop): The classic Turtle rules trade futures long and short and add to winners. A popular video showed a long-only, no-pyramiding version on a 5-asset portfolio (SPY, QQQ, GLD, SLV, BTC/USD) compounding +2,957% (37.5% CAGR).
- The catch: When I replicated the rules, the secret turned out to be hidden leverage. 2 × ATR(20) on SPY or GLD is only ~2% wide, so risking 2% of the account’s high-water mark puts ~100% into a single ETF. That drives the portfolio to 584% peak notional exposure (5.84×), paying ~$759k in swap fees on a $100k account.
- The real result: Capped at 1× spot (2% of current equity, 25% max per asset), it made +578% (19.5% CAGR, Sharpe 1.32). That’s virtually identical to passively holding 45% in those 5 assets and 55% in cash (+564%, 19.3% CAGR, Sharpe 1.34).
- Timing edge: Across 10 macro ETFs individually, Turtle breakouts showed none: 9 of 10 had |t| <= 0.86, and the tenth (EFA) was negative (t = −1.91). Bitcoin alone showed a likely trend edge (+6.80 bps/day over exposure-matched hold, t = 2.33). I say likely rather than proven because it was one of 11 assets tested.
- Intraday Momentum & Time-of-Day Effects: Gao, Han, Li & Zhou found the market’s first half-hour predicts its last half-hour. Crypto never closes, so I used the US session so far as the signal. Both effects existed with the right sign, and both died immediately on transaction costs. On crypto 30m bars (2022–2026), US session-so-far returns predicted the final 30m by +2.35 bps and the final hour by +3.84 bps. Holding BTC from 21:00–23:00 UTC averaged ~4 bps/day. None come close to clearing 14 bps round-trip costs.
- Classic ETF Tactical Screens (2023–2026 holdout, 1 bp per side): Turn of the Month (+11%), Dual Momentum (+68%), GTAA-5 (+36% vs. +50% holding the 5 ETFs), and Internal Bar Strength IBS < 0.2 (+8% to +17%) all trailed simply holding SPY (+92%). My screens stayed close to the published rules, with two minor tweaks. Turn of the Month held SPY from two trading days before month-end through three days after (Lakonishok and Smidt's original window started one day before). And GTAA-5 swapped emerging markets and gold in for Faber's REITs and commodities.
Where Things Stand (Live Paper Runs and What’s Next)
Right now, Kestrel’s paper testing covers what actually survived, not what sounded exciting on day one:
- Active Paper Forward Tests:
trend_ensemble(default 9 lookbacks across 11 Binance.US USDT pairs, 1,000 USDT) has been running forward since November 23 as Run 49, with the leaner [20, 55] variant beside it as Run 51. In the first five days, Run 49 moved from cash into small positions in six coins (2.7% invested, down 0.28 USDT), while Run 51 hadn’t found a trend yet. Five days tells you nothing about a strategy’s edge. A backtest over the same days started at 00:00 UTC on November 23 placed the exact same six orders (same coins, same days, and same quantities). Started at 03:03 UTC, when Run 49 actually started, it bought LINK two days late, a backtester quirk now on my list.
- The 10-day daily breakout started on November 28 as Runs 52–58, one process per Binance.US pair on 100 USDT (or USD) each, judged against holding each pair.
- A long-only 20/10 Turtle on BTC/USDT (Run 50) is armed, but Bitcoin hasn’t come near its 20-day high yet.
- Earlier, 1-hour
breakoutrangepaper instances (Runs 16, 17, and 19–21) exercised the order, stop, and risk-gate plumbing in live conditions. - Once each run has a few weeks of trades, I’ll check every paper fill against a backtest over the same days.
- What I’m Building Next (Before Unattended Live Money): Looking at
TODO.md, I’m intentionally pausing new strategies and indicator chasing. The focus is on operational boringness:- Dead-man’s-switch heartbeat alerts, so I find out immediately if a running process dies silently. (Discord alerts for error lines, late bars, dead feeds, and risk-gate actions are already in.)
- Cleaning the bad historical bars the scan flagged out of TimescaleDB, and adding import-time outlier checks. Future backtests shouldn’t get poisoned by $138,070 BTC wicks.
- Pushed WebSocket execution streams (
ACCT_ACTIVITYon Schwab, the Binance.US user-data stream, Kraken v2 executions) to cut down fill-report lag. - Native random-entry baselines and walk-forward parameter sweeps right inside
kestrel_app backtest. Checking a strategy against coin flips should be a single flag, not an ad-hoc script.
Conclusion
Building Kestrel and running real strategies through it turned out to be a humbling experience. It was also a lot of fun. A few takeaways I’m carrying forward:
- Latency and costs are not footnotes: Turning on 130 ms / 600 ms latency did more to change
market_maker‘s results than every spread, skew, and microprice parameter combined. A 30-minute live run then matched the simulator’s adverse selection penalty within 0.01 bps (−3.00 vs. −2.99, on just 43 fills). - Always check what happens without your luckiest coin (and without passive drift): Subtracting ZEC/USDT cut
momentum_rotationdown to size, and it showed that eventrend_ensemble‘s 2025–2026 profit was mostly one coin. Subtracting passive equity drift wiped out every daily stock chart pattern I tested. - Pre-registered out-of-sample tests save real money:
momentum_rotationlooked great on 2022–2026 Binance.US and fell apart (−34%, with an −89.9% drawdown) on 2018–2021 Kraken.trend_ensembleheld up across both periods, both fee tiers, a second exchange’s data, and every setting I varied. - Test your tester: A walk-order bug in my own backtester was filling stock orders at a price you can’t actually get. It took rerunning every multi-symbol test to confirm no verdict had changed.
- Dirty data hides in plain sight: Scanning 4.7 million stored bars turned up 73 bad-print flags. It also turned up multiple multi-month exchange outages that quietly distorted earlier backtests.
- Slow, boring trend following beat everything flashy on crypto: Nine Donchian channels, volatility targeting, spot-only sizing, and no leverage—no secret indicators required. On US stocks and ETFs, where selloffs are short and rallies are long, it couldn’t beat just holding at the same risk.
There’s still a list of ideas I haven’t tried, like a volatility squeeze breakout, pairs trading between two coins, and session VWAP reversion. Intraday equity setups like opening-range breakouts on “stocks in play” also need years of 1-minute bars. The Databento importer from the fourth post is ready to fetch them—I just held off on paying for multi-year minute history until I tested the free daily ideas first. Testing those against the same honest scoreboard, along with how the paper runs hold up over a longer window, is a good topic for a future post.
That wraps up this five-part tour of building Kestrel from scratch. It went from architecture and AI coding guardrails, down to C++23 internals and brokerage quirks, and finally to testing real strategies against real market friction. All the code, configs, and raw test logs are up on GitHub under the MIT license if you want to poke around or run your own experiments.
Have you ever had a backtest that looked unstoppable until real latency, opening spreads, or a single out-of-sample test brought it back down to earth? Drop a comment below. I’d love to hear your war stories!
