Main Content

survprobs

Compute survival probability based on default probability curve

Description

example

outSurvProbs = survprobs(obj,inDates) computes the survival probability based on the default probability curve object.

Examples

collapse all

Create a defprobcurve object using defprobcurve and then use survprobs to calculate the survival probability.

Settle = datetime(2017,9,20);
DefProbTimes = [calmonths(6) calyears([1 2 3 4 5 7 10 20 30])];
DefaultProbabilities = [0.005 0.007 0.01 0.015 0.026 0.04 0.077 0.093 0.15 0.20]';
DefProbDates = Settle + DefProbTimes;
 
DefaultProbCurve = defprobcurve(Settle,DefProbDates,DefaultProbabilities,'Basis',5)
DefaultProbCurve = 
  defprobcurve with properties:

                  Settle: 20-Sep-2017
                   Basis: 5
                   Dates: [10x1 datetime]
    DefaultProbabilities: [10x1 double]

SurvProbTimes = [calmonths([6 12 18])];
SurvProbDates = Settle + SurvProbTimes;
outSurvProb = survprobs(DefaultProbCurve, SurvProbDates)
outSurvProb = 3×1

    0.9950
    0.9930
    0.9915

Input Arguments

collapse all

defprobcurve object, specified as a previously created defprobcurve object.

Data Types: object

Survival probability dates, specified as a vector using a datetime array, string array, or date character vectors.

To support existing code, survprobs also accepts serial date numbers as inputs, but they are not recommended.

Output Arguments

collapse all

Survival probability, returned as a numeric.

Version History

Introduced in R2020a

expand all