pub struct EngleGrangerResult {
pub adf_statistic: f64,
pub p_value: f64,
pub beta: f64,
pub alpha: f64,
pub half_life: Option<f64>,
pub correlation: f64,
pub spread_mean: f64,
pub spread_std: f64,
}Expand description
Result of an Engle-Granger cointegration test.
Fields§
§adf_statistic: f64ADF test statistic on the residuals.
p_value: f64Approximate p-value for the ADF test. Uses MacKinnon critical values for two-variable cointegration.
beta: f64OLS regression coefficient (hedge ratio): y = alpha + beta * x.
alpha: f64OLS intercept.
half_life: Option<f64>Half-life of mean reversion in periods (e.g., days).
Derived from Ornstein-Uhlenbeck process fit on the spread.
None if the spread is not mean-reverting (theta >= 0).
correlation: f64Pearson correlation between the two series.
spread_mean: f64Mean of the spread (residuals).
spread_std: f64Standard deviation of the spread.
Trait Implementations§
Source§impl Clone for EngleGrangerResult
impl Clone for EngleGrangerResult
Source§fn clone(&self) -> EngleGrangerResult
fn clone(&self) -> EngleGrangerResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EngleGrangerResult
impl RefUnwindSafe for EngleGrangerResult
impl Send for EngleGrangerResult
impl Sync for EngleGrangerResult
impl Unpin for EngleGrangerResult
impl UnsafeUnpin for EngleGrangerResult
impl UnwindSafe for EngleGrangerResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more