Scenario-Based Portfolio Stress Testing
Turning joint simulated paths into portfolio loss, drawdown, tail, and what-if diagnostics
QM017 · Portfolio Methods · Intermediate
Core idea. Hold the scenario generator fixed, revalue one or more portfolios through the same joint future paths, and compare endpoint and path-dependent stress outcomes on a paired basis.
Use it for. Portfolio what-if analysis, candidate-versus-baseline stress comparison, model-implied VaR/Expected Shortfall, drawdown analysis, and human-in-the-loop risk decisions.
It does not establish. That the scenario distribution is calibrated, that the candidate portfolio is optimal, or that a model-implied tail loss is a guaranteed realized-loss forecast.
The Question
A multi-asset scenario model produces a cloud of possible joint future paths. The portfolio question is different:
What happens to this specific portfolio if those joint paths occur?
The bridge from scenarios to portfolio decisions is a revaluation map. Once the map is defined, the same scenario cloud can be used to compare a baseline portfolio with a candidate portfolio while keeping the modeled market environment fixed.
This distinction matters because otherwise two effects become mixed:
- the scenario-generation effect — which future market paths the model produced; and
- the portfolio-weight effect — how a particular portfolio responds to those paths.
Scenario-based portfolio stress testing is designed to separate them.
Why It Matters
Stress testing is useful when the decision depends on severe, joint, and path-dependent outcomes that are poorly summarized by average return or volatility. Basel stress-testing principles emphasize material risks, internally consistent scenarios, severity, relevance, and explicit documentation of scenario design (Basel Committee on Banking Supervision 2018).
For portfolios, a joint scenario path preserves cross-asset interaction. That is essential when diversification can weaken during stress or when a loss depends on the order of returns rather than only the final endpoint.
The scenario cloud is therefore an input to the portfolio analysis—not the portfolio result itself.
Intuition
Imagine one future path in which equities fall sharply during the first week, bonds rally, and commodities then decline in the second week.
A 60/40 portfolio and a 30/70 portfolio experience the same market path, but not the same wealth path. If they are evaluated on different random scenario draws, part of the apparent difference may simply be Monte Carlo noise.
Using the same cloud creates a paired experiment:
\[ \text{same market scenario} \rightarrow \begin{cases} \text{baseline portfolio outcome}\\ \text{candidate portfolio outcome} \end{cases} \]
The difference is then attributable to the portfolio mapping, conditional on the scenario model.
The Method
Joint scenario paths
Let
\[ r_{i,m,h} \]
be the simple return of asset \(i=1,\ldots,d\) in scenario \(m=1,\ldots,M\) on future day \(h=1,\ldots,H\).
The full scenario object is a tensor of joint returns. The key requirement is that all assets in one scenario share the same scenario index \(m\); independently shuffling assets would destroy the joint dependence structure.
Asset price paths
Normalize each asset price to one at the stress origin:
\[ P_{i,m,0}=1. \]
Then
\[ P_{i,m,h} = \prod_{u=1}^{h}(1+r_{i,m,u}). \]
This converts daily returns into cumulative asset paths.
Portfolio revaluation
Suppose the initial portfolio has weights \(w_i\) with
\[ \sum_{i=1}^d w_i=1. \]
For a simple buy-and-hold through the stress horizon illustration, set normalized initial holdings \(q_i=w_i\) and define
\[ W_{m,h} = \sum_{i=1}^d q_iP_{i,m,h}. \]
Then \(W_{m,0}=1\).
This convention allows weights to drift as assets move. If the actual mandate rebalances daily, monthly, or when thresholds are crossed, that rebalancing rule must be applied inside each scenario path instead. The stress engine should reproduce the portfolio rule being evaluated rather than silently impose daily constant weights.
Buy-and-hold, constant-mix rebalancing, derivative delta revaluation, and rule-based dynamic allocation can produce different stress outcomes on the same asset path. Portfolio revaluation is part of the method specification.
Horizon return and loss
For scenario \(m\), horizon portfolio return is
\[ R_{m,H}=W_{m,H}-1, \]
and the corresponding loss can be written
\[ L_{m,H}=1-W_{m,H}=-R_{m,H}. \]
The loss orientation is convenient for VaR and Expected Shortfall because larger \(L\) means worse outcomes.
Maximum drawdown
Path risk depends on the route, not only the endpoint. Define the running wealth peak
\[ M_{m,h}=\max_{0\le u\le h}W_{m,u}. \]
The drawdown depth at day \(h\) is
\[ D_{m,h}=1-\frac{W_{m,h}}{M_{m,h}}, \]
and scenario maximum drawdown is
\[ \operatorname{MDD}_m=\max_{1\le h\le H}D_{m,h}. \]
Two scenarios can have the same terminal return but very different maximum drawdowns. QM008 — Drawdown, Underwater Duration, and Recovery develops the broader drawdown accounting conventions.
Value at Risk
At confidence level \(\alpha\), model-implied horizon VaR is the \(\alpha\) quantile of the scenario loss distribution:
\[ \operatorname{VaR}_{\alpha} =Q_{\alpha}(L_H). \]
For example, 95% VaR is a loss threshold exceeded by roughly the worst 5% of the modeled loss distribution under a continuous idealization.
The exact empirical quantile interpolation convention should be reported because different software libraries can differ slightly in finite samples.
Expected Shortfall
Expected Shortfall focuses on severity beyond the VaR threshold. For a continuous loss distribution,
\[ \operatorname{ES}_{\alpha} = \mathbb E[L_H\mid L_H\ge \operatorname{VaR}_{\alpha}]. \]
Expected Shortfall is designed to use information in the tail beyond a single quantile and has well-known coherence properties under appropriate definitions (Acerbi and Tasche 2002).
For a finite scenario cloud, a practical estimator averages the worst tail fraction. The treatment of a fractional boundary observation should be fixed if exact reproducibility matters.
Worst-window return
A multi-day stress path can contain a short, sharp loss even if the full-horizon result recovers.
For a \(k\)-day window, define
\[ R^{(k)}_{m,s} = \frac{W_{m,s+k}}{W_{m,s}}-1, \]
where \(s=0,\ldots,H-k\).
Then
\[ \operatorname{WorstK}_m = \min_s R^{(k)}_{m,s}. \]
For \(k=5\), this is a worst-5-day return diagnostic. It is path-dependent and can reveal concentrated short-window losses that horizon VaR misses.
Same-Cloud Portfolio Comparison
Suppose baseline weights are \(\mathbf w^{(A)}\) and candidate weights are \(\mathbf w^{(B)}\).
For each scenario \(m\), compute
\[ L_m^{(A)},\qquad L_m^{(B)} \]
from the same underlying asset path. The paired scenario difference is
\[ \Delta L_m=L_m^{(B)}-L_m^{(A)}. \]
The same idea applies to maximum drawdown, worst-5-day return, and other stress statistics.
This is closely related to the common-random-numbers principle in simulation: reusing the same underlying random scenario can reduce noise in comparisons because the market draw is held common (Glasserman 2003).
Why the same cloud matters
If Portfolio A is evaluated on cloud A and Portfolio B on independently generated cloud B, then
\[ \text{observed difference} = \text{portfolio effect} + \text{Monte Carlo cloud difference}. \]
Using the same cloud removes the second component from the direct what-if comparison, conditional on the scenario generator.
When same-cloud comparison is not enough
A same-cloud comparison does not solve every comparability problem. If a candidate introduces assets, derivatives, nonlinear payoffs, or risk factors not represented in the original scenario cloud, the scenario generator must first support those exposures.
Weight Effect versus Scenario-Generation Effect
A clean evaluation can use two separate experiments.
Experiment A — portfolio effect
Hold the scenario cloud fixed and change only portfolio weights or holdings.
This answers:
Given the same modeled future states, how does the candidate portfolio alter risk?
Experiment B — model effect
Hold the portfolio fixed and change the scenario generator.
This answers:
For the same portfolio, how does the risk view change when the predictive model changes?
Changing both at once makes attribution ambiguous.
Scenario-Conditioned What-If versus Portfolio Optimization
Scenario-based stress testing and optimization are not the same task.
A what-if asks:
What would happen to this pre-specified candidate portfolio under the current scenario cloud?
An optimization asks:
Which portfolio weights maximize or minimize an objective computed from the scenario cloud?
The second problem introduces objective-function choice, constraints, estimation error, and overfitting risk. A stress dashboard can support candidate comparison without claiming to have optimized the portfolio.
A human portfolio manager may use the stress distribution to reject, modify, or accept a candidate allocation. The scenario engine can provide disciplined evidence without autonomously choosing the final weights.
Model-Implied Risk versus Realized-Loss Forecast Claim
A scenario-derived VaR, ES, or MDD distribution is conditional on the scenario model:
\[ \text{risk measure} = \text{functional of }F_t^{\text{model}}. \]
This supports language such as:
- “model-implied 95% 20-day VaR”;
- “scenario-implied drawdown distribution”; or
- “candidate reduces tail loss under the current scenario cloud.”
It does not by itself support the stronger claim that the reported number is a calibrated forecast of realized loss. That requires out-of-sample evaluation of the predictive distribution and tail calibration; see QM015 — Multivariate Probabilistic Forecast Evaluation.
How to Interpret the Result
A candidate portfolio can be considered more robust under the current modeled environment if, for example, it reduces model-implied ES and MDD without introducing an unacceptable loss elsewhere in the distribution.
But interpretation should remain conditional:
- conditional on the scenario generator;
- conditional on the portfolio revaluation rule;
- conditional on the horizon;
- conditional on the scenario count and tail estimator; and
- conditional on the candidate weights being fixed before the comparison.
A portfolio that looks safer under one scenario model can look different under another. Model disagreement is useful information rather than a reason to hide the conditional nature of the stress result.
Financial / Economic Example
Consider two assets with a 20-day joint scenario cloud. Compare:
- baseline: 60% risky asset, 40% defensive asset;
- candidate: 45% risky asset, 55% defensive asset.
Both portfolios are revalued on every identical scenario path. Suppose the candidate has lower 95% ES and lower 90th-percentile maximum drawdown, but also a lower median terminal wealth.
The result is not “the candidate is optimal.” It is:
Under the same modeled future states, the candidate trades some central outcome for lower modeled downside.
That trade-off is a portfolio decision, not a scoring-rule verdict.
Implementation
The included Python example generates a synthetic three-asset scenario cloud and revalues two buy-and-hold portfolios on exactly the same paths.
def revalue_buy_and_hold(asset_returns, weights):
prices = np.concatenate(
[np.ones((asset_returns.shape[0], 1, asset_returns.shape[2])),
np.cumprod(1.0 + asset_returns, axis=1)],
axis=1,
)
return prices @ np.asarray(weights, dtype=float)The code then computes horizon loss, MDD, VaR, ES, and worst-5-day return.
Common Mistakes
Generating a new cloud for every candidate portfolio. This confounds portfolio effects with Monte Carlo variation.
Treating joint scenarios as independent marginal draws. Asset-wise reshuffling destroys the dependence structure the stress test is meant to preserve.
Leaving the intrahorizon rebalancing rule unspecified. Buy-and-hold and constant-mix portfolios can have different path outcomes.
Computing MDD from terminal return only. Maximum drawdown requires the full wealth path.
Calling scenario VaR or ES realized truth. They are model-implied risk measures until calibration is independently established.
Optimizing weights on the same cloud and then describing the result as an unbiased what-if. Optimization introduces selection and overfitting risk.
Comparing portfolios whose risk factors are not represented by the cloud. The scenario state space must cover the instruments being revalued.
When Not to Use It
Scenario-based stress testing is not a substitute for historical performance backtesting, transaction-cost analysis, liquidity modeling, counterparty stress, or structural balance-sheet stress when those are the actual questions.
It is also not enough when the portfolio contains materially nonlinear instruments that cannot be revalued from the simulated risk factors.
Used in SlackQuant Research
- Multi-Asset Scenario Stress Lab — Technical White Paper (SSRN 7354238): uses common-cloud portfolio revaluation to compare current or candidate portfolios under the same modeled multi-asset future states.
Reproducibility
The synthetic Python lab verifies that identical portfolios have exactly identical same-cloud outputs, that different weights produce paired scenario differences, and that MDD and worst-window statistics use the full path rather than only terminal wealth.