Main Content

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 datetime, string, or date character vector.

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

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

Dates corresponding to DefaultProbabilities, specified as an NPOINTS-by-1 vector using a datetime array, string array, or date character vectors.

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

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

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

Data Types: double

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

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]

Version History

Introduced in R2020a

expand all