FeatureExtractor

Trait FeatureExtractor 

Source
pub trait FeatureExtractor: Send + Sync {
    // Required methods
    fn extract_features<'life0, 'life1, 'async_trait>(
        &'life0 self,
        bars: &'life1 [Bar],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<FeatureVector>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn feature_names(&self) -> Vec<String>;
}
Expand description

Trait for feature extraction from market data

Calculates technical indicators and other features for strategy use.

Required Methods§

Source

fn extract_features<'life0, 'life1, 'async_trait>( &'life0 self, bars: &'life1 [Bar], ) -> Pin<Box<dyn Future<Output = Result<Vec<FeatureVector>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Extract features from historical bars

§Arguments
  • bars - Historical bar data
§Returns

Vector of feature vectors, one per bar

Source

fn feature_names(&self) -> Vec<String>

Get list of feature names in order

Implementors§