defprobcurve

Create defprobcurve object for credit instrument

Description

Create a defprobcurve object for a credit instrument.

After creating a defprobcurve object, you can use the associated functions survprobs, hazardrates, and defprobstrip.

To price a CDS instrument, you must create a defprobcurve object and then create a Credit pricer object.

For more information on the available instruments, models, and pricing methods, see Choose Instruments, Models, and Pricers.

Creation

Description

example

DefaultProbCurve = defprobcurve(Settle,ProbDates,DefaultProbabilities) creates a defprobcurve object.

example

DefaultProbCurve = defprobcurve(___,Name,Value) sets properties using name-value pairs and any of the arguments in the previous syntax. For example, DefaultProbCurve = defprobcurve(datetime(2017,1,30),[datetime(2018,1,30);datetime(2019,1,30)],[0.005 0.007],'Basis',2) creates a default probability curve object. You can specify multiple name-value pair arguments.

Input Arguments

expand all

Settle date for curve, specified as a scalar serial date number, date character vector, date string, or datetime.

If you use a date character vector or date string, the format must be recognizable by datetime because the Settle property is stored as a datetime.

Data Types: char | string | double | datetime

Dates corresponding to DefaultProbabilities, specified as an NPOINTS-by-1 vector of serial date numbers, cell array of date character vectors, string array, or datetime array.

If you use a date character vector or date string, the format must be recognizable by datetime because the ProbDates property is stored as a datetime.

Data Types: string | datetime | double | char | cell

Default probability data for the curve, specified as a numeric vector.

Data Types: double

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: defprobcurve = defprobcurve(datetime(2017,1,30),[datetime(2018,1,30);datetime(2019,1,30)],[0.005 0.007],'Basis',2)

Day-count basis, specified as the comma-separated pair consisting of 'Basis' and a scalar integer.

  • 0 — actual/actual

  • 1 — 30/360 (SIA)

  • 2 — actual/360

  • 3 — actual/365

  • 4 — 30/360 (PSA)

  • 5 — 30/360 (ISDA)

  • 6 — 30/360 (European)

  • 7 — actual/365 (Japanese)

  • 8 — actual/actual (ICMA)

  • 9 — actual/360 (ICMA)

  • 10 — actual/365 (ICMA)

  • 11 — 30/360E (ICMA)

  • 12 — actual/365 (ISDA)

  • 13 — BUS/252

For more information, see Basis.

Data Types: double

Properties

expand all

Settlement date, returned as a datetime.

Data Types: datetime

This property is read-only.

Day-count basis of the instrument, returned as a scalar integer.

Data Types: double

Dates corresponding to the rate data, returned as a datetime.

Data Types: datetime

Default probabilities for the curve, returned as a vector.

Data Types: double

Object Functions

survprobsCompute survival probability based on default probability curve
hazardratesCompute hazard rates based on default probability curve
defprobstripBootstrap defprobcurve object from market CDS instruments

Examples

collapse all

Create a defprobcurve object using defprobcurve.

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]';
ProbDates = Settle + DefProbTimes;

DefaultProbCurve = defprobcurve(Settle,ProbDates,DefaultProbabilities,'Basis',2)
DefaultProbCurve = 
  defprobcurve with properties:

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

Introduced in R2020a