voiage.financial.risk_analysis.stress_testing
stress_testing
Section titled “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})
Returns
Section titled “Returns”Dict[str, float]: Dictionary mapping scenario names to stressed VaR values
Parameters:
base_returnsnp.ndarray | list[float]stress_scenariosdict[str, float]
Returns: dict[str, float]