#[derive(Debug, Clone)]
pub struct GarchConfig {
pub p: usize,
pub q: usize,
pub mean_model: MeanModel,
pub distribution: Distribution,
pub max_iterations: usize,
pub tolerance: f64,
pub use_numerical_derivatives: bool,
}
impl Default for GarchConfig {
fn default() -> Self {
Self {
p: 1,
q: 1,
mean_model: MeanModel::Constant,
distribution: Distribution::Normal,
max_iterations: 1000,
tolerance: 1e-6,
use_numerical_derivatives: false,
}
}
}
#[derive(Debug, Clone)]
pub struct EgarchConfig {
pub p: usize,
pub q: usize,
pub max_iterations: usize,
pub tolerance: f64,
}
impl Default for EgarchConfig {
fn default() -> Self {
Self {
p: 1,
q: 1,
max_iterations: 1000,
tolerance: 1e-6,
}
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum MeanModel {
Constant,
Zero,
AR {
order: usize,
},
ARMA {
ar_order: usize,
ma_order: usize,
},
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Distribution {
Normal,
StudentT,
SkewedStudentT,
GED,
}
impl Default for MeanModel {
fn default() -> Self {
Self::Constant
}
}
impl Default for Distribution {
fn default() -> Self {
Self::Normal
}
}