ResearchRisk

Portfolio stress testing and factor attribution

A stress test estimates loss under a stated scenario. Factor attribution helps explain which exposures produced that estimate and which assumptions the portfolio review should examine.

Editorial note: this article was prepared with AI assistance and checked against the product and methodology pages listed below. Illustrative examples explain the methods. They do not describe investment results.

Checked against

Read the loss estimate with its contributors

A scenario loss needs an explanation of its drivers. Separate the modeled market, factor and position contributions, and record the holdings and assumptions that produced the estimate.

The decomposition helps a reviewer distinguish an intended exposure from an unexpected concentration. It remains a model estimate and should accompany the scenario definition and coverage.

The four kinds of scenario, and what each is for

Historical replay

A historical replay applies the movements from a named window to a stated portfolio. It preserves the scenario that occurred in that window. Mapping it to current holdings requires assumptions about factors, pricing and instruments that may have changed.

Hypothetical shocks

A hypothetical scenario changes specified factors by documented shocks. Include the joint movement assumptions and any repricing rules. A single-factor shock may miss losses caused by correlated exposures.

Correlated / conditional shocks

Shock a factor and use a stated covariance model to estimate conditional movements in related factors. This adds dependence assumptions to the scenario. Results depend on the estimation window and on whether those relationships remain useful under stress.

Reverse stress

A reverse stress test starts with a defined loss or limit breach and investigates scenarios that could produce it. Document the search boundaries and the exposures held fixed. The resulting scenarios describe vulnerabilities within the model.

Factor attribution: the arithmetic

Attribution starts by writing each asset's return as factor exposures plus a residual, then aggregating to the portfolio.

rᵢ = αᵢ + Σⱼ βᵢⱼ fⱼ + εᵢ → σ²ₚ = bᵀ Σ_f b + wᵀ D w
b = Xᵀw is the portfolio factor-exposure vector, Σ_f is factor covariance and D contains specific variances. The expression assumes specific residuals are uncorrelated. Factor covariances remain in the common-risk term, so individual factor volatilities cannot simply be added.

Marginal contributions describe how modeled portfolio volatility changes with a position weight. Under a differentiable homogeneous volatility model, weighted marginal contributions reconcile to total modeled volatility. State any approximations used in the implementation.

MCRᵢ = ∂σₚ/∂wᵢ = (Σw)ᵢ / σₚ CTRᵢ = wᵢ · MCRᵢ Σᵢ CTRᵢ = σₚ
Euler's theorem for homogeneous functions is why the contributions add up. A risk report whose contributions do not sum to the total is using an approximation and should say so.
Worked review: reconciling a portfolio decomposition
Portfolio weights
Pin the holdings and their valuation basis
Common factors
Retain exposures and the full factor covariance matrix
Specific risk
State the residual-covariance assumptions
Reconciliation
Check contributions against total modeled risk
This is an illustrative review sequence. Correlated factors have cross terms. A decomposition must state how it allocates those terms before individual contributions can be compared.

Compare position weights with risk contributions

Position size and contribution to risk can rank holdings differently. Correlation, volatility and hedging all affect the contribution. Read the contribution on the same holdings and covariance basis as the portfolio total.

  • Rank by contribution to risk, then show weight beside it. The gap between the two rankings is itself the insight.
  • Show concentration by weight and by contribution to risk. Explain the normalization before reporting an effective number of bets. Negative contributions and hedges require care when applying concentration formulas.
  • Check pairwise correlation of the top contributors. Concentration hidden in correlation does not show up in any weight-based limit.

Putting it in front of a committee

  1. Show the decomposition beside the loss estimate. Use a chart of variance by factor, with specific risk shown separately.
  2. Show the scenario set. Report the losses for each scenario with the assumptions that distinguish it.
  3. Name the covariance basis and its estimation window. A stress result without its correlation assumption is not reproducible.
  4. State coverage. Show the portion of the book included in a calculation and identify unpriced positions or unsupported instruments. Keep the same labels in the exported report.
  5. Attach the dataset version. It is what makes the same table reproducible at the next meeting.

How this runs in Aegis

Aegis computes VaR and CVaR, forecast volatility, factor decomposition, risk contributors, correlation, drawdown and liquidity from the stated holdings and modeled history. It supports historical and hypothetical stress scenarios and uses factor-model covariance for large books. Review coverage, covariance settings and scenario assumptions beside the output.

The same computation backs the cockpit, the deep link and the export, and the same factor decomposition is available through Vega in a conversation, so the number a colleague quotes in chat is the number in the report. Where a position cannot be priced, the figure carries weight-aware coverage rather than quietly dropping it.

References

Find out which exposure produced the loss.

Historical and hypothetical scenarios, factor decomposition and risk contributors from one computation, with coverage stated on every figure.

Run the decomposition →

TradePolaris provides research software for paper trading. It does not provide investment advice. Backtested and hypothetical results do not predict future performance. Trading is paper (simulated) only. See our Disclaimer.