diff options
Diffstat (limited to 'python/analytics/portfolio.py')
| -rw-r--r-- | python/analytics/portfolio.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python/analytics/portfolio.py b/python/analytics/portfolio.py index 583f5582..508201f1 100644 --- a/python/analytics/portfolio.py +++ b/python/analytics/portfolio.py @@ -151,17 +151,18 @@ class Portfolio: def _todf(self): headers = ["Product", "Index", "Notional", "Ref", "Strike", "Direction", - "Expiry", "Vol", "PV", "Delta", "Gamma", "Theta", "Vega"] + "Type", "Expiry", "Vol", "PV", "Delta", "Gamma", "Theta", + "Vega"] rec = [] for t in self.trades: if isinstance(t, Index): name = f"{t.index_type}{t.series} {t.tenor}" r = ("Index", name, - t.notional, t.ref, "N/A", t.direction, "N/A", None, t.pv, 1., 0., t.theta, 0.) + t.notional, t.ref, "N/A", t.direction, "N/A", "N/A", None, t.pv, 1., 0., t.theta, 0.) elif isinstance(t, BlackSwaption): name = f"{t.index.index_type}{t.index.series} {t.index.tenor}" r = ("Swaption", name, - t.notional, t.ref, t.strike, t.direction, t.forward_date, t.sigma, t.pv, + t.notional, t.ref, t.strike, t.direction, t.option_type, t.forward_date, t.sigma, t.pv, t.delta, t.gamma, t.theta, t.vega) else: raise TypeError |
