FerroWave · reference
Regime primitives
Reference for the change-point and scale-energy estimators regime-detection workflows build on.
ferro-wave exposes a small set of regime-detection primitives that operate
on the output of an MRA. Research notebooks, production signals, and product
workflows can compose these primitives into classifiers while preserving one
shared mathematical contract.
Scale-energy ratio
For an MRA with details , the scale-energy ratio at level is
A rising for small indicates the signal's variance is migrating to higher-frequency bands — a common signature of a vol-expansion regime.
let ratios = mra.scale_energy_ratios();Wavelet variance
The unbiased estimator of the variance contributed by scale over a window of length surviving boundary correction:
let wv = mra.wavelet_variance();This is the building block for scale-by-scale variance views and regime diagnostics.
Change-point statistic
A cumulative-sum (CUSUM) statistic on the detail energies, normalized to :
A change in regime at scale shows up as a deflection in . The statistic itself is the primitive — thresholding and classification belong to the calling workflow.
let cusum = mra.detail_cusum(level);Determinism guarantees
All three estimators are pure functions of the input MRA and the chosen
wavelet. They allocate exactly one output Vec (sized at call time) and
otherwise touch no global state, no PRNG, and no floating-point summation
order that depends on system layout. The same inputs produce bit-identical
outputs across runs and across architectures with IEEE-754 compliant
f64 arithmetic.
This is what lets a backtest's regime signal match production's byte-for-byte — the property the rest of the stack is built around.