--- title: "Tutorial: Stress testing a portfolio against a 2008-style crash" slug: "valuation-stress-testing-tutorial" updated: 2026-11-02T12:02:06Z published: 2026-11-02T12:02:06Z canonical: "support.lusid.com/valuation-stress-testing-tutorial" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.lusid.com/llms.txt > Use this file to discover all available pages before exploring further. # Tutorial: Stress testing a portfolio against a 2008-style crash In this tutorial we’ll replay a 2008-style market crash against a small multi-asset portfolio and see: - How to create a scenario that moves equities, currencies, interest rates and volatility at the same time. - Why the combined crash costs more than its parts added together. - How to work out how much worse a crash would have to be to lose a particular amount. ### The sample portfolio Consider the following USD portfolio with a mix of assets chosen so that each one reacts to the crash in a different way. On 1 October 2026, the portfolio is worth 2,349,065 USD, GBP/USD is 1.30, USD interest rates are a flat 4%, and Apple’s volatility is a flat 25%. | Holding | Details | Value (USD) | Valued using | | --- | --- | --- | --- | | Apple Inc | 1,000 shares at 200 USD | 200,000 | Price | | Microsoft Corp | 500 shares at 400 USD | 200,000 | Price | | JPMorgan Chase & Co | 800 shares at 250 USD | 200,000 | Price | | HSBC Holdings plc | 20,000 shares at 8 GBP | 208,000 | Price and GBP/USD rate | | BP plc | 30,000 shares at 4.50 GBP | 175,500 | Price and GBP/USD rate | | US Treasury 4% 2035 | 1,000,000 nominal | 998,824 | USD interest rate curve (`Discounting` pricing model) | | Apple 200 Call Oct 2027 | 100 contracts on 100 shares each | 236,741 | Apple price, Apple volatility and USD rates (`BlackScholes` pricing model) | | GBP cash | 100,000 GBP | 130,000 | GBP/USD rate | ## Creating the crash scenario 1. Navigate to **Portfolio Management > Scenarios** and click **Create Scenario**. 2. On the **Basic Details** tab, enter a **Scope** and **Code**, choose a **Scenario type** of **Historical**, and enter a **Display name** such as `2008-style market crash`. 3. On the **Shifts** tab, click **Add shift** six times and fill in each shift as follows: | Scenario shift type | Settings | What it models | | --- | --- | --- | | Price shift | **Filter**: asset class equals `Equities` (`assetClass eq 'Equities'`) **Shift type**: percentage **Amount**: −20 | Every share price falls 20% | | Price shift | **Instrument**: JPMorgan Chase & Co **Shift type**: percentage **Amount**: −30 | Banks fall further: 30% | | Price shift | **Instrument**: HSBC Holdings plc **Shift type**: percentage **Amount**: −30 | Banks fall further: 30% | | FX shift | **Currency pair**: GBP/USD **Shift type**: percentage **Amount**: −10 | Sterling falls 10% against the dollar | | Rate curve shift | **Currency**: USD **Shift type**: parallel **Amount**: 100 | Every USD interest rate rises by 100bp | | Vol surface shift | **Instrument**: `EquityVol.*` **Shift type**: absolute **Amount**: 0.05 | Equity volatility rises by 5 points, from 25% to 30% | ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-TB3FBUJ8.png?sv=2026-02-06&spr=https&st=2026-11-02T18%3A59%3A08Z&se=2026-11-02T19%3A59%3A08Z&sr=c&sp=r&sig=s13WYG2crLdDVdDxt7oxEA9G8m%2BMGqQebrYXcVQ4Q%2BA%3D) Note the following: - Shift 1 uses a filter, so it reaches every equity without having to list them. Shifts 2 and 3 name an instrument directly. When a shift names an instrument and a filter-based shift hits the same price, LUSID applies only the one that names the instrument. So JPMorgan and HSBC fall 30%, not 20% and then a further 30%. - The FX, rate and volatility shifts don’t name any holdings at all. They move market data, and every holding valued from that market data moves with it. - Volatilities are decimals, so 0.05 means 5 volatility points. An amount of 5 would add 500 points. - The web app can’t set a short code, so LUSID generates one from the display name. [More information](/v1/docs/how-do-i-create-a-scenario#data-fields). ## Valuing the portfolio under the crash On the **Portfolio Management > Valuations** dashboard, choose **2008-style market crash** from the **Scenarios** picker. [More information](/v1/docs/applying-a-scenario-to-a-valuation). LUSID revalues every holding under the shifted market and adds a column group for the scenario next to the base values. The portfolio falls from 2,349,065 USD to 1,853,879 USD, a loss of 495,187 USD, or 21.1%. ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-CEW100F6.png?sv=2026-02-06&spr=https&st=2026-11-02T18%3A59%3A08Z&se=2026-11-02T19%3A59%3A08Z&sr=c&sp=r&sig=s13WYG2crLdDVdDxt7oxEA9G8m%2BMGqQebrYXcVQ4Q%2BA%3D) Each holding moves for a different reason: | Holding | Base (USD) | Crash (USD) | Change | Why | | --- | --- | --- | --- | --- | | Apple Inc | 200,000 | 160,000 | −20% | Shift 1: every equity −20%. | | Microsoft Corp | 200,000 | 160,000 | −20% | Shift 1. | | JPMorgan Chase & Co | 200,000 | 140,000 | −30% | Shift 2 replaces shift 1 for this share. | | HSBC Holdings plc | 208,000 | 131,040 | −37% | Shift 3 takes 30% off the GBP price, then shift 4 takes 10% off its value in USD: 0.7 × 0.9 = 0.63. | | BP plc | 175,500 | 126,360 | −28% | Shift 1 and shift 4: 0.8 × 0.9 = 0.72. | | US Treasury 4% 2035 | 998,824 | 928,353 | −7.1% | Shift 5: higher rates discount the bond’s cash flows more heavily. No price shift touches it, because a bond isn’t an equity and is valued from the curve, not a price. | | Apple 200 Call Oct 2027 | 236,741 | 91,126 | −61.5% | Shift 1 drops Apple’s price from 200 to 160, leaving the option well below its strike. Shifts 5 and 6 help it slightly, but nowhere near enough. | | GBP cash | 130,000 | 117,000 | −10% | Shift 4 only. | | **Total** | **2,349,065** | **1,853,879** | **−21.1%** | | Note the following: - The option is the biggest surprise. A 20% fall in Apple’s shares cuts the option’s value by more than 60%, because an option magnifies moves in its underlying. Notice that no shift names the option: it moves because LUSID revalues it using the shifted Apple price, volatility and rates. - The scenario shows PV in portfolio currency, so the HSBC and BP rows include the fall in sterling as well as the fall in their share prices. - LUSID never changes your stored market data. Remove the scenario from the picker and the base values are exactly as before. ## Comparing the crash with its parts We could create separate scenarios for each of the four different shift types and then value the portfolio against all five scenarios (the aggregate 2008-style market crash and the four individual constituents: | Scenario | Portfolio value (USD) | Change (USD) | | --- | --- | --- | | Equities −20%, banks −30% (shifts 1–3) | 1,933,809 | −415,256 | | GBP/USD −10% (shift 4) | 2,297,715 | −51,350 | | USD rates +100bp (shift 5) | 2,288,713 | −60,353 | | Equity vol +5 points (shift 6) | 2,387,390 | +38,324 | | *The four added together* | | *−488,635* | | **2008-style market crash (all six shifts)** | **1,853,879** | **−495,187** | ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-AUPKVNBF.png?sv=2026-02-06&spr=https&st=2026-11-02T18%3A59%3A08Z&se=2026-11-02T19%3A59%3A08Z&sr=c&sp=r&sig=s13WYG2crLdDVdDxt7oxEA9G8m%2BMGqQebrYXcVQ4Q%2BA%3D) The equity fall does most of the damage, and higher volatility on its own actually makes money, because it raises the value of the option. More interesting is the last two rows: the parts add up to a loss of 488,635 USD, but the crash loses 495,187 USD, which is 6,552 USD more. That difference is the result of the shifts interacting: - The option loses 16,302 USD more than its parts suggest. On its own, a rise in volatility or rates adds value to the option. After Apple’s shares have fallen to 160, the option is further below its strike, so the same rises add much less. - HSBC, BP and the GBP cash lose 9,750 USD less. On its own, the sterling fall applies to today’s share prices. In the crash, it applies to share prices that have already fallen, so it takes less off them. This is why a scenario revalues every holding under all the shifts together, rather than adding up the effect of each shift. Adding up separate results, or separate [risk metrics](/v1/docs/how-does-lusid-assess-risk), misses interactions like these. ## Seeing analytics under the crash The **Scenarios** picker in the LUSID web app only shows PV in portfolio currency. You can also see many analytic metrics under a scenario, one column at a time. For example, to see how the crash changes the Treasury bond’s modified duration: 1. If your view doesn’t already include it, add the **Modified Duration** column. 2. Right-click its header, select **Options · Scenario** and choose **2008-style market crash**. [More information](/v1/docs/applying-a-scenario-to-a-valuation#shifting-other-metrics-in-the-web-app-or-the-api). LUSID adds a scenario copy of the column next to the original. The bond’s modified duration falls from 7.09 to 7.00: at higher rates, the bond is slightly less sensitive to further rate moves. The other holdings have no modified duration, so their cells are blank in both columns: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-1EHSEWC2.png?sv=2026-02-06&spr=https&st=2026-11-02T18%3A59%3A08Z&se=2026-11-02T19%3A59%3A08Z&sr=c&sp=r&sig=s13WYG2crLdDVdDxt7oxEA9G8m%2BMGqQebrYXcVQ4Q%2BA%3D) ## Working out how bad a crash would have to be So far we’ve asked what the crash costs. A risk committee often asks the opposite question: how bad would things have to get before we lost 1,000,000 USD? A reverse stress test answers this by scaling every shift in a scenario up or down until the portfolio loses your target amount. [More information](/v1/docs/applying-a-scenario-to-a-valuation#reverse-stress-testing-using-the-api). The only way to do this currently is calling the [SolveReverseStress](https://www.lusid.com/docs/api/lusid/endpoints/scenarios/SolveReverseStress) API with the portfolio, recipe, date, scenario and target loss: ```json curl -X POST 'https://.lusid.com/api/api/scenarios/$reversestress'  -H 'Authorization: Bearer '  -H 'Content-Type: application/json-patch+json'  -d '{  "portfolioEntityIds": [{"scope": "ScenarioTutorial", "code": "CRASH-USD", "portfolioEntityType": "SinglePortfolio"}],  "recipeId": {"scope": "ScenarioTutorial", "code": "Recipe"},  "effectiveAt": "2026-10-01T00:00:00Z",  "scenario": {"scope": "ScenarioTutorial", "code": "MarketCrash"},  "targetPnl": -1000000,  "metric": "Valuation/PvInPortfolioCcy",  "maxScale": 3 }' ``` LUSID returns a `scale` of about 2.33. The crash would have to be 2.33 times as severe for the portfolio to lose 1,000,000 USD: | Shift | 2008-style crash | At 2.33 times | | --- | --- | --- | | Equities | −20% | −46.7% | | JPMorgan and HSBC | −30% | −70% | | GBP/USD | −10% | −23.3% | | USD rates | +100bp | +233bp | | Equity volatility | +5 points | +11.7 points | Note the following: - The request uses `Valuation/PvInPortfolioCcy` because the portfolio holds GBP as well as USD assets. The default metric is in each holding’s own currency, which LUSID can’t add up. - `maxScale` limits how far LUSID scales the crash. At the default of 5, bank shares would fall 150%, which is impossible, and the request would fail. At 3, they fall at most 90%. - The response also includes a `ladder` showing the loss at each scale LUSID tried, from 311,580 USD at 0.6 times the crash to 1,207,999 USD at 3 times.