diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/analytics/option.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/python/analytics/option.py b/python/analytics/option.py index 0ac6cd39..97475a61 100644 --- a/python/analytics/option.py +++ b/python/analytics/option.py @@ -121,7 +121,7 @@ class BlackSwaption(ForwardIndex): vs = BlackSwaptionVolSurface(*k, **args) if surface_id is None: for source in source_list: - if len(vs.list(source, self.option_type)) >=1: + if len(vs.list(source, self.option_type)) >= 1: break else: raise ValueError("No market data available for this day") @@ -177,8 +177,8 @@ class BlackSwaption(ForwardIndex): @property def moneyness(self): - return self._strike / g(self.index, self.index.fixed_rate, self.exercise_date, - pv=self.forward_pv) + return self._strike / g(self.index, self.index.fixed_rate, + self.exercise_date, pv=self.forward_pv) @property def direction(self): @@ -203,7 +203,7 @@ class BlackSwaption(ForwardIndex): return self._direction * intrinsic * self.notional def __hash__(self): - return hash((super().__hash__(), tuple(getattr(self, k) for k in \ + return hash((super().__hash__(), tuple(getattr(self, k) for k in BlackSwaption.__slots__))) @property |
