Quantitative Toolbox
Advanced quantitative methods available in Horizon's Rust core
Horizon’s Rust core includes a library of quantitative methods exposed to Python via PyO3. These cover state estimation, dependence modeling, market microstructure, execution optimization, pricing, and statistical testing.
All functions are called as hz.function_name() and run natively in Rust for performance.
State Estimation & Filtering
| Module | What it does |
|---|---|
| Kalman Filters | Linear and unscented filters for noise removal, hedge ratios, spread tracking |
| Change Point Detection | Bayesian online detection (BOCPD) for regime shifts |
| Particle Filter | Sequential Monte Carlo for nonlinear, non-Gaussian dynamics |
Dependence & Risk Modeling
| Module | What it does |
|---|---|
| Copula Dependence | Bivariate copulas (Gaussian, Clayton, Gumbel, Frank) for tail dependence |
| Vine Copulas | C-vine and D-vine for 3+ market tail risk |
| Entropy Pooling | Meucci’s framework for blending views with market probabilities |
| Robust Portfolio | Worst-case optimization under parameter uncertainty |
| HRP & Denoising | Hierarchical Risk Parity + Marcenko-Pastur covariance cleaning |
Market Microstructure
| Module | What it does |
|---|---|
| Market Making | Avellaneda-Stoikov with inventory skew and competitive spread blending |
| HJB Market Making | Hamilton-Jacobi-Bellman PDE for optimal inventory-aware quoting |
| Queue Position | Fill probability and expected fill time for limit orders |
| Cross-Impact | Multi-market price impact estimation |
| Volatility Signature | Two-scale realized vol and optimal sampling frequency |
| ACD Durations | Inter-event timing analysis for informed trade detection |
| Microstructure Invariance | Kyle-Obizhaeva scaling laws for bet sizing and impact |
Execution
| Module | What it does |
|---|---|
| Optimal Execution | Garleanu-Pedersen and Almgren-Chriss execution scheduling |
| Optimal Stopping | Longstaff-Schwartz for optimal exit timing |
Pricing
| Module | What it does |
|---|---|
| Characteristic Function Pricing | Heston, Merton, Variance Gamma for binary options |
| Logit-Space Pricing | Black-Scholes framework for prediction markets |
| Belief-Volatility Surface | Streaming EM decomposition of diffusion and jumps |
| Breeden-Litzenberger | Risk-neutral density from options chains |
Signal & Feature Construction
| Module | What it does |
|---|---|
| Bars & Labeling | Information-driven bars + triple barrier labeling (de Prado) |
| Fractional Differentiation | Stationarity with memory preservation (de Prado) |
| Elastic Net Selection | Lasso/ridge/elastic net for feature selection |
| Alpha Research | Meta-labeling, feature importance, alpha decay |
| Lead-Lag Networks | Hayashi-Yoshida correlation and Granger causality |
| Graph Analysis | Correlation graphs, MST, community detection |
Volatility & Statistics
| Module | What it does |
|---|---|
| Volatility Suite | 6 estimators: Parkinson, Garman-Klass, Yang-Zhang, EWMA, rolling |
| Bootstrap Methods | 11 bootstrap variants + jackknife bias correction |
| Correlation Regime | Live correlation tracking with regime shift detection |