qis.compute_model_layer_in_sample_sharpe_contributions

qis.compute_model_layer_in_sample_sharpe_contributions(attribution)[source]

Compute additive full-sample return contributions over full-sample volatility.

The numerators are the exact full-sample annualised log-return components in attribution. The benchmark reference uses benchmark volatility, while every model component uses one common gross- or net-model full-sample annualised log-return volatility. Volatility is the sample standard deviation (ddof=1) multiplied by the square root of the annualisation factor implied by attribution.freq. Contributions remain signed and additive.

Parameters:

attribution (ModelLayerAlphaBetaAttribution) – Full-sample model-layer alpha/beta attribution computed by QIS.

Returns:

Benchmark reference, additive model contributions and the full-model endpoint ratio.

Raises:
  • TypeError – If attribution is not a full-sample model-layer attribution.

  • ValueError – If required return inputs or full-sample volatilities are invalid.

  • RuntimeError – If the additive contributions do not reconstruct the endpoint ratio.

Return type:

Series