Work

ML research on market data (ClickHouse)

A ClickHouse analytics store feeding ML research on large-scale market data.

Result
<1 squeries over billions of rows

Billions of rows of tick data, queried in under a second.

Capital-markets research work

ML research on years of multi-venue market data needs fast queries. Slow queries mean fewer experiments.

In production
clickhouse-client · research@ch-mdcluster md_cluster · 6 shards
SELECT venue, toStartOfMonth(ts) AS month, count() AS ticks,
       round(avg(spread_bps), 3) AS avg_spread,
       round(quantile(0.99)(spread_bps), 3) AS p99_spread
FROM md.quotes_dist
WHERE symbol = 'BTC-USD' AND ts BETWEEN '2017-01-01' AND '2026-08-31 23:59:59'
GROUP BY venue, month ORDER BY month DESC, venue
venuemonthticksavg_spreadp99_spread
V12026-08-0141,208,1140.1841.412
V22026-08-0158,960,3270.1210.968
V32026-08-0117,442,9050.3372.705
V42026-08-0129,113,4800.2261.873
V52026-08-0112,875,6610.4023.118
585 rows in set (showing 5). Elapsed: 0.841 sec. Processed 6.84 billion rows, 95.78 GB (8.13 billion rows/s., 113.88 GB/s.) · peak memory 3.41 GiB
A research query over years of tick data.
research · feature runsmd.quotes_dist · 6.84 bn rows
runfeaturesrows scannedquerytrainval MAE (bps)
r-2291spread, depth L1-L56.84 bn0.84 s11m 40s0.041
r-2290spread, depth L1-L56.84 bn0.86 s11m 52s0.043
r-2288spread, trade imbalance4.12 bn0.57 s8m 05s0.047
r-2285spread, volatility 1m6.84 bn0.79 s10m 31s0.052
r-2281spread only (baseline)6.84 bn0.61 s4m 12s0.068
Tick data6.84 bnrows, 2017-01 to 2026-08
Feature query0.84 smedian over last 50 runs
Best runr-2291val MAE 0.041 bps
Research runs. Every feature query returns in under a second.

Representative views of production tooling. Data anonymized.

What we built
  • Market data into ClickHouse
  • Analytics store for tick data
  • Feature queries called from research code
ClickHousePythonKafkaKubernetes
Next case
Next step

Have a hard system to build?

Tell us what it has to do. We will tell you how we would build it.

Start a project

Tell us what the system has to do. We reply to every message.

Are you a professional investor?

By submitting this form, you agree to our privacy policy and terms of service.