Skip to main content

EventStudy

Struct EventStudy 

Source
pub struct EventStudy;
Expand description

The event study engine.

Implementations§

Source§

impl EventStudy

Source

pub fn compute( event: &MarketEvent, price_series: &[(u64, f64)], benchmark: &[(u64, f64)], window: EventWindow, ) -> EventResult

Compute abnormal returns around event using a market-model benchmark.

§Arguments
  • event: the market event to study.
  • price_series: (unix_ts_secs, price) pairs for the security, chronological.
  • benchmark: (unix_ts_secs, price) pairs for the benchmark, chronological.
  • window: event window specification.
§Returns

An EventResult with abnormal returns and summary statistics.

Source

pub fn significance(results: &[EventResult]) -> f64

Compute the t-statistic on average CAR across multiple event results.

Formula: t = mean_CAR / (std_CAR / sqrt(N))

The CAR used per event is car_pre + car_post (total window CAR). Returns 0.0 if fewer than 2 results are provided.

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.