Class ConstantCPR
- Namespace
- NanoQL.Extensions.Instruments
- Assembly
- NanoQL.Extensions.dll
A prepayment model with one conditional prepayment rate at every date.
public sealed class ConstantCPR : IPrepayModel
- Inheritance
-
ConstantCPR
- Implements
- Inherited Members
Remarks
The SMM is the CPR's monthly equivalent, 1 − (1 − CPR)^(1/12) (SIFMA's Uniform Practices, Chapter SF, SF-5).
A CPR outside [0, 1] is refused: SIFMA defines the rate as the fraction of a pool's outstanding balance assumed to
prepay, so none outside it is one, where QLNet takes it and returns NaN above 1 and a negative SMM below 0.
Constructors
ConstantCPR(double)
Initializes a new instance of the ConstantCPR class.
public ConstantCPR(double cpr)
Parameters
cprdoubleThe conditional prepayment rate, an annual fraction: 0.06 for 6%.
Exceptions
- ArgumentOutOfRangeException
cprisn't in [0, 1].
Methods
GetCPR(Date)
The conditional prepayment rate at a date, an annual fraction of the outstanding balance.
public double GetCPR(Date valDate)
Parameters
valDateDateThe date.
Returns
- double
The rate, a fraction in [0, 1].
GetSMM(Date)
The single monthly mortality at a date, the monthly equivalent of GetCPR(Date).
public double GetSMM(Date valDate)
Parameters
valDateDateThe date.
Returns
- double
The rate, a fraction in [0, 1].