Norma since 2022
My trading system, built solo. It connects to eight crypto exchanges, records everything that happens in their markets, replays that history to test trading strategies, and runs the strategies live.
- 8 exchanges connected
- 317 billion market events recorded
- ~2 TB of history
- Sep 2022 oldest record
Figures as of Nov 2026.
A market crash, replayed
An exchange’s order book is the live list of everyone waiting to buy or sell, and at what price. Norma records every change to it, so any moment can be rebuilt exactly. This is the sharpest drop of 20 November 2026 on Binance, Bitcoin against the dollar.
How I know it’s exact: 23.6 million recorded updates replayed in order with no gaps. The rebuilt prices match Binance’s own quotes within 20 milliseconds, and four independent snapshots agree on 90–98% of price levels.
BTCUSDT perpetual · Binance USDⓈ-M · 20 Nov 2026
- Time
- --:--:--.- UTC
- Last
- --,---.-
- Spread
- -.-
- Lowest since 15:58
- --,---.-
- Traded since 15:58
- --,---.--- BTC
- Futures − spot
- ---.-
- Orders waiting to buy (darker = more)
- Orders waiting to sell (hatched)
- Best buy / sell price
- Large buy
- Large sell (≥ 1 BTC)
- Forced sale
- Forced buy (liquidation)
- Traded per second (buys up, sells down)
Space play/pause · ←/→ 1 s · Shift+←/→ 10 s
BTCUSDT perpetual, Binance, 20 Nov 2026, 15:58–16:08 UTC. Price against time; shading is resting size in the order book (sell side hatched), circles are trades of 1 BTC or more (filled: buy, open: sell), triangles are forced sales and buys (liquidations). The price falls to 58,720.4 at 16:03:25.211.
Replay data failed to load.
Why the shortcut test misleads
Testing a strategy means replaying the past and asking what it would have done. The common shortcut uses one-minute candles: the opening, highest, lowest and closing price of each minute. It’s fast, but it assumes any order at a price the market touched was filled. The realistic test replays every order instead. Norma runs both and measures how far apart they land.
Same strategy, 128 settings, tested both ways
futures, trailing entries
Rank agreement (Spearman ρ)
0.78 (95% CI 0.64–0.91)
1.00 = both tests rank the 128 settings identically
Shortcut's pick ranks #124 of 128 in the realistic test
Realistic test's best ranks #77 in the shortcut test
Shortcut misleads
Pick the best settings for the martingale strategy with the shortcut test, and the realistic test ranks them 124th of 128.
The same 128 settings, tested both ways. Only rankings are shown. The shortcut counts as good enough when agreement ≥ 0.9 and the realistic test's best lands in the shortcut's top 5% (shaded).
Martingale: 128 settings ranked by the shortcut test and by the realistic test. Rank agreement 0.78 (Spearman ρ), 95% interval 0.64 to 0.91; 1.00 would mean identical rankings. Shortcut's pick ranks 124th of 128 in the realistic test. Realistic test's best ranks 77th in the shortcut test. Shortcut misleads.
One order, two answers
Step 5/5 A 2 BTC buy rests at $58,720.4Price falls to itShortcut testRealistic testResult
Limit buy, placed 15:58:00.040 UTC. Nothing was displayed at that price, so it is first in line.16:03:25.211 UTC: price reaches $58,720.4, the low of 15:58–16:08 UTC.The shortcut sees the 16:03 one-minute bar touch $58,720.4 and counts the whole order as filled.In reality the order fills only when someone sells at exactly $58,720.4. Only one such sale happened: 1.141 BTC at 16:03:25.211. Price came back to within $1.5 twice, but never traded there again.The shortcut overstates the fill by 0.859 BTC, 43% of the order. No one ever sold at that price again, and nothing traded below it.
Shortcut test (one-minute candles)
Fills when a bar's low reaches the price
Filled 2.000 BTC
Realistic test (every order replayed)
Orders ahead of mine in line: 0.000 BTC
Filled 1.141 BTC
- 16:03:25.211 · sell 1.141 BTC
Difference 0.859 BTC 43% of the order, never fillable
Four strategies, checked
For two of the four, the shortcut is good enough; for two, it would have picked badly. Knowing which is the point.
| Strategy | Agreement | Real best, by the shortcut | Shortcut’s pick, for real | Good enough? |
|---|---|---|---|---|
| Martingale | 0.78 | 77th | 124th of 128 | No |
| RSI reversion | 0.91 | 33rd | 4th | No |
| Spot inventory | 0.93 | 4th | 2nd | Yes |
| Trend following | 0.997 | 1st | 1st | Yes |
Agreement: 1 means both tests rank the settings in the same order.
How it’s put together
Two halves share one way into the exchanges: live trading, and research. Scroll through the parts; the map highlights each one.
Live trading and research each have their own connection and database. They meet at the dashboard. Gateway: The only way in or out to an exchange. Every exchange speaks its own format; the gateway turns them all into one strict, typed interface (gRPC). Prices stay exact, and missing data stays marked as missing. It runs as several copies: one for trading, others for market data. Parts and connections:
- Exchanges: The eight crypto exchanges the system connects to: Binance, Bybit, Coinbase, Gate.io, Kraken, KuCoin, MEXC and OKX. With Gateway · trading, both ways: orders, fills, account. To Gateway · data: public streams, history. To Capture: bulk imports.
- Gateway · trading: The gateway’s trading copy: sends orders, receives fills and account updates. Same interface as the market-data copies. With Exchanges, both ways: orders, fills, account. With Engine, both ways: commands, fills. With State · trading, both ways: account facts. With Dashboard, both ways (operator control): venue facts, commands.
- Engine: Runs trading strategies live, behind safety limits: rate limits, position limits, circuit breakers and a kill switch. With Gateway · trading, both ways: commands, fills. With State · trading, both ways. With Dashboard, both ways: state, commands.
- Dashboard: Where I watch and steer everything: profit and loss, risk, fills, latency. It also starts imports and plays back the archive. With Engine, both ways: state, commands. From Archive: playback. With Lab, both ways: run control, results. With Gateway · trading, both ways (operator control): venue facts, commands. With State · trading, both ways (operator control). With Capture, both ways (operator control): requests, status. With State · data, both ways (operator control).
- State · trading: A Postgres database for live trading’s state, kept apart from research. With Gateway · trading, both ways: account facts. With Engine, both ways. With Dashboard, both ways (operator control).
- Gateway · data: The gateway’s market-data copies: live prices and history from every exchange. Same interface as the trading copy. From Exchanges: public streams, history. To Capture: live streams, historical reads.
- Capture: Records the market as it happens (every trade, price quote and order-book change) into the archive, and checks its own recordings for gaps. From Exchanges: bulk imports. From Gateway · data: live streams, historical reads. To Archive: writes. With State · data, both ways. With Dashboard, both ways (operator control): requests, status.
- Archive: Every recorded market event, in a database built for huge time series (ClickHouse). About 317 billion rows. From Capture: writes. To Lab: replay inputs. To Dashboard: playback.
- Lab: Replays the archive to test strategies. It can run the quick shortcut test (one-minute candles) or the realistic one (every order), across many machines. From Archive: replay inputs. With Optima, both ways: submissions, results. With State · data, both ways: run records. With Dashboard, both ways: run control, results.
- Optima: Searches for good strategy settings automatically, then re-checks the winners on data it never saw. It recommends; it never applies its own answer. With Lab, both ways: submissions, results. With State · data, both ways: study records.
- State · data: A Postgres database for research records, kept apart from live trading. With Capture, both ways. With Lab, both ways: run records. With Optima, both ways: study records. With Dashboard, both ways (operator control).
How it got here
- Late 2022Strategy ideas on paper, then in TradingView’s scripting language.
- 2023–25Quantra, the first real system: hand-written in Python, connected to six exchanges. repo →
- 2025An arbitrage engine: buying on one exchange and selling on another at the same moment.
- 2026Norma, rebuilt from scratch and designed end to end before any code was written.
- 2026Optima, its settings search, grew out of my Computational Optimization course at ITU.