pub struct HasbrouckShare {
pub security_a_share: f64,
pub security_b_share: f64,
}Expand description
Simplified Hasbrouck (1995) information share via variance decomposition.
Decomposes the contribution of each security to the common efficient price using the fraction of total return variance attributable to each series.
security_a_share = Var(a) / (Var(a) + Var(b)), and similarly for B.
Both shares sum to 1.0. When total variance is zero, each share is 0.5.
§Example
use fin_primitives::microstructure::HasbrouckShare;
let a = vec![0.1, -0.1, 0.2];
let b = vec![0.05, -0.05, 0.1];
let hs = HasbrouckShare::estimate(&a, &b);
assert!((hs.security_a_share + hs.security_b_share - 1.0).abs() < 1e-10);Fields§
Information share attributed to security A (0 to 1).
Information share attributed to security B (0 to 1).
Implementations§
Trait Implementations§
Auto Trait Implementations§
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