public class IsdaCdsTradePricer extends Object
The implementation is based on the ISDA model versions 1.8.2.
| Modifier and Type | Field and Description |
|---|---|
static IsdaCdsTradePricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
IsdaCdsTradePricer()
The default constructor.
|
IsdaCdsTradePricer(AccrualOnDefaultFormula formula)
The constructor with the accrual-on-default formula specified.
|
| Modifier and Type | Method and Description |
|---|---|
CurrencyAmount |
expectedLoss(ResolvedCdsTrade trade,
CreditRatesProvider ratesProvider)
Calculates the expected loss of the underlying product.
|
AccrualOnDefaultFormula |
getAccrualOnDefaultFormula()
Gets the accrual-on-default formula used in this pricer.
|
JumpToDefault |
jumpToDefault(ResolvedCdsTrade trade,
CreditRatesProvider ratesProvider,
ReferenceData refData)
Calculates the jump-to-default of the underlying product.
|
double |
parSpread(ResolvedCdsTrade trade,
CreditRatesProvider ratesProvider,
ReferenceData refData)
Calculates the par spread of the underlying product.
|
PointSensitivities |
parSpreadSensitivity(ResolvedCdsTrade trade,
CreditRatesProvider ratesProvider,
ReferenceData refData)
Calculates the par spread sensitivity of the underling product.
|
CurrencyAmount |
presentValue(ResolvedCdsTrade trade,
CreditRatesProvider ratesProvider,
PriceType priceType,
ReferenceData refData)
Calculates the present value of the trade.
|
CurrencyAmount |
presentValueOnSettle(ResolvedCdsTrade trade,
CreditRatesProvider ratesProvider,
PriceType priceType,
ReferenceData refData)
Calculates the present value of the underlying product.
|
PointSensitivities |
presentValueOnSettleSensitivity(ResolvedCdsTrade trade,
CreditRatesProvider ratesProvider,
ReferenceData refData)
Calculates the present value sensitivity of the underlying product.
|
PointSensitivities |
presentValueSensitivity(ResolvedCdsTrade trade,
CreditRatesProvider ratesProvider,
ReferenceData refData)
Calculates the present value sensitivity of the trade.
|
double |
price(ResolvedCdsTrade trade,
CreditRatesProvider ratesProvider,
PriceType priceType,
ReferenceData refData)
Calculates the price of the underlying product, which is the present value per unit notional.
|
PointSensitivities |
priceSensitivity(ResolvedCdsTrade trade,
CreditRatesProvider ratesProvider,
ReferenceData refData)
Calculates the price sensitivity of the underlying product.
|
CurrencyAmount |
recovery01OnSettle(ResolvedCdsTrade trade,
CreditRatesProvider ratesProvider,
ReferenceData refData)
Calculates the recovery01 of the underlying product.
|
CurrencyAmount |
rpv01OnSettle(ResolvedCdsTrade trade,
CreditRatesProvider ratesProvider,
PriceType priceType,
ReferenceData refData)
Calculates the risky PV01 of the underlying product.
|
public static final IsdaCdsTradePricer DEFAULT
public IsdaCdsTradePricer()
The default pricers are used.
public IsdaCdsTradePricer(AccrualOnDefaultFormula formula)
formula - the accrual-on-default formulapublic AccrualOnDefaultFormula getAccrualOnDefaultFormula()
public double price(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider, 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.
This is coherent to presentValueOnSettle(ResolvedCdsTrade, CreditRatesProvider, PriceType, ReferenceData).
trade - the traderatesProvider - the rates providerpriceType - the price typerefData - the reference datapublic PointSensitivities priceSensitivity(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
The price sensitivity of the product is the sensitivity of price to the underlying curves.
trade - the traderatesProvider - the rates providerrefData - the reference datapublic double parSpread(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
The par spread is a coupon rate such that the clean price is 0. The result is represented in decimal form.
This is coherent to price(ResolvedCdsTrade, CreditRatesProvider, PriceType, ReferenceData).
trade - the traderatesProvider - the rates providerrefData - the reference datapublic PointSensitivities parSpreadSensitivity(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
The par spread sensitivity of the product is the sensitivity of par spread to the underlying curves.
trade - the traderatesProvider - the rates providerrefData - the reference datapublic CurrencyAmount presentValue(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
The present value of the product is based on the valuation date.
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.
trade - the traderatesProvider - the rates providerpriceType - the price typerefData - the reference datapublic PointSensitivities presentValueSensitivity(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
The present value sensitivity of the trade is the sensitivity of present value to the underlying curves.
trade - the traderatesProvider - the rates providerrefData - the reference datapublic CurrencyAmount presentValueOnSettle(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
The present value is computed based on the settlement date rather than the valuation date.
trade - the traderatesProvider - the rates providerpriceType - the price typerefData - the reference datapublic PointSensitivities presentValueOnSettleSensitivity(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
The present value sensitivity of the product is the sensitivity of present value to the underlying curves. The present value sensitivity is computed based on the settlement date rather than the valuation date.
This is coherent to presentValueOnSettle(ResolvedCdsTrade, CreditRatesProvider, PriceType, ReferenceData).
trade - the traderatesProvider - the rates providerrefData - the reference datapublic CurrencyAmount rpv01OnSettle(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
RPV01 is defined as minus of the present value sensitivity to coupon rate.
This is computed based on the settlement date rather than the valuation date.
trade - the traderatesProvider - the rates providerpriceType - the price typerefData - the reference datepublic CurrencyAmount recovery01OnSettle(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider, 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, one currency amount is returned by this method.
This is computed based on the settlement date rather than the valuation date.
trade - the traderatesProvider - the rates providerrefData - the reference datapublic JumpToDefault jumpToDefault(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
The jump-to-default is the value of the product in case of immediate default.
trade - the traderatesProvider - the rates providerrefData - the reference datapublic CurrencyAmount expectedLoss(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider)
The expected loss is the (undiscounted) expected default settlement value paid by the protection seller. The resulting value is always positive.
trade - the traderatesProvider - the rates providerCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.