Skip to content

Use explicit index forward accrual conventions in floating swap legs (#191) - #402

Merged
domokane merged 1 commit into
domokane:masterfrom
AIM-IT4:fix/swap-index-daycount-191
Oct 16, 2026
Merged

domokane merged 1 commit into
domokane:masterfrom
AIM-IT4:fix/swap-index-daycount-191

Conversation

@AIM-IT4

@AIM-IT4 AIM-IT4 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Addresses the convention ambiguity raised in #191.

The old inline expression (index_curve.df(start)/index_curve.df(end)-1)/index_alpha was mathematically sound: the curve's time basis and coupon accrual basis are legitimately distinct. This PR avoids implying that the curve's DF time basis should be overwritten with the index day count.

  • Replace hand-rolled forward calculation in SwapFloatLeg with index_curve.fwd_rate(start,end,accrual_dc_type=self.accrual_dc_type), the project's existing well-defined API.
  • The curve retains curve_dc_type for DF interpolation, while the leg uses accrual_dc_type for simple forward-rate accrual.
  • Adds tests using ACT/360, ACT/365F and 30E/360 index coupons and first-fixing overrides.

Local: 15 tests passed, including swap-leg, IBOR and OIS tests. Behavior is intentionally unchanged for properly specified curves; this is a consistency/documentation improvement, not a claim that different day counts are an arbitrage bug. CI pending.

@domokane
domokane merged commit 4b7fcf8 into domokane:master Oct 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants