aboutsummaryrefslogtreecommitdiffstats
path: root/python/analytics/scenarios.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/analytics/scenarios.py')
-rw-r--r--python/analytics/scenarios.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/analytics/scenarios.py b/python/analytics/scenarios.py
index 037f5d9b..ba70cdc1 100644
--- a/python/analytics/scenarios.py
+++ b/python/analytics/scenarios.py
@@ -28,6 +28,9 @@ def run_swaption_scenarios(swaption, date_range, spread_shock, vol_shock,
spreads = swaption.index.spread * (1 + spread_shock)
T = swaption.T
+ if isinstance(vol_surface, dict):
+ vol_surface = vol_surface[(swaption.index.index_type, swaption.index.series)]
+
r = []
for date in date_range:
swaption.index.value_date = min(swaption.exercise_date, date.date())