Table of Contents

Class PiecewiseSpreadYieldCurve<TInterpolator, TBootstrap>

Namespace
NanoQL.TermStructures
Assembly
NanoQL.dll

A spread curve bootstrapped on rate helpers over a base curve: its nodes are discount factors whose product with the base's discount reprices each helper.

public class PiecewiseSpreadYieldCurve<TInterpolator, TBootstrap> : PiecewiseYieldCurve<Discount, TInterpolator, TBootstrap>, IInterpolatedCurve<Discount, TInterpolator> where TInterpolator : struct, IInterpolator where TBootstrap : struct, IBootstrap

Type Parameters

TInterpolator

The interpolator of the spread discount factors.

TBootstrap

The bootstrap (IterativeBootstrap, GlobalBootstrap).

Inheritance
PiecewiseYieldCurve<Discount, TInterpolator, TBootstrap>
PiecewiseSpreadYieldCurve<TInterpolator, TBootstrap>
Implements
Derived
Inherited Members
Extension Methods

Remarks

QuantLib's curve is PiecewiseYieldCurve<SpreadTraits<Discount>, I, B>, deriving from the spread discount curve its traits name; SpreadTraits<Discount> is Discount with that curve type, its guesses, bounds and iteration counts Discount's. So this curve is the piecewise discount curve on a base: its discount is the base's times the interpolated spread discount, and its maximum date the earlier of its own and the base's (see PiecewiseYieldCurve<TTraits, TInterpolator, TBootstrap>); its reference date, calendar, settlement days, day counter and extrapolation flag are the base's, read when it is built. It adds QuantLib's constructor and BaseCurve only.

QuantLib's spread discount curve reads the base without extrapolation (spreaddiscountcurve.hpp:157), so a bootstrap or a read past a base that doesn't extrapolate throws where the zero- and forward-spreaded curves extrapolate; here the base is read with extrapolation on, as theirs is. A documented divergence.

Constructors

PiecewiseSpreadYieldCurve(YieldTermStructure, IEnumerable<BootstrapHelper<YieldTermStructure>>, EvaluationContext, TInterpolator, TBootstrap)

Initializes a new instance of the PiecewiseSpreadYieldCurve<TInterpolator, TBootstrap> class, and bootstraps it.

public PiecewiseSpreadYieldCurve(YieldTermStructure baseCurve, IEnumerable<BootstrapHelper<YieldTermStructure>> instruments, EvaluationContext context, TInterpolator i = default, TBootstrap bootstrap = default)

Parameters

baseCurve YieldTermStructure

The base curve the spread is bootstrapped over.

instruments IEnumerable<BootstrapHelper<YieldTermStructure>>

The helpers the curve is bootstrapped on.

context EvaluationContext

The evaluation context the helpers are dated and priced in.

i TInterpolator

The interpolator.

bootstrap TBootstrap

The bootstrap.

Exceptions

ArgumentNullException

baseCurve, instruments or context is null.

ArgumentException

A helper is null.

NanoQLException

The bootstrap fails.

Properties

BaseCurve

Gets the base curve the spread is bootstrapped over.

public YieldTermStructure BaseCurve { get; }

Property Value

YieldTermStructure