public class IsdaHomogenousCdsIndexProductPricer extends Object
The CDS index is priced as a single name CDS using a single credit curve rather than credit curves of constituent single names.
CreditRatesProvider must contain the index credit curve as well as
the information on the relevant recovery rate and index factor.
This pricer invokes the implementation in IsdaCdsProductPricer.
| Modifier and Type | Field and Description |
|---|---|
static IsdaHomogenousCdsIndexProductPricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
IsdaHomogenousCdsIndexProductPricer(AccrualOnDefaultFormula formula)
Constructor specifying the formula to use for the accrued on default calculation.
|
| Modifier and Type | Method and Description |
|---|---|
CurrencyAmount |
expectedLoss(ResolvedCdsIndex cdsIndex,
CreditRatesProvider ratesProvider)
Calculates the expected loss of the CDS index product.
|
AccrualOnDefaultFormula |
getAccrualOnDefaultFormula()
Gets the accrual-on-default formula used in this pricer.
|
JumpToDefault |
jumpToDefault(ResolvedCdsIndex cdsIndex,
CreditRatesProvider ratesProvider,
LocalDate referenceDate,
ReferenceData refData)
Calculates the jump-to-default of the CDS index product.
|
double |
parSpread(ResolvedCdsIndex cdsIndex,
CreditRatesProvider ratesProvider,
LocalDate referenceDate,
ReferenceData refData)
Calculates the par spread of the CDS index product.
|
PointSensitivityBuilder |
parSpreadSensitivity(ResolvedCdsIndex cdsIndex,
CreditRatesProvider ratesProvider,
LocalDate referenceDate,
ReferenceData refData)
Calculates the par spread sensitivity of the product.
|
CurrencyAmount |
presentValue(ResolvedCdsIndex cdsIndex,
CreditRatesProvider ratesProvider,
LocalDate referenceDate,
PriceType priceType,
ReferenceData refData)
Calculates the present value of the CDS index product.
|
PointSensitivityBuilder |
presentValueSensitivity(ResolvedCdsIndex cdsIndex,
CreditRatesProvider ratesProvider,
LocalDate referenceDate,
ReferenceData refData)
Calculates the present value sensitivity of the product.
|
double |
price(ResolvedCdsIndex cdsIndex,
CreditRatesProvider ratesProvider,
LocalDate referenceDate,
PriceType priceType,
ReferenceData refData)
Calculates the price of the CDS index product, which is the minus of the present value per unit notional.
|
PointSensitivityBuilder |
priceSensitivity(ResolvedCdsIndex cdsIndex,
CreditRatesProvider ratesProvider,
LocalDate referenceDate,
ReferenceData refData)
Calculates the price sensitivity of the product.
|
CurrencyAmount |
recovery01(ResolvedCdsIndex cdsIndex,
CreditRatesProvider ratesProvider,
LocalDate referenceDate,
ReferenceData refData)
Calculates the recovery01 of the CDS index product.
|
double |
riskyAnnuity(ResolvedCdsIndex cdsIndex,
CreditRatesProvider ratesProvider,
LocalDate referenceDate,
PriceType priceType,
ReferenceData refData)
Calculates the risky annuity, which is RPV01 per unit notional.
|
PointSensitivityBuilder |
riskyAnnuitySensitivity(ResolvedCdsIndex cdsIndex,
CreditRatesProvider ratesProvider,
LocalDate referenceDate,
ReferenceData refData)
Calculates the risky annuity sensitivity of the product.
|
CurrencyAmount |
rpv01(ResolvedCdsIndex cdsIndex,
CreditRatesProvider ratesProvider,
LocalDate referenceDate,
PriceType priceType,
ReferenceData refData)
Calculates the risky PV01 of the CDS index product.
|
public static final IsdaHomogenousCdsIndexProductPricer DEFAULT
public IsdaHomogenousCdsIndexProductPricer(AccrualOnDefaultFormula formula)
formula - the formulapublic AccrualOnDefaultFormula getAccrualOnDefaultFormula()
public double price(ResolvedCdsIndex cdsIndex, CreditRatesProvider ratesProvider, LocalDate referenceDate, PriceType priceType, ReferenceData refData)
This method can calculate the clean or dirty price, see PriceType.
If calculating the clean price, the accrued interest is calculated based on the step-in date.
cdsIndex - the productratesProvider - the rates providerreferenceDate - the reference datepriceType - the price typerefData - the reference datapublic PointSensitivityBuilder priceSensitivity(ResolvedCdsIndex cdsIndex, CreditRatesProvider ratesProvider, LocalDate referenceDate, ReferenceData refData)
The price sensitivity of the product is the sensitivity of price to the underlying curves.
cdsIndex - the productratesProvider - the rates providerreferenceDate - the reference daterefData - the reference datapublic CurrencyAmount presentValue(ResolvedCdsIndex cdsIndex, CreditRatesProvider ratesProvider, LocalDate referenceDate, PriceType priceType, ReferenceData refData)
The present value of the product is based on referenceDate.
This is typically the valuation date, or cash settlement date if the product is associated with a Trade.
This method can calculate the clean or dirty present value, see PriceType.
If calculating the clean value, the accrued interest is calculated based on the step-in date.
cdsIndex - the productratesProvider - the rates providerreferenceDate - the reference datepriceType - the price typerefData - the reference datapublic PointSensitivityBuilder presentValueSensitivity(ResolvedCdsIndex cdsIndex, CreditRatesProvider ratesProvider, LocalDate referenceDate, ReferenceData refData)
The present value sensitivity of the product is the sensitivity of present value to the underlying curves.
cdsIndex - the productratesProvider - the rates providerreferenceDate - the reference daterefData - the reference datapublic double parSpread(ResolvedCdsIndex cdsIndex, CreditRatesProvider ratesProvider, LocalDate referenceDate, ReferenceData refData)
The par spread is a coupon rate such that the clean PV is 0. The result is represented in decimal form.
cdsIndex - the productratesProvider - the rates providerreferenceDate - the reference daterefData - the reference datapublic PointSensitivityBuilder parSpreadSensitivity(ResolvedCdsIndex cdsIndex, CreditRatesProvider ratesProvider, LocalDate referenceDate, ReferenceData refData)
The par spread sensitivity of the product is the sensitivity of par spread to the underlying curves. The resulting sensitivity is based on the currency of the CDS index product.
cdsIndex - the productratesProvider - the rates providerreferenceDate - the reference daterefData - the reference datapublic CurrencyAmount rpv01(ResolvedCdsIndex cdsIndex, CreditRatesProvider ratesProvider, LocalDate referenceDate, PriceType priceType, ReferenceData refData)
RPV01 is defined as minus of the present value sensitivity to coupon rate.
cdsIndex - the productratesProvider - the rates providerreferenceDate - the reference datepriceType - the price typerefData - the reference datepublic double riskyAnnuity(ResolvedCdsIndex cdsIndex, CreditRatesProvider ratesProvider, LocalDate referenceDate, PriceType priceType, ReferenceData refData)
Zero is returned if the CDS index already expired.
cdsIndex - the productratesProvider - the rates providerreferenceDate - the reference datepriceType - the price typerefData - the reference datapublic PointSensitivityBuilder riskyAnnuitySensitivity(ResolvedCdsIndex cdsIndex, CreditRatesProvider ratesProvider, LocalDate referenceDate, ReferenceData refData)
The risky annuity sensitivity of the product is the sensitivity of risky annuity to the underlying curves. The resulting sensitivity is based on the currency of the CDS index product.
Empty sensitivity is returned if the CDS index already expired.
cdsIndex - the productratesProvider - the rates providerreferenceDate - the reference daterefData - the reference datapublic CurrencyAmount recovery01(ResolvedCdsIndex cdsIndex, CreditRatesProvider ratesProvider, LocalDate referenceDate, ReferenceData refData)
The recovery01 is defined as the present value sensitivity to the recovery rate. Since the ISDA standard model requires the recovery rate to be constant throughout the lifetime of the CDS index, one currency amount is returned by this method.
cdsIndex - the productratesProvider - the rates providerreferenceDate - the reference daterefData - the reference datapublic JumpToDefault jumpToDefault(ResolvedCdsIndex cdsIndex, CreditRatesProvider ratesProvider, LocalDate referenceDate, ReferenceData refData)
The jump-to-default is the value of the product in case of immediate default of a constituent single name.
Under the homogeneous pool assumption, the jump-to-default values are the same for all of the undefaulted names, and zero for defaulted names. Thus the resulting object contains a single number.
cdsIndex - the productratesProvider - the rates providerreferenceDate - the reference daterefData - the reference datapublic CurrencyAmount expectedLoss(ResolvedCdsIndex cdsIndex, CreditRatesProvider ratesProvider)
The expected loss is the (undiscounted) expected default settlement value paid by the protection seller. The resulting value is always positive.
cdsIndex - the productratesProvider - the rates providerCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.