Expand description
ML Feature Engineering Toolkit (ta.features.*)
This module provides rich, multi-dimensional feature extractors built on top of QuantWave’s existing high-quality indicators (especially Ehlers DSP and Regimes). The goal is to make it trivial to build stable, no-lookahead feature matrices for ML pipelines and strategy research.
All extractors follow the Universal Indicator pattern where possible:
- Implement
Next<Input>for streaming use - Provide equivalent batch (Polars) paths in
quantwave-polars - Must eventually prove batch == streaming via proptests (see task quantwave-tha)
Design principles (from quantwave-4ub research notes):
- Rich outputs (structs or tuples) over single scalars when useful
- Strong metadata (reuse/extend IndicatorMetadata)
- Easy composition with regimes and (future) PA events
- Zero lookahead by construction
Sources recorded (per AGENTS.md):
- cyber_cycle.rs:35 (returns (cycle, trigger))
- hurst.rs (persistence value, excellent regime feature)
- regimes/mod.rs + 12 submodules (HMM probs, GMM, PELT, etc. as meta-features)
- Ehlers papers in references/Ehlers Papers/implemented/
- Prado “Advances in Financial Machine Learning” (for future fractional differencing / entropy)
Re-exports§
pub use cyber_cycle::CyberCycleFeatureExtractor;pub use cyber_cycle::CyberCycleFeatures;pub use ehlers_autocorrelation::EhlersAutocorrelationFeatureExtractor;pub use ehlers_autocorrelation::EhlersAutocorrelationFeatures;pub use griffiths_dominant_cycle::GriffithsDominantCycleFeatureExtractor;pub use griffiths_dominant_cycle::GriffithsDominantCycleFeatures;pub use hurst::HurstFeatureExtractor;pub use hurst::HurstFeatures;pub use instantaneous_trendline::InstantaneousTrendlineFeatureExtractor;pub use instantaneous_trendline::InstantaneousTrendlineFeatures;pub use regime::regime_to_features;pub use regime::RegimeFeatures;pub use regime_probs::regime_to_prob_features;pub use regime_probs::RegimeProbFeatures;pub use trendflex::TrendflexFeatureExtractor;pub use trendflex::TrendflexFeatures;
Modules§
- cyber_
cycle - Cyber Cycle feature extractor wrapper.
- ehlers_
autocorrelation - Ehlers Autocorrelation feature extractor wrapper.
- griffiths_
dominant_ cycle - Griffiths Dominant Cycle feature extractor wrapper.
- hurst
- Hurst Exponent feature extractor wrapper.
- instantaneous_
trendline - Instantaneous Trendline feature extractor wrapper.
- regime
- Basic regime feature helpers for ML pipelines.
- regime_
probs - Regime probability features (soft labels) for ML pipelines.
- trendflex
- Trendflex feature extractor wrapper.
Traits§
- AsFeatures
- Common trait for feature extractors that want to expose a stable “feature vector” view. (Future expansion point for a unified FeatureVector trait.)