Stress Testing Tool
Scenario Loss Calculator
Investment Education, Research & Tools for Smarter Decisions.
Define a custom shock scenario by specifying your own equity drawdown, rate move, credit spread widening, and FX move. Then enter your portfolio's exposure to each factor by position type. The calculator estimates total stress P&L with attribution showing which factor and which position type drives the largest loss, the attribution that guides targeted hedging and risk reduction.
Direct Answer
A scenario loss calculator estimates a portfolio's total stress profit-and-loss under a custom shock you define, an equity drawdown, rate move, credit-spread widening, and FX move, applied against your portfolio's exposure to each factor. The attribution breaks down which factor and which position type drives the largest loss, information that can guide targeted hedging. Results are illustrative estimates only, not investment advice.
Tool
Step 1, Define your scenario
Step 2, Portfolio exposures by position type
Define your scenario and portfolio above, then click Calculate Scenario Loss.
Uses user-entered data only. No data is stored or transmitted. Estimates use simplified linear factor models and do not capture nonlinear instrument payoffs, correlation interactions, or path-dependent effects.
How to Use This Tool
This tool separates the stress test into two distinct inputs: the scenario definition (the magnitude of each factor shock) and the portfolio exposure (how much the portfolio is exposed to each factor). This separation is the correct conceptual structure for stress testing: the scenario reflects a macro view, and the exposure reflects the portfolio's current composition. Changing one without the other changes the result independently.
In Step 1, define a scenario by specifying the equity market drawdown as a percentage, the 10-year Treasury yield move in basis points, the widening in IG and HY credit spreads in basis points, and the USD appreciation versus the currency exposure of international equity positions. You can load one of four pre-calibrated historical scenarios (2008 Crisis, COVID-2020, 2022 Rate Shock, Stagflation) as a starting point, then adjust individual factor shocks to define a variant. You can also enter an entirely custom scenario, for example, a moderate equity correction with sharp credit spread widening but no rate move (a corporate credit event rather than a macro recession).
In Step 2, enter the current market value and the key risk sensitivity for each position type. For equity positions, enter the portfolio equity beta, the aggregate sensitivity of the equity sleeve to the market index. For IG bond positions, enter the modified duration; for HY bond positions, enter the spread duration. Treasury positions are affected only by the rate shock (no credit spread change). Cash is assumed to be unaffected by any factor shock.
The stress P&L for each position type is: Equity P&L = Value × Beta × (Equity Shock / 100); Rate P&L for IG/Treasury = Value × Duration × −(Rate Shock / 10,000) (a positive, i.e. rising, rate shock produces a bond price loss); Spread P&L for IG = Value × Duration × −(IG Spread Shock / 10,000); Spread P&L for HY = Value × Spread Duration × −(HY Spread Shock / 10,000); FX P&L for international equities = Value × (Equity Beta to global index) × (Equity Shock / 100) combined with the FX loss = Value × −(FX Shock / 100). The total for each position type is the sum of applicable components. The overall portfolio total is the sum across all position types.
Understanding the Attribution Output
The output table shows each position type's stress P&L broken down by contributing factor: equity shock, rate shock, and credit spread shock, with the total for each row and a grand portfolio total at the bottom. This attribution answers the question "what is driving my stress loss?", a question whose answer determines what hedges would reduce the loss most efficiently.
A portfolio where the equity shock column dominates the attribution has equity beta as its primary risk in this scenario. Reducing the equity allocation, adding put options, or using equity index futures are the most direct hedges. A portfolio where the spread shock column dominates has credit spread duration as its primary risk, reducing high-yield allocation or buying credit protection (CDS) would reduce that component. A portfolio where the rate shock column shows large negative numbers despite positive equity exposure has a mixed-risk profile requiring both duration management and equity risk management simultaneously.
The percentage contribution column shows each position type's share of the total stress loss. If domestic equities generate 85% of the stress loss in a 60/40 portfolio scenario, but the equity allocation is 60% of the portfolio, the equities are contributing disproportionately to stress risk. This disproportionate contribution arises when beta exceeds 1.0, when the scenario's equity shock is large relative to the credit or rate shock, or both.
When the rate shock in a scenario is negative (yields fall, flight to safety), Treasury positions will show positive P&L, a gain that partially offsets equity losses. The percentage contribution of the Treasury gain shows how much of the equity loss the bond allocation is offsetting. In a 2022-type scenario with positive rate shocks (yields rise), Treasuries also lose, and the offset disappears. This is the scenario that most severely punishes balanced portfolios, and it is the one the 2022 rate shock preset is calibrated to illustrate.
Building a Custom Scenario
The four preset scenarios cover the most common historical stress archetypes. But forward-looking stress tests often require custom scenarios specific to current macroeconomic conditions or portfolio-specific risks. Here is how to construct internally consistent custom scenarios for three common situations:
Corporate credit event (default wave, sector collapse). Set equity shock to a modest drawdown (−10% to −20%), set IG spread widening to 50-150 bps, set HY spread widening to 400-800 bps, set the rate move to −20 bps (modest flight to safety). The large HY spread widening with only a modest equity shock reflects a credit-driven stress rather than a broad recession, Treasury duration provides partial offset through the flight-to-safety rate move.
Geopolitical shock with oil spike. Set equity shock to −15% to −25%, rate move to +30 bps (slight supply-shock inflation), IG spread widening to 80 bps, HY spread widening to 300 bps, USD appreciation to +5% (safe-haven dollar demand). Energy-sector equities would gain in this scenario, but the tool's simplified structure does not capture sector-level attribution, enter only the aggregate portfolio equity beta, which reflects the net effect.
Emerging market contagion. Set equity shock to −20% (U.S. equities partially affected through contagion), rate move to −40 bps (flight to quality into Treasuries), IG spread widening to 80 bps, HY spread widening to 350 bps, USD appreciation to +8% to +12% (strong dollar surge versus EM currencies). Set the international equity value and beta to reflect EM-heavy international exposure. The FX component of the loss will dominate the international equity attribution in this scenario.
Frequently Asked Questions
How is the scenario loss calculator different from the portfolio shock matrix?
The portfolio shock matrix takes individual position inputs (up to five specific holdings with their own beta and duration) and applies four pre-defined historical scenarios simultaneously, the output is a matrix showing each position under each scenario. The scenario loss calculator takes position-type aggregates (all equities as one row, all IG bonds as one row, etc.) and lets you define your own custom factor shock magnitudes, the output is a single-scenario P&L with factor-level attribution. The two tools complement each other: use the matrix to identify which scenarios pose the greatest risk and which specific positions are most vulnerable; use the calculator to define a custom or variant scenario and see the factor attribution for a portfolio structured in aggregate position-type terms.
What equity beta should I use for a diversified equity portfolio?
For a broad market index fund (SPY, VTI, equivalent), use beta = 1.0. For a value-tilted portfolio, beta is typically 0.85-0.95. For a growth-tilted portfolio, beta is typically 1.05-1.25. For a small-cap portfolio, beta is typically 1.1-1.4. For a low-volatility strategy, beta is typically 0.6-0.8. If you hold individual stocks with widely different betas, compute the weighted average beta: sum(weight × beta) across positions. Most broker platforms show individual-stock betas on the quote page and some provide portfolio-level beta in the risk analytics section.
Why does spread widening reduce bond prices even when yields are also falling?
Treasury yields and credit spreads are different inputs to a corporate bond's yield. The corporate bond yield = Treasury yield + credit spread. In a flight-to-safety scenario, Treasury yields fall (increasing Treasury prices), but credit spreads widen simultaneously (decreasing corporate bond prices). Whether a corporate bond gains or loses depends on which effect dominates. For investment-grade bonds in a 2008-type scenario: Treasury yields fell approximately 80 bps (boosting prices) while IG spreads widened approximately 280 bps (reducing prices). The net yield move for IG bonds was approximately +200 bps higher, so IG bond prices fell on net despite the flight-to-safety Treasury rally. The calculator separates these two effects in the attribution output, showing the rate component (benefit from falling Treasury yields) and the spread component (loss from widening spreads) independently.
My portfolio has REITs and commodity positions, how should I enter them?
REITs are equity instruments with high sensitivity to interest rates. Enter REIT positions in the domestic equities row using the REIT's published equity beta (typically 0.8-1.2 for diversified REIT ETFs). The interest rate sensitivity of REITs is partially captured through equity beta (the market prices rising rates negatively for REITs) but is not separately decomposed in this tool. For a more precise REIT analysis, treat the REIT allocation separately and apply both an equity beta and a rate duration estimate. For commodity positions (gold, oil, commodity futures), commodity prices are not directly captured by this tool's four factors. Gold tends to behave as a safe-haven asset and gains in equity crashes, a rough approximation is to enter gold with equity beta of −0.1 to −0.2. For oil or diversified commodity exposure, the tool is not well-suited; run those scenarios separately using commodity-specific factor shocks.
How do I know if my scenario is internally consistent?
An internally consistent scenario has factor shocks that make economic sense together, they can all arise from the same macro cause. A large equity drawdown combined with sharply falling Treasury yields and widening credit spreads is consistent: it looks like a risk-off flight-to-safety credit crisis. A large equity drawdown combined with sharply rising Treasury yields and widening credit spreads is also consistent: it looks like a stagflation or supply-shock scenario where inflation fears dominate. What is generally not consistent: a large equity drawdown paired with a sharp rise in Treasury yields AND Treasury prices simultaneously (these are the same thing expressed differently), or a sharp narrowing of credit spreads during an equity crash (spreads almost always widen when equities fall sharply). If you are unsure whether a scenario is consistent, check the FRED historical data for the period you are trying to model, the actual factor moves from that period define a consistent scenario by construction. See the hypothetical scenarios guide for detailed guidance on internal consistency.
Can the same scenario produce different losses for two portfolios of the same size?
Yes, and the difference is the whole point of the calculation. The loss depends on exposure to each factor rather than on the amount invested, so two portfolios of identical value can differ sharply if one carries longer duration, higher equity beta or more credit spread sensitivity. Comparing the attribution rather than the total is what shows which factor is responsible, and that is the figure that translates into a change in positioning.
How is an FX shock applied to unhedged foreign fund holdings?
The exposure is the market value of the holdings denominated in the foreign currency, not the entire foreign allocation, and it is entered as the amount subject to translation. An unhedged position carries the full move; a currency-hedged share class carries close to none, minus the hedge cost and any residual. Where a fund holds companies with revenue in other currencies, the economic exposure differs from the listing currency, which is a modelling judgment rather than a data lookup.
Should the equity shock be entered as an index move or as the portfolio's own expected move?
As the index move. The calculation applies the portfolio's equity beta to that shock to derive the position-level effect, so entering an already beta-adjusted figure applies the beta twice. Keeping the scenario in market terms also lets one scenario be shared across portfolios with different sensitivities, which is what makes results comparable. The beta input is where portfolio-specific behavior belongs.
Does the calculator assume the shocks happen simultaneously?
Yes. All four factor moves are applied to the same starting portfolio and summed, which is equivalent to assuming they occur together and that the effects are additive. Real episodes unfold in sequence, and the ordering can matter where one move triggers a forced reduction before the next arrives. The simultaneous treatment is a reasonable approximation for an unleveraged portfolio and understates the damage for a leveraged one.
References
- Federal Reserve Bank of St. Louis. FRED Economic Data. DGS10 (10-year Treasury yields), BAMLC0A0CM (IG OAS), BAMLH0A0HYM2 (HY OAS). https://fred.stlouisfed.org
- S&P Dow Jones Indices. S&P 500 Index total return data. https://www.spglobal.com/spdji/en/indices/equity/sp-500/
- Borio, Claudio. "The financial cycle and macroeconomics: What have we learnt?" BIS Working Papers No. 395, December 2012. Factor shock calibration informed by cross-cycle empirical ranges. https://www.bis.org/publ/work395.htm
- Roncalli, Thierry. Handbook of Financial Risk Management. Chapman and Hall/CRC, 2020. Factor decomposition and stress attribution methodology, chapters 3 and 7.
Disclaimer
This tool is for educational and informational purposes only. All estimates are based on simplified linear factor models and user-entered inputs. They do not constitute investment advice, portfolio recommendations, or a guarantee of future performance. No data entered is stored or transmitted. Consult a qualified financial professional before making investment decisions or implementing risk management strategies based on stress test results.