|
| 1 | +# Process-family ↔ memory-regime ↔ option-family ↔ archetype crosswalk |
| 2 | + |
| 3 | +## Status |
| 4 | + |
| 5 | +Contract v0.1. Fixture-backed and CI-validated with teeth in both directions. |
| 6 | +Builds on the merged MemoryRegimeCharacterization contract (#50) and **reuses** |
| 7 | +its Hurst / Lyapunov / kurtosis estimators — it does not duplicate them. Two |
| 8 | +records: `ProcessFamilyCharacterization` (classify a process path/observable) |
| 9 | +and `ProcessRegimeCrosswalk` (the total typed mapping). Deterministic, |
| 10 | +stdlib-only. |
| 11 | + |
| 12 | +## Why this exists |
| 13 | + |
| 14 | +#50 reads the *memory regime* of a series. This layer names the **stochastic |
| 15 | +process** that produced it and ties it to how the process is priced (option-model |
| 16 | +family) and how it shows up as trader behaviour (archetype). The Hurst axis is |
| 17 | +the spine: it runs from mean-reverting (H<0.5) through efficient (H=0.5) to |
| 18 | +persistent long-memory (H>0.5). |
| 19 | + |
| 20 | +## Ornstein-Uhlenbeck vs discrete-state Markov |
| 21 | + |
| 22 | +Both are "Markov", but they are different regimes: |
| 23 | + |
| 24 | +- **Ornstein-Uhlenbeck** — `dX = θ(μ − X)dt + σ dW`. A *continuous* mean-reverting |
| 25 | + diffusion. Its autocorrelation decays **exponentially** (`e^{−θτ}`) with a |
| 26 | + finite timescale, so OU is the canonical `short_decaying` / mean-reverting |
| 27 | + regime, and it is **anti-persistent**: the variance of a k-step move |
| 28 | + *saturates* instead of growing like a random walk, so its variance-time Hurst |
| 29 | + is `< 0.5`. We estimate θ (mean-reversion speed), the long-run mean μ, and the |
| 30 | + **half-life = ln2/θ**. Seeded check: OU(θ=0.7) recovers θ̂≈0.74, |
| 31 | + half-life≈0.93, variance-time H≈0.05. Rate models (Vasicek, Hull-White, CIR), |
| 32 | + stochastic-vol models (Heston, Stein-Stein), and stat-arb spreads are OU. |
| 33 | +- **Markov regime-switching (Hamilton)** — memoryless jumps between *discrete* |
| 34 | + states (e.g. bull/bear, greed/fear). There is no single reversion timescale; |
| 35 | + the "memory" is the current state, so its regime is `memoryless` (state-only). |
| 36 | +- **Fractional-OU** — OU driven by fractional Brownian motion: the hybrid = |
| 37 | + mean-reversion **plus** long memory. Provided as a generator |
| 38 | + (`process_family_estimators.fractional_ou`). |
| 39 | + |
| 40 | +## How the discriminator works |
| 41 | + |
| 42 | +Feed the process **path / observable**. It reuses the #50 estimators and adds an |
| 43 | +OU fit and a variance-time (aggregated-variance) Hurst (slope of |
| 44 | +`log Var[X_{t+k}−X_t]` vs `log k` = 2H). Priority order: |
| 45 | + |
| 46 | +1. **hawkes** — persistent volatility clustering (mean ACF(1..5) of squared |
| 47 | + increments ≥ 0.15) with variance-time H≈0.5. Checked *before* the jump branch |
| 48 | + because clustering itself fattens the tails. |
| 49 | +2. **jump_levy** — fat-tailed increments (excess kurtosis ≥ 5) with rare isolated |
| 50 | + jumps and no clustering. |
| 51 | +3. **ornstein_uhlenbeck** — θ>0 (AR(1) coefficient in (0,1)) and anti-persistent |
| 52 | + (variance-time H < 0.45). |
| 53 | +4. **fractional_brownian_motion** — persistent (variance-time H ≥ 0.58). |
| 54 | +5. **markov_regime_switching** — discrete-state separation with no mean reversion |
| 55 | + (heuristic; represented in the crosswalk, not asserted by a seeded verify). |
| 56 | +6. **brownian_gbm** — efficient random walk (H≈0.5, thin tails, no reversion). |
| 57 | + |
| 58 | +## The crosswalk |
| 59 | + |
| 60 | +`examples/process-regime-crosswalk/crosswalk.canonical.valid.json` is the |
| 61 | +machine-checked form of this table. |
| 62 | + |
| 63 | +| process family | memory regime | kernel | option-model family (anchor) | behavioral archetype | |
| 64 | +|---|---|---|---|---| |
| 65 | +| `brownian_gbm` | `memoryless` | delta | Black-Scholes, Black-76 | efficient-market / no-edge | |
| 66 | +| `markov_regime_switching` | `memoryless` (state) | delta | regime-switching option models, Hamilton-filter pricing | greed/fear & bull/bear shift | |
| 67 | +| `ornstein_uhlenbeck` | `short_decaying` | exponential | **Vasicek**, Hull-White, CIR, **Heston**, Stein-Stein | contrarian / value / market-maker (fade extremes) | |
| 68 | +| `fractional_brownian_motion` | `long_memory` | power_law | **rough volatility** (Gatheral-Jaisson-Rosenbaum), rBergomi, MMAR | trend-follower / momentum / Elliott-impulse | |
| 69 | +| `hawkes` | `short_decaying` (self-exciting) | exponential | Hawkes self-exciting jump models, jump-clustering / contagion | herd / FOMO / reflexive | |
| 70 | +| `jump_levy` | `memoryless` (fat-tail jumps) | delta | Merton-jump, variance-gamma, CGMY, smile / tail models | shock / crash / tail-hunter | |
| 71 | + |
| 72 | +### Rough volatility unifies the long-memory work with the vol surface |
| 73 | + |
| 74 | +The `fractional_brownian_motion` ↔ **rough volatility** tie is load-bearing: in |
| 75 | +the Gatheral-Jaisson-Rosenbaum result, *volatility itself* is a fractional |
| 76 | +process with H≈0.1, so the Hurst axis governs the volatility surface, not just |
| 77 | +the price path. This unifies the long-memory / fractional work here with the |
| 78 | +volatility-surface work in `economic-prophet` #44 **by reference** — the |
| 79 | +`ProcessFamilyCharacterization.risk_distribution_F` for an fBm carries the Hurst |
| 80 | +H that a rough-vol calibration consumes, the same F the RAROC |
| 81 | +`risk(F, reference, kernel, horizon)` interface (economic-prophet, from #50) takes. |
| 82 | + |
| 83 | +## Teeth |
| 84 | + |
| 85 | +`scripts/validate_process_family_crosswalk.py`, wired as |
| 86 | +`make validate-process-family-crosswalk` and into the aggregate `make validate`; |
| 87 | +CI in `.github/workflows/process-family-crosswalk.yml`. |
| 88 | + |
| 89 | +**VERIFIES** (seeded, deterministic): OU(θ∈{0.7,0.3,1.0}) → `ornstein_uhlenbeck` |
| 90 | +/ `short_decaying` with θ̂>0, finite half-life, anti-persistent variance-time |
| 91 | +H<0.5; fBm(H=0.7) → `fractional_brownian_motion` / `long_memory`; plus |
| 92 | +`brownian_gbm`, `hawkes`, `jump_levy` seeded paths classify to their families. |
| 93 | + |
| 94 | +**REJECTS** (one fixture per tooth): an OU labeled `long_memory`; a process with |
| 95 | +θ≤0 called `mean_reverting`; an fBm labeled `memoryless`; an OU record missing |
| 96 | +`ou_params`; a crosswalk mapping OU↔`long_memory` or fBm↔`memoryless`; a |
| 97 | +non-total crosswalk (a process family missing). The crosswalk is asserted total |
| 98 | +and coherent, and the anchor option-model families (OU→Vasicek/Heston, |
| 99 | +fBm→rough-vol) are checked. Every record carries a proof-artifact-spine SHA-256 |
| 100 | +hash-chain receipt (FIPS-180-4 algorithm; not a FIPS-140 module). |
0 commit comments