Class PseudoRootFacade
A market model given by its pseudo-roots, one per rate time but the last: its evolution the rate times', its initial rates and displacements given; the coterminal swap market model a caplet calibration builds.
public sealed class PseudoRootFacade : MarketModel
- Inheritance
-
PseudoRootFacade
- Inherited Members
Remarks
Immutable: it copies the pseudo-roots given, and a read returns a copy. No pseudo-roots, where QuantLib reads the first of none, are refused.
Constructors
PseudoRootFacade(CTSMMCapletCalibration, CTSMMCapletCalibrationResults)
Initializes a new instance of the PseudoRootFacade class from a calibration's results.
public PseudoRootFacade(CTSMMCapletCalibration calibration, CTSMMCapletCalibrationResults results)
Parameters
calibrationCTSMMCapletCalibrationThe calibration: its curve state's coterminal swap rates and its displacements.
resultsCTSMMCapletCalibrationResultsThe calibration's results: its swap rates' pseudo-roots.
Exceptions
- ArgumentException
The results' pseudo-roots don't fit the calibration's rates.
PseudoRootFacade(IReadOnlyList<Matrix>, ReadOnlySpan<double>, ReadOnlySpan<double>, ReadOnlySpan<double>)
Initializes a new instance of the PseudoRootFacade class.
public PseudoRootFacade(IReadOnlyList<Matrix> covariancePseudoRoots, ReadOnlySpan<double> rateTimes, ReadOnlySpan<double> initialRates, ReadOnlySpan<double> displacements)
Parameters
covariancePseudoRootsIReadOnlyList<Matrix>Each step's pseudo-root, one per rate, of the same factors; copied.
rateTimesReadOnlySpan<double>The rate times, at least two and increasing.
initialRatesReadOnlySpan<double>The initial rates.
displacementsReadOnlySpan<double>The displacements, one per rate.
Exceptions
- ArgumentException
There are no pseudo-roots, the rate times are fewer than two or not increasing, or the pseudo-roots, rates and displacements don't fit.
Properties
Displacements
Gets the rates' displacements.
public override ImmutableArray<double> Displacements { get; }
Property Value
Evolution
Gets the evolution the model is built on.
public override EvolutionDescription Evolution { get; }
Property Value
InitialRates
Gets the rates at time zero.
public override ImmutableArray<double> InitialRates { get; }
Property Value
NumberOfFactors
Gets the number of factors.
public override int NumberOfFactors { get; }
Property Value
NumberOfRates
Gets the number of rates.
public override int NumberOfRates { get; }
Property Value
NumberOfSteps
Gets the number of evolution steps.
public override int NumberOfSteps { get; }
Property Value
Methods
PseudoRoot(int)
The pseudo-square root of the i-th step's covariance, rates by factors.
public override Matrix PseudoRoot(int i)
Parameters
iintThe step, below the number of steps.
Returns
- Matrix
A copy of the step's pseudo-root.
Exceptions
- ArgumentOutOfRangeException
iisn't a step.