Skip to content

Commit e149db9

Browse files
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

File tree

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ pub mod daycount;
7171
pub mod linear;
7272
pub mod nelson_siegel;
7373
pub mod pchip;
74+
pub mod schedule;
7475
pub mod spline;
7576
pub mod svensson;
7677

@@ -88,6 +89,7 @@ pub use error::YieldCurveError;
8889
pub use linear::LinearCurve;
8990
pub use nelson_siegel::NelsonSiegelCurve;
9091
pub use pchip::PchipCurve;
92+
pub use schedule::{third_wednesday, DateGeneration, Schedule, ScheduleError, StubConvention};
9193
pub use spline::CubicSplineCurve;
9294
pub use svensson::SvenssonCurve;
9395

0 commit comments

Comments
 (0)