Skip to content

Commit

Permalink
BUG: DF for FRA is measured as of payment date.
Browse files Browse the repository at this point in the history
  • Loading branch information
attack68 committed Dec 19, 2023
1 parent ad52143 commit 99931ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rateslib/instruments.py
Original file line number Diff line number Diff line change
Expand Up @@ -6986,7 +6986,8 @@ def cashflows(
fx_, base_ = _get_fx_and_base(self.leg1.currency, fx_, base_)

cf = float(self.cashflow(curves[0]))
npv_local = self.cashflow(curves[0]) * curves[1][self.leg1.schedule.pschedule[0]]
df = float(curves[1][self.leg1.schedule.pschedule[0]])
npv_local = cf * df

_fix = None if self.fixed_rate is NoInput.blank else -float(self.fixed_rate)
_spd = None if curves[1] is NoInput.blank else -float(self.rate(curves[1])) * 100
Expand All @@ -6997,6 +6998,7 @@ def cashflows(
cfs[defaults.headers["rate"]] = _fix
cfs[defaults.headers["spread"]] = _spd
cfs[defaults.headers["npv"]] = npv_local
cfs[defaults.headers["df"]] = df
cfs[defaults.headers["fx"]] = float(fx_)
cfs[defaults.headers["npv_fx"]] = npv_local * float(fx_)
return DataFrame.from_records([cfs])
Expand Down

0 comments on commit 99931ba

Please sign in to comment.