Repository navigation
Step 4 - Persistent homology and anomaly score
Step 4 - Persistent homology and anomaly score
Causal daily topological signal with frozen analysis configurations.
Delivered
- Frozen
TopologyConfigregistry (config/topology.json) with verified hash and exploratory
custom configurations; strict validation (including prime coefficient fields and signed-zero
normalisation). - Robust median/MAD scaling, causal delay embedding (dimension 3, lag 2 -> 56 points), complete
Vietoris-Rips H0/H1 persistence viaripser(GF(2), no truncation/subsampling), and
L(t) = largest finite H1 lifetime. - Causal daily score:
D(t) = |L(t) - median(previous 252 valid L)|, midrank score against the
previous 252 validDvalues, explicitunavailable/warming_up/scoredstates, sequence-based
gap handling (no interpolation, no calendar inference), deterministic cache identity and
collision-safe CSV+sidecar export. - CLI:
topomarket topology --data-dir ... [--config ...] [--out ...] [--json], active-snapshot
aware; existing commands unchanged. - Documentation: README topological-signal section and
docs/TOPOLOGY.md; version 0.4.0.
Acceptance A4 evidence
| Check | Result |
|---|---|
| Public offline suite | 344 passed / 11 skipped |
| Private acceptance | 10 passed (5 A2 + 3 A3 + 2 A4) |
| Real snapshot rows | 9,250 tda_daily |
| Warm-up boundary | unavailable 59, warming up 504, first score at index 563 |
| Scored points | 8,687 (first 1992-03-25, latest 2026-09-30, score 54.1667) |
| Score range | [0, 100], finite L/D for every scored point |
| Reproducibility | identical cache key and byte-identical CSV across runs |
| Causality | prefix points byte-identical to the full-series prefix |
| Rips primitives | cross-checked directly against ripser (square, no-H1 cloud, min interval) |
Next: Step 5 - industry explorer (60x12 cloud and Mapper graph, issue #6).