aboutsummaryrefslogtreecommitdiffstats
path: root/python/exploration
diff options
context:
space:
mode:
Diffstat (limited to 'python/exploration')
-rw-r--r--python/exploration/swaption_calendar_spread.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/exploration/swaption_calendar_spread.py b/python/exploration/swaption_calendar_spread.py
index a1a244d6..f3c1aaf0 100644
--- a/python/exploration/swaption_calendar_spread.py
+++ b/python/exploration/swaption_calendar_spread.py
@@ -143,13 +143,13 @@ def plot_time_color_map(df, spread_shock, attr="pnl", path=".", color_map = cm.R
fig.colorbar(chart, shrink=.8)
#fig.savefig(os.path.join(path, "spread_time_color_map_"+ attr+ "_{}.png".format(val_date)))
-def plot_trade_scenarios(portf):
+def plot_trade_scenarios(portf, shock_min = -.15, shock_max = .2):
portf.reset_pv()
earliest_date = min(portf.swaptions,key=attrgetter('exercise_date')).exercise_date
date_range = pd.bdate_range(portf.indices[0].trade_date, earliest_date - BDay(), freq = '5B')
vol_shock = np.arange(-0.15, 0.3, 0.01)
- spread_shock = np.arange(-0.15, 0.2, 0.01)
+ spread_shock = np.arange(shock_min, shock_max, 0.01)
index = portf.indices[0].name.split()[1]
series = portf.indices[0].name.split()[3][1:]
vs = VolatilitySurface(index, series, trade_date=portf.indices[0].trade_date)