diff options
Diffstat (limited to 'python/tests/test_scenarios.py')
| -rw-r--r-- | python/tests/test_scenarios.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/tests/test_scenarios.py b/python/tests/test_scenarios.py index 4e695864..d079b1c9 100644 --- a/python/tests/test_scenarios.py +++ b/python/tests/test_scenarios.py @@ -12,13 +12,13 @@ class TestSenarios(unittest.TestCase): option1 = BlackSwaption.from_tradeid(7, option_delta) option2 = BlackSwaption.from_tradeid(8, option_delta) portf = Portfolio([option1, option2, option_delta]) - date_range = pd.bdate_range(option_delta.trade_date, pd.Timestamp('2017-05-17') - BDay(), freq = '5B') + date_range = pd.bdate_range(option_delta.value_date, pd.Timestamp('2017-05-17') - BDay(), freq = '5B') def test_portfolio(self): """ check that run_portfolio_scenarios match the sum of the individual pieces""" vol_shock = np.arange(-0.15, 0.3, 0.01) spread_shock = np.arange(-0.2, 0.3, 0.01) - vs = BlackSwaptionVolSurface("IG", 28, trade_date=self.option_delta.trade_date) + vs = BlackSwaptionVolSurface("IG", 28, value_date=self.option_delta.value_date) vol_surface = vs[vs.list(source="BAML")[-1]] df = run_portfolio_scenarios(self.portf, self.date_range, spread_shock, vol_shock, vol_surface) |
