pub struct CointegrationOutput {
pub hedge_ratio: f64,
pub spread: f64,
pub adf_stat: f64,
}Expand description
Output of Cointegration.
Fields§
§hedge_ratio: f64Engle–Granger hedge ratio β: the rolling OLS slope of a on b.
spread: f64The current spread (regression residual) a − (α + β·b).
adf_stat: f64Augmented Dickey–Fuller t-statistic on the spread. More negative
means more strongly mean-reverting (cointegrated); compare against the
usual ADF/MacKinnon critical values (e.g. roughly −2.9 at 5%). 0
when the test is undefined (a degenerate, zero-variance spread).
Trait Implementations§
Source§impl Clone for CointegrationOutput
impl Clone for CointegrationOutput
Source§fn clone(&self) -> CointegrationOutput
fn clone(&self) -> CointegrationOutput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CointegrationOutput
impl Debug for CointegrationOutput
Source§impl PartialEq for CointegrationOutput
impl PartialEq for CointegrationOutput
Source§fn eq(&self, other: &CointegrationOutput) -> bool
fn eq(&self, other: &CointegrationOutput) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CointegrationOutput
impl StructuralPartialEq for CointegrationOutput
Auto Trait Implementations§
impl Freeze for CointegrationOutput
impl RefUnwindSafe for CointegrationOutput
impl Send for CointegrationOutput
impl Sync for CointegrationOutput
impl Unpin for CointegrationOutput
impl UnsafeUnpin for CointegrationOutput
impl UnwindSafe for CointegrationOutput
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more