Expand description
Term-structure base machinery.
Port of ql/termstructure.{hpp,cpp}: the TermStructure trait is the
curve contract (C++’s virtual interface) and TermStructureBase is the
shared holder concrete curves embed (C++’s data members and default
behaviour). A term structure keeps track of its reference date in one of
three ways: a fixed date, a date moving off the evaluation date (advanced
by a number of settlement days on a calendar), or a date managed by the
concrete curve itself (which then overrides
reference_date).
§Divergences from QuantLib
- QuantLib’s moving mode reads the global
Settingssingleton; per D5 the moving constructor takes the sharedSettingshandle explicitly and registers with its evaluation-date observable. The date mutates through&self, so an observer may read the reference date back while the evaluation-date notification that invalidated it is still running. - A base asked for a reference date it does not manage returns an
Errwhere C++ silently returns the null date. - C++’s
Extrapolatorbase class is folded into the holder as a flag; it can be extracted once the interpolation layer needs it. - The empty
Calendar/DayCounterstates areOptions here, per theDayCounterport convention. - No today’s-date fallback: C++ resolves an unset evaluation date to
Date::todaysDate(); this port has no system-clock date, so a moving structure returns anErruntil the evaluation date is set explicitly. - The moving recompute reads the constructor-stored calendar and
settlement days; a curve overriding
calendarorsettlement_days(C++ dispatches through the virtuals) must overridereference_dateas well.
Re-exports§
pub use bootstraphelper::BootstrapHelperBase;pub use bootstraphelper::RateHelper;pub use bootstraphelper::RelativeDateRateHelper;pub use bootstraphelper::compare_by_pillar_date;pub use bootstraphelper::sort_by_pillar_date;
Modules§
- bootstraphelper
- Bootstrap-helper base for curve construction.
- bootstraptraits
- Bootstrap traits and the mutable node plumbing they drive.
- interpolatedcurve
- Helper to build interpolated term structures.
- iterativebootstrap
- Iterative piecewise-curve bootstrap.
- volatility
- Volatility term structures.
- yields
- Yield term structures.
- yieldtermstructure
- Interest-rate term structure.
Structs§
- Term
Structure Base - Shared base holder for term structures.
Traits§
- Term
Structure - Basic term-structure functionality.