Translating mathematical structures from physics papers into quantitative factors, with empirical validation on real market data. Because paper-to-factor translation needs evidence, not argument.
Mathematical structure (box-counting dimension, Poisson clustering, Hurst persistence) often fails as a standalone alpha factor — and documenting clean failures is as valuable as finding signals. This repository shows three translations from arXiv:2603.14100 into quant factors, each validated on real A-share data, with rigorous IC comparison.
| Factor | IC (|r|) | Verdict |
|--------|--------|---------|
| Box-Counting Dimension D(t) | 0.005–0.072 | ❌ Dead — paper math doesn't survive market translation |
| Tail Event Clustering (KS p) | 0.297 |
Hurst H(t) is the only factor with both correct direction and horizon consistency: higher persistence → higher future volatility, with IC rising monotonically from 0.15 (5d) to 0.24 (60d). Tail clustering registers the highest absolute IC (0.30) but with an inverted signal direction, suggesting it may work as a reversal indicator rather than a warning signal.
math-to-alpha/
├── factors/ # Three factor implementations
│ ├── factor_box_count.py # 1. Box-Counting Dimension D(t)
│ ├── factor_tail_clustering.py # 2. Tail Event Clustering
│ └── factor_hurst.py # 3. Hurst Exponent H(t)
├── scripts/
│ ├── pull_data.py # AKShare data fetcher
│ └── run_all.py # Run all three factors in sequence
├── data/
│ └── 600519_daily.csv # 600519 daily data 2015-2024 (2431 trading days)
├── figures/ # Diagnostic plots + comparison summary
├── tests/ # Test suite
└── LICENSE # MIT
# 1. Install dependencies
pip install numpy pandas scipy matplotlib akshare
# 2. Pull data (or use pre-packaged data/600519_daily.csv)
python scripts/pull_data.py
# 3. Run all three factors
python scripts/run_all.py
# 4. Check figures/ for output
# - dimension_plot.png — Box-counting dimension
# - tail_clustering.png — Tail event clustering
# - hurst_factor.png — Hurst exponent
# - comparison_summary.png — Side-by-side IC comparisonMath: Cover the price graph with ε×ε squares, count N(ε), fit log(N) vs log(1/ε). D=1 for smooth trends, D≈1.5 for Brownian motion, D→2 for white noise.
Validation: Multi-window (60/120/250 days), both absolute D(t) and ΔD(t) rate-of-change. Result: no predictive power — D(t) measures roughness/persistence but doesn't capture directional volatility expectation.
Why it failed: The paper's free-boundary theorem (dim≤1 at equilibrium) is a static property. Price series in the wild are never near equilibrium in this sense.
Math: Under Poisson null, tail events (3σ returns) arrive independently with exponential interval distribution (CV=1). When intervals cluster (CV>1), the process departs from equilibrium.
Validation: KS test against exponential + CV ratio. Result: r=0.30 with future vol, but the sign is inverted — high KS-p (no clustering) predicts higher vol. Possible interpretation: isolated large moves occur in trending/volatile regimes, while clustered tails indicate post-discharge calm.
Math: R/S analysis: H>0.5 = persistent (trending), H<0.5 = anti-persistent (mean-reverting), H=0.5 = random walk.
Validation: Multi-horizon IC (5d→60d), multi-window (60/120/250). Result: IC 0.21-0.24, horizon-gradient monotonic, direction correct. This passes all sanity checks.
Why it works: Hurst directly measures the persistence structure that box-counting only indirectly captures. The R/S method's built-in normalization across time scales makes it robust to price level shifts.
This repository follows a strict paper→factor→validate protocol:
- Extract a mathematical structure from a paper (arXiv:2603.14100)
- Implement a rolling-window computation with tunable parameters
- Validate on 600519 (Kweichow Moutai) daily data, 2015–2024
- Compare IC with future realized volatility across multiple horizons
- Interpret — does the sign make economic sense? Is the horizon gradient stable?
Clean failures (like box-counting dimension) are documented with full reasoning, not hidden. Knowing what doesn't work prevents wasted months on false leads.
numpy,scipy— numerical computationpandas— data handlingmatplotlib— visualizationakshare— A-share data access (only for data pull)
MIT — use it, fork it, build on it.
- arXiv:2603.14100 — McCann, O'Brien, Rankin: Singularities are discrete in equilibrium
