Table of Contents

Class GlobalPiecewiseLinearForward

Namespace
NanoQL.TermStructures
Assembly
NanoQL.dll

A piecewise linear forward-rate curve bootstrapped globally: QuantLib-Python's GlobalPiecewiseLinearForward, the PiecewiseYieldCurve<TTraits, TInterpolator, TBootstrap> on ForwardRate, Linear and GlobalBootstrap.

public sealed class GlobalPiecewiseLinearForward : PiecewiseYieldCurve<ForwardRate, Linear, GlobalBootstrap>, IInterpolatedCurve<ForwardRate, Linear>
Inheritance
GlobalPiecewiseLinearForward
Implements
Inherited Members
Extension Methods

Remarks

A convenience: nanoql's own code uses the generic class.

Constructors

GlobalPiecewiseLinearForward(Date, IEnumerable<BootstrapHelper<YieldTermStructure>>, DayCounter, EvaluationContext, IEnumerable<double>?, IEnumerable<Date>?, Linear, GlobalBootstrap)

Initializes a new instance of the GlobalPiecewiseLinearForward class with a fixed reference date, and bootstraps it.

public GlobalPiecewiseLinearForward(Date referenceDate, IEnumerable<BootstrapHelper<YieldTermStructure>> instruments, DayCounter dayCounter, EvaluationContext context, IEnumerable<double>? jumps = null, IEnumerable<Date>? jumpDates = null, Linear i = default, GlobalBootstrap bootstrap = default)

Parameters

referenceDate Date

The reference date.

instruments IEnumerable<BootstrapHelper<YieldTermStructure>>

The helpers the curve is bootstrapped on.

dayCounter DayCounter

The day counter.

context EvaluationContext

The evaluation context the helpers are dated and priced in.

jumps IEnumerable<double>

The discount-factor jumps, or null for none.

jumpDates IEnumerable<Date>

The jumps' dates, or null for 31 December of successive years.

i Linear

The interpolator.

bootstrap GlobalBootstrap

The bootstrap.

Exceptions

ArgumentNullException

context, instruments or dayCounter is null.

ArgumentException

A helper is null, the reference date is default(Date), or the jumps and their dates differ in number.

NanoQLException

The bootstrap fails.

Methods

Create(int, Calendar, IEnumerable<BootstrapHelper<YieldTermStructure>>, DayCounter, EvaluationContext, IEnumerable<double>?, IEnumerable<Date>?, Linear, GlobalBootstrap)

A curve with a reference date that is the evaluation date advanced by settlement days on a calendar: QuantLib's constructors taking settlement days, whose reference date moves with the evaluation date. The curve is built for the context's evaluation date.

public static GlobalPiecewiseLinearForward Create(int settlementDays, Calendar calendar, IEnumerable<BootstrapHelper<YieldTermStructure>> instruments, DayCounter dayCounter, EvaluationContext context, IEnumerable<double>? jumps = null, IEnumerable<Date>? jumpDates = null, Linear i = default, GlobalBootstrap bootstrap = default)

Parameters

settlementDays int

The settlement days.

calendar Calendar

The calendar the settlement days are counted on.

instruments IEnumerable<BootstrapHelper<YieldTermStructure>>

The helpers the curve is bootstrapped on.

dayCounter DayCounter

The day counter.

context EvaluationContext

The evaluation context.

jumps IEnumerable<double>

The discount-factor jumps, or null for none.

jumpDates IEnumerable<Date>

The jumps' dates, or null for 31 December of successive years.

i Linear

The interpolator.

bootstrap GlobalBootstrap

The bootstrap.

Returns

GlobalPiecewiseLinearForward

The bootstrapped curve.

Exceptions

ArgumentNullException

context, calendar, instruments or dayCounter is null.

ArgumentOutOfRangeException

settlementDays is negative.

ArgumentException

A helper is null, or the jumps and their dates differ in number.

NanoQLException

The bootstrap fails.