← All work
Selected Work · Systems & Quant

A Self-Learning Trading System

I built an end-to-end automated trading-research platform — then used it to test whether simple strategies beat the market. They didn't. Here's the machine, and the honest result.

Python · SQLite ccxt · Upbit / Bithumb Walk-forward backtesting Real-money paper trading
−6.6%
KRW paper return (Bithumb)
−15.9%
USD paper return (Coinbase)
0 / 32
backtested methods with positive expectancy
<50%
win rate on most symbols
Equity curves for all trading systems, two of three trending downward
The result, up front. Paper-trading equity across all systems. Two of the three lost money — the USD book drew down nearly 17%. I'm leading with this on purpose: the point of the project was to find out the truth, not to sell a win.

What this is (and isn't)

This isn't a profitable trading bot — and I won't pretend it is. It's a research platform I built to answer one question rigorously: can simple, systematic strategies beat the crypto market after real costs?

To answer it honestly I needed the whole apparatus — data pipelines, a backtester, a way to promote only strategies that survive out-of-sample, live micro-orders to feel real slippage, and monitoring to catch myself fooling myself. So I built that. Then I let it run on real exchanges at tiny size and read the results without flinching.

The machine

The system runs itself on a weekly cycle — strategies are discovered, tested, promoted, and demoted with almost no manual input:

  1. Discover & backtest. Each strategy is scaffolded, then walk-forward backtested on candle history. Gate 1: win rate ≥ 45%, Sharpe ≥ 0.5, max drawdown ≤ 30%, n ≥ 20 trades.
  2. Out-of-sample gate. Survivors are re-tested on the most recent 90 days they've never seen. Gate 2 is stricter (Sharpe ≥ 0.9, expectancy ≥ 0.2%/trade). Two windows must both pass — the guard against overfitting.
  3. Paper, then tiny live. Promoted strategies trade on real exchanges at ₩5K per position — small enough to be safe, real enough to pay true fees and slippage.
  4. Condition gate. Before every signal the system reads the market regime (trend, volatility, RSI) and skips strategies whose learned profile says "you lose in conditions like these" — but stays fail-open when the data is thin, so no loop ever goes silent.
  5. Health & auto-demote. Every six hours a health check watches equity, win rate, drawdown, and stuck positions; a kill-switch and auto-demotion pull any strategy that breaks its drawdown limit.

Under the hood: two exchanges, seven signal engines (mean-reversion, RSI, momentum, Donchian breakout, a Fourier method, a volatility-regime filter…), online weight adaptation that re-weights the engines from realized outcomes, and per-symbol risk limits. The engine weights don't sit still — they chase whatever's been working:

Engine weight evolution over time, mean-reversion dominating
Online learning, and its trap. The adaptive weights drifted toward mean-reversion (60–78% of the book). In a trending, falling market that's exactly the wrong bet — the learning over-fit to a regime that then flipped.

The result — and why

When I backtested every setup method I could think of across both exchanges, the verdict was blunt and consistent:

Backtest results showing all methods have negative average expectancy
All 32 method-and-exchange combinations had negative average expectancy. Even the single best parameter combo (a breakout on UNI, +2.2%/trade) had only 20 trades behind it — not enough to trust. This is the real lesson: after fees and slippage, naive edges evaporate.

My own diagnosis of what went wrong — written before I knew I'd ever show it publicly:

  • Mean-reversion over-weighting. Online learning let one engine dominate; it needed hard per-engine weight caps.
  • Negative expectancy after costs. Sub-50% win rates plus real fees means long losing streaks in bad regimes.
  • Over-trading. 346,000 analysis steps produced ~8,000 trades in 20 days — turnover that magnifies every cost. The fix was an event-driven loop that only acts on high-conviction setups.
  • Fragile infrastructure. The Bithumb API changed format mid-run and killed the KRW loop — so I moved the primary market to Upbit.

What I took from it

The honest headline is that I didn't find a money-making strategy. But I don't think that's the failure it sounds like. Markets are close to a fair coin after costs, and most retail edges are noise — the valuable thing was building the machine rigorous enough to prove that to myself with data, instead of believing a pretty backtest and lighting real money on fire.

What I actually built is the part that transfers: a full research loop with honest out-of-sample gates, regime-aware risk control, and monitoring designed to catch self-deception. And I learned to report a clean negative result plainly — which, for anything I do next, matters more than a lucky curve ever would.

Read the full trading report (PDF) →
← All work