diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/swaption_pnl.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/swaption_pnl.py b/python/swaption_pnl.py index 985eca94..910803b9 100644 --- a/python/swaption_pnl.py +++ b/python/swaption_pnl.py @@ -22,12 +22,12 @@ def get_index_pv( dates = [] for d in dr: - prev_day = (d - BDay()).date() + prev_day = (d - bus_day).date() if previous_twentieth(d, roll=True) == d.date(): accrued = 0.0 for t in portf.trades: _, amount = t._fee_leg.cashflows[0] - amount *= get_fx(t.currency, d) + amount *= get_fx(d, t.currency) accrued -= amount * t.notional * t.factor * t.fixed_rate * 1e-4 else: accrued = 0.0 @@ -40,7 +40,7 @@ def get_index_pv( (prev_day, strategies), ) for (fee, curr) in c: - nav += fee * get_fx(curr, d) + nav += fee * get_fx(d, curr) daily.append(nav + accrued) pvs.append(portf.pv) dates.append(prev_day) |
