diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/analytics/index.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/python/analytics/index.py b/python/analytics/index.py index 75a3e0b2..a9b6ab6a 100644 --- a/python/analytics/index.py +++ b/python/analytics/index.py @@ -71,7 +71,7 @@ class Index(object): fixed coupon (in bps) """ self.fixed_rate = fixed_rate - self.notional = notional + self.notional = abs(notional) self._start_date = start_date self._end_date = end_date self.recovery = recovery @@ -86,7 +86,7 @@ class Index(object): self.name = None self.issue_date = issue_date self._quote_is_price = quote_is_price - self._direction = -1. + self._direction = -1. if notional > 0 else 1. for attr in ['currency', '_step_in_date', '_cash_settle_date', '_accrued', '_dl_pv', '_pv', '_clean_pv', '_original_clean_pv', '_trade_date', 'index_type', 'series', 'tenor']: @@ -413,7 +413,6 @@ class Index(object): instance.series = series instance.tenor = tenor - instance.direction = "Buyer" tenor = tenor.upper() if tenor.endswith("R"): tenor = tenor[:-1] |
