Class PiecewiseLogMixedLinearCubicSpreadDiscount
- Namespace
- NanoQL.TermStructures
- Assembly
- NanoQL.dll
A spread discount curve over a base curve, bootstrapped iteratively on log-mixed-linear-cubic interpolation of its
spread discount factors: QuantLib-Python's PiecewiseLogMixedLinearCubicSpreadDiscount.
public sealed class PiecewiseLogMixedLinearCubicSpreadDiscount : PiecewiseSpreadYieldCurve<LogMixedLinearCubic, IterativeBootstrap>, IInterpolatedCurve<Discount, LogMixedLinearCubic>
- Inheritance
-
PiecewiseLogMixedLinearCubicSpreadDiscount
- Implements
- Inherited Members
- Extension Methods
Remarks
QuantLib-Python's %template name for PiecewiseSpreadYieldCurve<TInterpolator, TBootstrap> on
LogMixedLinearCubic and IterativeBootstrap: it adds constructors only.
QuantLib's LogMixedLinearCubic has no default construction: a curve built without an
interpolator refuses its zero value with InvalidOperationException, as the generic's does.
Constructors
PiecewiseLogMixedLinearCubicSpreadDiscount(YieldTermStructure, IEnumerable<BootstrapHelper<YieldTermStructure>>, EvaluationContext, LogMixedLinearCubic, IterativeBootstrap)
Initializes a new instance of the PiecewiseLogMixedLinearCubicSpreadDiscount class, and bootstraps it.
public PiecewiseLogMixedLinearCubicSpreadDiscount(YieldTermStructure baseCurve, IEnumerable<BootstrapHelper<YieldTermStructure>> instruments, EvaluationContext context, LogMixedLinearCubic i = default, IterativeBootstrap bootstrap = default)
Parameters
baseCurveYieldTermStructureThe base curve the spread is bootstrapped over.
instrumentsIEnumerable<BootstrapHelper<YieldTermStructure>>The helpers the curve is bootstrapped on.
contextEvaluationContextThe evaluation context the helpers are dated and priced in.
iLogMixedLinearCubicThe interpolator.
bootstrapIterativeBootstrapThe bootstrap.
Exceptions
- ArgumentNullException
baseCurve,instrumentsorcontextis null.- ArgumentException
A helper is null.
- NanoQLException
The bootstrap fails.
- InvalidOperationException
The interpolator is its zero value.