Commit e149db9
committed
feat(schedule): add coupon/pillar schedule generation (Phase 0)
Closes Phase 0 foundations. Composes Date, Period, Calendar, and
BusinessDayConvention into accrual-period date sequences.
- Schedule + ScheduleBuilder: effective/termination/tenor + calendar +
conventions; dates(), len, effective/termination_date, Index, iter.
- Drift-free generation from the anchor (anchor +/- i*tenor), then
business-day adjusted and consecutive-duplicate deduped.
- DateGeneration: Backward, Forward, Zero, ThirdWednesday (IMM snap).
- StubConvention: ShortFront/LongFront (backward), ShortBack/LongBack
(forward); natural short stub by default.
- end_of_month rolling; termination gets its own convention.
- third_wednesday(year, month) IMM helper.
- ScheduleError (#[non_exhaustive]): EmptyRange, NonPositiveTenor,
StubDirectionMismatch.
14 new tests (121 total): even/short/long stubs both directions, EOM
month-end rolling, IMM snap, adjustment lands on business days, error
cases, iteration. fmt/clippy/doc clean.1 parent f012aa3 commit e149db9
2 files changed
Lines changed: 631 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| 92 | + | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| |||
0 commit comments