Module schedules
Expand description
Calculation-period schedule generation.
A Schedule is the ordered list of business-day-adjusted period boundary
dates produced from an effective date, a termination date, a frequency, a
calendar, a business-day convention, a roll convention, and a stub type.
Structs§
- Schedule
- An ordered set of adjusted calculation-period boundary dates.
Enums§
- Schedule
Error - Why a stated list of boundary dates is not a schedule.
Functions§
- adjusted 🔒
- Business-day-adjusts
pts: every boundary but the last byconvention, the last byterminal_convention(defaulting toconvention), then drops the collisions an adjustment produces — an interior boundary rolled onto or past either end merges into that end, as the two conventions can cross. - advances 🔒
- Whether stepping by
frequencycarries the boundary cursor forward in time. - check_
term 🔒 - The term runs forwards:
effectivestrictly beforetermination. Shared by both generators so a reversed or empty term is refused the same way whichever one is called. - generate_
backward 🔒 - Backward generation, anchored on
termination. Each regular boundary istermination − k·frequencymeasured from the fixed anchor, never from the previously generated boundary (seescale). - generate_
forward 🔒 - Forward generation, anchored on
effective. Each regular boundary iseffective + k·frequencymeasured from the fixed anchor, never from the previously generated boundary (seescale). - negate 🔒
- scale 🔒
frequencyscaled byk(e.g.6M,k=2→12M), so a generator can march from its fixed anchor bykwhole periods rather than from the previous (possibly clamped) boundary.- unadjusted_
boundaries 🔒 - The unadjusted boundaries from
effectivetotermination: the regular periods measured from one fixed anchor in the directionstubnames, the interior roll applied to each before the stop test.Schedule::generate’s core, shared withSchedule::generate_with_stubs.