A
Atelier
[ Open Source ]

Market Microstructure
Infrastructure for
Quantitative Research

Real-time multi-exchange data collection, nanosecond-resolution synchronization, and point-process modeling — built in Rust

Atelier dashboard

System Features

Advanced tools for comprehensive market analysis and data generation

[Fig 1. Exchange Connectivity]

Multi-Exchange Data Collection

WebSocket clients for Bybit, Coinbase, and Kraken stream full-depth orderbook snapshots, delta updates, public trades, funding rates, liquidations, and open interest — all normalized into a unified type system. The MarketWorker/WorkerSupervisor architecture handles per-symbol collection with exponential backoff reconnection (1s→30s) and graceful shutdown via watch channels.

Type-safe builder APIs (TradeBuilder, FundingRateBuilder) enforce validation at construction time. Exchange-specific JSON responses are decoded and normalized through per-exchange decoder modules, producing consistent Orderbook, Trade, FundingRate, Liquidation, and OpenInterest types regardless of venue. Configuration is driven by TOML manifests with exchange templates for rapid instrument onboarding.

BYBITorderbookstradesliquidationsfunding ratesopen interestCOINBASEorderbookstradesKRAKENorderbookstradesWSSWSSWSSNORMALIZEOrderbookTradeFundingRateLiquidationOpenInterestMARKET WORKERSupervisorreconnect: 1s → 30s exp. backoffCONFIG: TOML manifests | SHUTDOWN: graceful (watch ch)
EXCHANGE EVENTS (heterogeneous)OBTRLQFROICLOCK MODE: OrderbookDrivenMarketSnapshot (t=n)OBstatetradesaccumliqaccumFR+ OIMarketAggregate [15x1]→ Apache Parquet (Arrow)
[Fig 2. Temporal Alignment]

Grid Synchronization & Market Snapshots

The MarketSynchronizer aligns heterogeneous exchange events to a uniform nanosecond-resolution temporal grid. Four clock modes drive period boundaries: OrderbookDriven, TradeDriven, LiquidationDriven, and ExternalClock — each suited to different research and production workloads. Forward-filling handles gap management for up to 10,000 periods.

Each grid period produces a MarketSnapshot bundling the current orderbook state with accumulated trades, liquidations, funding rate observations, and open interest. The MarketAggregate distills each snapshot into a 15-scalar feature vector for downstream consumption. All core types serialize to Apache Parquet via Arrow with round-trip integrity verified by automated tests.

[Fig 3. Statistical Models]

Point-Process Modeling & Arrival Analysis

The atelier-quant crate implements Hawkes self-exciting point processes with exponential kernels (μ/α/β parameterization, stationarity constraint α/β < 1) and homogeneous Poisson baselines. Maximum likelihood estimation runs projected gradient ascent with Armijo line search. Model selection uses AIC/BIC comparison, with time-rescaling residuals and compensator analysis for goodness-of-fit diagnostics.

Interarrival time extraction from orderbook and trade timestamps provides full descriptive statistics: mean, variance, standard deviation, skewness, kurtosis, and coefficient of variation. CV ≈ 1 indicates Poisson arrivals; CV > 1 suggests clustering consistent with Hawkes dynamics. Ogata's modified thinning algorithm generates synthetic event sequences from fitted parameters for simulation and scenario analysis.

ARRIVAL TIMESΔt₁Δt₂Δt₃Δt₄Δt₅INTERARRIVAL STATSmean142.3 msskew2.41std198.7 mskurt8.93CV1.40→ CLUSTERINGλ(t) HAWKES INTENSITYλtμμ = 0.8α = 0.35β = 0.90ESTIMATION & DIAGNOSTICSMLEprojected gradient ascent + ArmijoFITAIC / BIC + time-rescaling residualsSIMOgata's modified thinning algorithm

Workflow

From configuration to analysis in three steps

01

Define Your Market

Configure target instruments and exchanges via TOML manifests. Select from Bybit, Coinbase, or Kraken perpetual and spot markets.

02

Collect & Synchronize

Deploy MarketWorkers that connect via WebSocket, normalize incoming events, and align them to a nanosecond-resolution temporal grid using your chosen clock mode.

03

Model & Analyze

Fit Hawkes or Poisson point-process models to arrival data. Extract interarrival statistics, run goodness-of-fit diagnostics, and export synchronized snapshots to Parquet.

Use Cases

Research and production workflows powered by atelier-rs

Market Microstructure Research

Collect synchronized multi-exchange orderbook and trade data at nanosecond resolution. Study liquidity dynamics, price formation, and information flow across venues.

Point-Process Calibration

Fit self-exciting Hawkes models to empirical trade and orderbook arrival data. Test clustering hypotheses against Poisson null baselines with rigorous MLE and diagnostics.

Quantitative Strategy Development

Generate MarketAggregate feature vectors from live or historical data. Build and validate trading signals from 15-scalar summaries of synchronized market state.

Architecture

Modular crate architecture / Rust workspace monolith

Stable

atelier-data

v0.0.13

Multi-exchange WebSocket connectivity, data normalization, temporal synchronization, and Parquet I/O.

  • Bybit, Coinbase, Kraken WSS clients
  • Orderbook, Trade, FundingRate, Liquidation, OpenInterest types
  • MarketSynchronizer with 4 clock modes
  • MarketWorker/Supervisor collection architecture
  • Apache Parquet serialization via Arrow
  • TOML-based configuration system
Stable

atelier-quant

v0.0.10

Hawkes and Poisson point-process models, MLE estimation, interarrival analysis, and simulation.

  • Hawkes process (exponential kernel, μ/α/β)
  • Poisson process (homogeneous baseline)
  • MLE via projected gradient ascent
  • AIC/BIC model selection diagnostics
  • Interarrival statistics (7 moments + CV)
  • Ogata thinning algorithm for simulation
Roadmap

atelier-engine

v

Matching engine for deterministic price-time priority LOB simulation and probabilistic fill models using calibrated Hawkes intensities.

  • Deterministic order matching (price-time priority)
  • Probabilistic fill models from Hawkes calibration
  • Synthetic orderbook generation
  • On-chain DEX integration (Uniswap, Raydium)
  • Cross-venue CEX↔DEX event normalization
Roadmap

atelier-retro

v

Event-driven strategy backtesting engine consuming MarketSnapshot streams with position tracking and execution simulation.

  • MarketSnapshot stream replay
  • Position and PnL tracking
  • Realistic slippage models
  • Strategy trait interface for pluggable logic
  • On-chain swap and lending rate replay

FAQ

Common queries and system information

[ Start ]
Building

Open-source market infrastructure for the next generation of quantitative research

Apache 2.0 License / Rust 1.85+ / Contributions Welcome