market_model
The simulation layer. Provides stochastic processes, the SimulationRunner,
model-agnostic strategies, and synthetic order book generation.
What is currently available
8 stochastic processes, all implementing Simulatable:
| Process | dim() | State type | Description |
|---|---|---|---|
GeometricBrownianMotion | 1 | f64 | Log-normal asset prices |
OrnsteinUhlenbeck | 1 | f64 | Mean-reverting diffusion |
CoxIngersollRoss | 1 | f64 | Non-negative mean-reverting diffusion |
HestonProcess | 2 | (price, variance) | Stochastic volatility with correlation |
JumpDiffusion | 1 | f64 | GBM with compound Poisson jumps |
BatesProcess | 2 | (price, variance) | Heston with jumps on the price |
HawkesProcess | 0 | intensity f64 | Self-exciting point process with configurable kernel |
RoughOrnsteinUhlenbeck | 1 | RoughOUState | Fractional OU via multi-factor Markovian approximation |
3 strategy types implementing PriceStrategy:
| Strategy | Description |
|---|---|
MaCrossover | Long when fast MA above slow MA |
RsiStrategy | Long on oversold, short on overbought |
BuyAndHold / AlwaysFlat | Baselines (always long / never trade) |
Simulation runner with:
- Pre-generated random normals (no RNG in the hot loop)
- SOA (structure-of-arrays) output layout for cache efficiency
rayonparallel path execution- Deterministic seeding for reproducibility
- Criterion benchmarks for GBM and Heston at multiple path counts
Order book stubs (order_book/ module): placeholder traits for
OrderFlowProcess and OrderBook. L1 BBO generation is available
through the engine's SimulatedDataSource. Full L3 generation with
Hawkes order flow is planned.
What is not yet available
- L2 or L3 order book depth simulation (L1 BBO generation only)
- Order flow processes (Poisson, Hawkes bilateral)
- GPU-accelerated path simulation
- Multi-asset correlation matrix support in the runner