Skip to main content

Attribution

Struct Attribution 

Source
pub struct Attribution {
    pub benchmark_return: f64,
}
Expand description

Brinson-Hood-Beebower attribution calculator that works directly with Sector slices.

This struct holds the total benchmark return (R_b) used in the allocation effect formula and exposes the three BHB effect computations as methods.

Fields§

§benchmark_return: f64

Total benchmark return used as the benchmark reference in the allocation effect.

Implementations§

Source§

impl Attribution

Source

pub fn new(benchmark_return: f64) -> Self

Create a new Attribution calculator using the given total benchmark return.

Source

pub fn allocation_effect(&self, s: &Sector) -> f64

Allocation effect for a sector: (w_p - w_b) * (r_b_sector - R_b).

Measures whether the manager added value by over/under-weighting the sector relative to the benchmark, evaluated against the sector’s benchmark return.

Source

pub fn selection_effect(&self, s: &Sector) -> f64

Selection effect for a sector: w_b * (r_p - r_b).

Measures whether the manager picked better securities within the sector.

Source

pub fn interaction_effect(&self, s: &Sector) -> f64

Interaction effect for a sector: (w_p - w_b) * (r_p - r_b).

Joint effect of simultaneous over/under-weighting and stock selection.

Source

pub fn total_active_return(&self, s: &Sector) -> f64

Total active return for a sector: allocation + selection + interaction.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.