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§
Sourcefn add_observation(&mut self, rate: f64)
fn add_observation(&mut self, rate: f64)
Add a new funding rate observation
Sourcefn predict(&self) -> FundingPrediction
fn predict(&self) -> FundingPrediction
Predict the next funding rate
Sourcefn get_volatility(&self) -> f64
fn get_volatility(&self) -> f64
Get the volatility of funding rates
Sourcefn get_momentum(&self) -> f64
fn get_momentum(&self) -> f64
Get the momentum of funding rates
Sourcefn detect_funding_cycle(&self) -> FundingCycle
fn detect_funding_cycle(&self) -> FundingCycle
Detect funding cycle
Sourcefn detect_anomaly(&self) -> FundingAnomaly
fn detect_anomaly(&self) -> FundingAnomaly
Detect funding anomaly
Sourcefn correlation_with(&self, other: &dyn FundingPredictionModel) -> f64
fn correlation_with(&self, other: &dyn FundingPredictionModel) -> f64
Calculate correlation with another predictor