Creates a credit default curve from an array of default probabilities.
This curve will interpolate on the DEFAULT PROBABILITIES.
This curve should be used in order to retrieve risky discount factors.
The curve itself can take the place of a YieldCurve object, however the forward rates, discount factors and zero rates are regarded as risky forward rates, discount factors and zero rates.
Can also be used to price market instruments, deposits, futures, FRAs, CMS and Swap rates.
This function requires the input of a IndexKey template object key, which must have been produced via a call to
CreateDepoTemplate(). This function would have returned a string 'KEY' which is to be passed to the 'DepoIndex' parameter of this function.
This function requires the input of a SWAP IndexKey template object key, which must have been produced via a call to
CreateSwapTemplate(). This function would have returned a string 'KEY' which is to be passed to the 'Swap Index' parameter of this function.
This function requires the input of a Calendar object key, which must have been produced via a call to one of the Calendar creation functions present within the
CapeTools Calendars category of functions.
These functions would have returned a string 'KEY' which is to be passed to the 'Cal' parameter of this function.
For the 'DayCount' and 'BusDayConv' parameters, please refer to the large number of enumeration functions present within the
CapeTools Enums category of functions.
The
CapeTools Enums category of functions return correct string codes that can be passed to parameters taking fixed string values defined by the library (ie - DayCount codes, frequency codes, currency codes, compounding codes, business day convention codes etc...).
You can thus execute these enumeration functions which return the proper code, instead of trying to remember the string code needed or making spelling mistakes which can be difficult to debug.
It is advisable to populate the credit curve with values past the end point of the deals you will be pricing.
This function creates an object and returns a string-key value to represent this created object.
The TAG value of the string-key returned (second part of the key) is : "MCPC_LP"
- Key parameter
Key value to use as a handle for the created object
- Reload parameter
When creating this object for the first time, set this parameter to a positive value. Within Excel, when re-computing a worksheet where you do not wish to recreate the object, set this parameter to zero (0).
- CurveName parameter
A tag used to identify this curve (case insensitive) if placed within either a CreditCurve or a Yieldcurve collection ( via the
GroupedCDSCurves() or
GroupedCurves() functions ). If you pass in an empty string, it will default to the name of the 'Key' parameter.
- oTenorsVals parameter
A 2 column range of Tenors (or Dates) and default probabilities.
- probType parameter
The type of probability curve that is entered (will also be used for the underlying interpolation methodology). Valid values are 'Hazard' (for Hazard rates) or 'Density' (for default probability density).
- InterpMethod parameter
Interpolation methodology to utilise when interpolating the probability curve. Possible values are : 'BackStep', (for a flat interpolation in the backwards direction), 'ForwardStep', (for a flat interpolation in the forwards direction), 'Linear', 'LogLinear' or 'Cubic' (for Cubic-Spline).
- DayCount parameter
DayCounter to use
- Cal parameter
Calendar to use for the adjustment of dates that lands on a holiday or weekend, if you use the
EmptyCalendar() function, no adjustments will be made
- BusDayConv parameter
Business Day Convention. treatment of date adjustments
- YCKey parameter
Key to an already constructed YieldCurve object. This curve should represent the risk-free curve.
- Extrapolate parameter
Whether the default probability Curve data should be extrapolated if a calculation request that uses a date that is beyond the end date of the Curve (ie - a request for an 40 year probability, but the curve is only built up to 30 years.) If false an error will be returned. This setting is set globally for the whole curve. It is advisable to populate the credit curve with values past the end point of the deals you will be pricing.
The C# example below contains all the sub-function calls leading up to this function call. As a result, the example can contain a lot of code.
The VB.NET, J#, C++.NET, Java, Excel VBA, Visual Basic 6 (via COM) and C++ examples below contain function code stubs for the calls leading up to this function call. However, the function call for this function is displayed.
You can easily reproduce the stub functions code from the
C# example.
Copyright (c) 2003-2007 CapeTools - All Rights Reserved.