Class SurvivalProbabilityStructure
- Namespace
- NanoQL.TermStructures
- Assembly
- NanoQL.dll
The survival-probability term structure: an adapter that lets a derived curve implement the survival probability, from which the default densities and hazard rates follow.
public abstract class SurvivalProbabilityStructure : DefaultProbabilityTermStructure
- Inheritance
-
SurvivalProbabilityStructure
- Derived
- Inherited Members
- Extension Methods
Remarks
An extension point.
Constructors
SurvivalProbabilityStructure(Date, Calendar?, DayCounter, int?, IEnumerable<double>?, IEnumerable<Date>?)
Initializes a new instance of the SurvivalProbabilityStructure class with a fixed reference date.
protected SurvivalProbabilityStructure(Date referenceDate, Calendar? cal, DayCounter dc, int? settlementDays = null, IEnumerable<double>? jumps = null, IEnumerable<Date>? jumpDates = null)
Parameters
referenceDateDateThe reference date.
calCalendarThe calendar, if any.
dcDayCounterThe day counter.
settlementDaysint?The settlement days the reference date was calculated with, if any.
jumpsIEnumerable<double>The survival-probability jumps; none when null.
jumpDatesIEnumerable<Date>The jumps' dates; at the turns of the years when null or empty.
Exceptions
- ArgumentNullException
dcis null.- ArgumentException
Jump dates are given and their number differs from the jumps', or one of them is
default(Date).
Methods
DefaultDensityImpl(double)
The default density at a time: minus the survival probability's derivative, by a central difference over 0.0001 either side (one-sided at 0). QuantLib warns that this numerical differentiation "might be inefficient and inaccurate"; derived curves may override it.
protected override double DefaultDensityImpl(double t)
Parameters
tdoubleThe time.
Returns
- double
The density.