skfolio.attribution.FactorBreakdown#

class skfolio.attribution.FactorBreakdown(names, vol_contrib, pct_total_variance, mu_contrib, family, exposure, exposure_std, vol, mu, corr_with_ptf, mu_contrib_uncertainty=None)[source]#

Per-factor attribution breakdown.

Contains per-factor attribution with exposures, standalone factor statistics and volatility/return contributions.

For single-point attribution, arrays have shape (n_factors,). For rolling attribution, arrays have shape (n_windows, n_factors).

Attributes:
namesndarray of shape (n_factors,)

Factor names. Always 1D.

familyndarray of shape (n_factors,) or None

Factor family/category labels (e.g., “Style”, “Industry”). None if families were not provided.

exposurendarray of shape (n_factors,) or (n_windows, n_factors)

Portfolio exposure to each factor. For realized attribution with time-varying inputs, this is the mean exposure over time.

exposure_stdndarray or None

Standard deviation of portfolio factor exposures over time. None for predicted attribution.

vol_contribndarray of shape (n_factors,) or (n_windows, n_factors)

Factor volatility contribution to total portfolio volatility.

pct_total_variancendarray of shape (n_factors,) or (n_windows, n_factors)

Percentage of total portfolio variance.

mu_contribndarray of shape (n_factors,) or (n_windows, n_factors)

Factor return contribution to total portfolio return.

volndarray of shape (n_factors,) or (n_windows, n_factors)

Standalone factor volatility.

mundarray of shape (n_factors,) or (n_windows, n_factors)

Standalone factor return: expected return for predicted attribution and mean return for realized attribution.

corr_with_ptfndarray of shape (n_factors,) or (n_windows, n_factors)

Correlation between each factor return and portfolio returns.

mu_contrib_uncertaintyndarray of shape (n_factors,) or (n_windows, n_factors) or None

Per-factor standard error of the mean return contribution, reflecting factor return estimation uncertainty. None when uncertainty is not computed.