qis.ModelLayerEwmaAlphaAttribution

class qis.ModelLayerEwmaAlphaAttribution(periodic_returns, estimated_betas, applied_betas, component_returns, cumulative_alpha, expanding_annualised_alpha, freq, beta_span, beta_lag, beta_init_value, mean_adj_type, nav_start_date=None)[source]

Bases: object

Point-in-time model-layer attribution under lagged EWMA betas.

Variables:
  • periodic_returns (pandas.DataFrame) – Common-sample model-layer log returns.

  • estimated_betas (pandas.DataFrame) – EWMA betas after observing each return, preserving leading NaNs.

  • applied_betas (pandas.DataFrame) – Betas available before each return: the estimate beta_lag periods earlier, or beta_init_value while that estimate is missing.

  • component_returns (pandas.DataFrame) – Exact realised systematic and alpha return components.

  • cumulative_alpha (pandas.DataFrame) – Cumulative realised log-return alpha components from inception.

  • expanding_annualised_alpha (pandas.DataFrame) – Annualised expanding means of realised alpha components.

  • freq (str) – Return frequency used by the estimator.

  • beta_span (int) – EWMA beta span in return periods.

  • beta_lag (int) – Number of periods between beta estimation and application.

  • beta_init_value (float) – One-observation beta prior. It fills the applied betas before the first lagged estimate and enters the EWMA moments as a pseudo-observation that is their whole state on its date, so every later estimate retains it with weight lambda^k.

  • mean_adj_type (qis.models.linear.ewm.MeanAdjType) – Point-in-time mean adjustment used in beta estimation.

  • nav_start_date (pandas.Timestamp | None) – Actual common NAV baseline, before the first realised return.

Parameters:

The ewma_annualised_components and ewma_annualised_alpha properties apply the same span as the beta estimator to the exact realised, lagged-beta component returns. Their current_* counterparts return the final point-in-time row.

__init__(periodic_returns, estimated_betas, applied_betas, component_returns, cumulative_alpha, expanding_annualised_alpha, freq, beta_span, beta_lag, beta_init_value, mean_adj_type, nav_start_date=None)
Parameters:
Return type:

None

Methods

__init__(periodic_returns, estimated_betas, ...)

Attributes

current_ewma_annualised_alpha

Return the latest same-span EWMA annualised additive alpha estimates.

current_ewma_annualised_components

Return the latest same-span EWMA annualised component estimates.

ewma_annualised_alpha

Return same-span EWMA annualised estimates of the additive alpha components.

ewma_annualised_components

Return same-span EWMA annualised estimates of every realised component.

nav_start_date

periodic_returns

estimated_betas

applied_betas

component_returns

cumulative_alpha

expanding_annualised_alpha

freq

beta_span

beta_lag

beta_init_value

mean_adj_type

periodic_returns: DataFrame
estimated_betas: DataFrame
applied_betas: DataFrame
component_returns: DataFrame
cumulative_alpha: DataFrame
expanding_annualised_alpha: DataFrame
freq: str
beta_span: int
beta_lag: int
beta_init_value: float
mean_adj_type: MeanAdjType
nav_start_date: Timestamp | None = None
property ewma_annualised_components: DataFrame

Return same-span EWMA annualised estimates of every realised component.

property ewma_annualised_alpha: DataFrame

Return same-span EWMA annualised estimates of the additive alpha components.

property current_ewma_annualised_components: Series

Return the latest same-span EWMA annualised component estimates.

property current_ewma_annualised_alpha: Series

Return the latest same-span EWMA annualised additive alpha estimates.