nt_features/
lib.rs

1// Feature Engineering Module - Technical indicators and embeddings
2//
3// Performance targets:
4// - Feature extraction: <1ms per update
5// - Embedding generation: <100μs
6
7pub mod embeddings;
8pub mod normalization;
9pub mod technical;
10
11pub use embeddings::{hash_embed, EmbeddingGenerator};
12pub use normalization::{FeatureNormalizer, NormalizationMethod};
13pub use technical::{IndicatorConfig, TechnicalIndicators};
14
15#[derive(Debug, thiserror::Error)]
16pub enum FeatureError {
17    #[error("Insufficient data: need at least {0} points")]
18    InsufficientData(usize),
19
20    #[error("Invalid parameter: {0}")]
21    InvalidParameter(String),
22
23    #[error("Calculation error: {0}")]
24    Calculation(String),
25}
26
27pub type Result<T> = std::result::Result<T, FeatureError>;
28
29#[cfg(test)]
30mod tests {
31    use super::*;
32
33    #[test]
34    fn test_module_structure() {
35        // Smoke test
36        assert!(true);
37    }
38}