Trait FundingPredictionModel

Source
pub trait FundingPredictionModel {
    // Required methods
    fn add_observation(&mut self, rate: f64);
    fn predict(&self) -> FundingPrediction;
    fn get_volatility(&self) -> f64;
    fn get_momentum(&self) -> f64;
    fn detect_funding_cycle(&self) -> FundingCycle;
    fn detect_anomaly(&self) -> FundingAnomaly;
    fn correlation_with(&self, other: &dyn FundingPredictionModel) -> f64;
}
Expand description

Funding rate prediction model

Required Methods§

Source

fn add_observation(&mut self, rate: f64)

Add a new funding rate observation

Source

fn predict(&self) -> FundingPrediction

Predict the next funding rate

Source

fn get_volatility(&self) -> f64

Get the volatility of funding rates

Source

fn get_momentum(&self) -> f64

Get the momentum of funding rates

Source

fn detect_funding_cycle(&self) -> FundingCycle

Detect funding cycle

Source

fn detect_anomaly(&self) -> FundingAnomaly

Detect funding anomaly

Source

fn correlation_with(&self, other: &dyn FundingPredictionModel) -> f64

Calculate correlation with another predictor

Implementors§