diff options
Diffstat (limited to 'python/analytics/portfolio.py')
| -rw-r--r-- | python/analytics/portfolio.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/analytics/portfolio.py b/python/analytics/portfolio.py index ef1d5578..89210058 100644 --- a/python/analytics/portfolio.py +++ b/python/analytics/portfolio.py @@ -26,7 +26,8 @@ def portf_repr(method): 'Vol': percent, 'Ref': thousands, 'Attach Rho': percent, - 'Detach Rho': percent}, + 'Detach Rho': percent, + 'HY Equiv': thousands}, 'index': False} if method == 'string': kwargs['line_width'] = 100 @@ -152,7 +153,7 @@ class Portfolio: """returns the equivalent protection notional makes sense only where there is a single index.""" - return sum([getattr(t, 'delta', -t._direction) * t.notional for t in self.trades]) + return sum([getattr(t, 'delta', t._direction) * t.notional for t in self.trades]) @property def gamma(self): |
