> ## Documentation Index
> Fetch the complete documentation index at: https://kalpi.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Scenario Analysis

> Stress-test your strategy against historical and hypothetical market 'Black Swan' events.

**Scenario Analysis** is the art of asking "What if?" It forces your algorithmic strategy to endure the most brutal periods in market history to see if it survives the fire.

Instead of simulating under "normal" market conditions, this engine locks your portfolio into the constraints of past economic crises to test your drawdown limits.

## Common Stress Scenarios

Kalpi’s Scenario Analysis engine allows you to map your strategy against historical regime shifts:

| Scenario             | Market Trigger                                  | Goal                                                                                            |
| :------------------- | :---------------------------------------------- | :---------------------------------------------------------------------------------------------- |
| **Liquidity Crunch** | Sudden freeze in market credit and volume.      | Evaluate if your strategy can exit positions quickly without excessive slippage.                |
| **Inflation Shock**  | Rapid spikes in interest rates and input costs. | Identify if your portfolio contains high-beta, interest-rate-sensitive assets that will crater. |
| **Black Swan Event** | Flash crashes or geopolitical conflict spikes.  | Test your stop-loss triggers and absolute portfolio resilience in high-volatility regimes.      |

<Tip>
  If your strategy fails a Scenario Analysis stress test, don't just delete it. Use the **Basket Builder** to introduce non-correlated assets (like Gold or low-beta Defensives) to flatten the drawdown curve during these shock events.
</Tip>
