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
referenceDateDateThe reference date.
instrumentsIEnumerable<BootstrapHelper<YieldTermStructure>>The helpers the curve is bootstrapped on.
dayCounterDayCounterThe day counter.
contextEvaluationContextThe evaluation context the helpers are dated and priced in.
jumpsIEnumerable<double>The discount-factor jumps, or null for none.
jumpDatesIEnumerable<Date>The jumps' dates, or null for 31 December of successive years.
iLinearThe interpolator.
bootstrapGlobalBootstrapThe bootstrap.
Exceptions
- ArgumentNullException
context,instrumentsordayCounteris 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
settlementDaysintThe settlement days.
calendarCalendarThe calendar the settlement days are counted on.
instrumentsIEnumerable<BootstrapHelper<YieldTermStructure>>The helpers the curve is bootstrapped on.
dayCounterDayCounterThe day counter.
contextEvaluationContextThe evaluation context.
jumpsIEnumerable<double>The discount-factor jumps, or null for none.
jumpDatesIEnumerable<Date>The jumps' dates, or null for 31 December of successive years.
iLinearThe interpolator.
bootstrapGlobalBootstrapThe bootstrap.
Returns
- GlobalPiecewiseLinearForward
The bootstrapped curve.
Exceptions
- ArgumentNullException
context,calendar,instrumentsordayCounteris null.- ArgumentOutOfRangeException
settlementDaysis negative.- ArgumentException
A helper is null, or the jumps and their dates differ in number.
- NanoQLException
The bootstrap fails.