Skip to content

voiage.financial.risk_analysis.stress_testing

stress_testing([positional or keyword] base_returns: np.ndarray | list[float] = None, [positional or keyword] stress_scenarios: dict[str, float] = None) -> dict[str, float]

Perform stress testing on portfolio returns under different scenarios.

Args: base_returns: Array of base case returns stress_scenarios: Dictionary mapping scenario names to stress multipliers (e.g., {“recession”: 1.5, “market_crash”: 3.0})

Dict[str, float]: Dictionary mapping scenario names to stressed VaR values

Parameters:

  • base_returns np.ndarray | list[float]
  • stress_scenarios dict[str, float]

Returns: dict[str, float]