Class IsdaHomogenousCdsIndexTradePricer
- java.lang.Object
-
- com.opengamma.strata.pricer.credit.IsdaHomogenousCdsIndexTradePricer
-
public class IsdaHomogenousCdsIndexTradePricer extends Object
Pricer for CDS portfolio index trade based on ISDA standard model.The underlying CDS index product is priced as a single name CDS using a single credit curve rather than credit curves of constituent single names.
-
-
Field Summary
Fields Modifier and Type Field Description static IsdaHomogenousCdsIndexTradePricer
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description IsdaHomogenousCdsIndexTradePricer()
The default constructor.IsdaHomogenousCdsIndexTradePricer(AccrualOnDefaultFormula formula)
The constructor with the accrual-on-default formula specified.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CurrencyAmount
expectedLoss(ResolvedCdsIndexTrade 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(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Calculates the jump-to-default of the underlying product.double
parSpread(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Calculates the par spread of the underlying product.PointSensitivities
parSpreadSensitivity(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Calculates the par spread sensitivity of the underling product.CurrencyAmount
presentValue(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
Calculates the present value of the trade.CurrencyAmount
presentValueOnSettle(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
Calculates the present value of the underlying product.PointSensitivities
presentValueOnSettleSensitivity(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Calculates the present value sensitivity of the underlying product.PointSensitivities
presentValueSensitivity(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Calculates the present value sensitivity of the trade.double
price(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
Calculates the price of the underlying product, which is the present value per unit notional.PointSensitivities
priceSensitivity(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Calculates the price sensitivity of the underlying product.CurrencyAmount
recovery01OnSettle(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Calculates the recovery01 of the underlying product.CurrencyAmount
rpv01OnSettle(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
Calculates the risky PV01 of the underlying product.
-
-
-
Field Detail
-
DEFAULT
public static final IsdaHomogenousCdsIndexTradePricer DEFAULT
Default implementation.
-
-
Constructor Detail
-
IsdaHomogenousCdsIndexTradePricer
public IsdaHomogenousCdsIndexTradePricer()
The default constructor.The default pricers are used.
-
IsdaHomogenousCdsIndexTradePricer
public IsdaHomogenousCdsIndexTradePricer(AccrualOnDefaultFormula formula)
The constructor with the accrual-on-default formula specified.- Parameters:
formula
- the accrual-on-default formula
-
-
Method Detail
-
getAccrualOnDefaultFormula
public AccrualOnDefaultFormula getAccrualOnDefaultFormula()
Gets the accrual-on-default formula used in this pricer.- Returns:
- the formula
-
price
public double price(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
Calculates the price of the underlying product, which is the present value per unit notional.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(ResolvedCdsIndexTrade, CreditRatesProvider, PriceType, ReferenceData)
.- Parameters:
trade
- the traderatesProvider
- the rates providerpriceType
- the price typerefData
- the reference data- Returns:
- the price
-
priceSensitivity
public PointSensitivities priceSensitivity(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Calculates the price sensitivity of the underlying product.The price sensitivity of the product is the sensitivity of price to the underlying curves.
- Parameters:
trade
- the traderatesProvider
- the rates providerrefData
- the reference data- Returns:
- the present value sensitivity
-
parSpread
public double parSpread(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Calculates the par spread of the underlying product.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(ResolvedCdsIndexTrade, CreditRatesProvider, PriceType, ReferenceData)
.- Parameters:
trade
- the traderatesProvider
- the rates providerrefData
- the reference data- Returns:
- the par spread
-
parSpreadSensitivity
public PointSensitivities parSpreadSensitivity(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Calculates the par spread sensitivity of the underling product.The par spread sensitivity of the product is the sensitivity of par spread to the underlying curves.
- Parameters:
trade
- the traderatesProvider
- the rates providerrefData
- the reference data- Returns:
- the present value sensitivity
-
presentValue
public CurrencyAmount presentValue(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
Calculates the present value of the trade.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.- Parameters:
trade
- the traderatesProvider
- the rates providerpriceType
- the price typerefData
- the reference data- Returns:
- the price
-
presentValueSensitivity
public PointSensitivities presentValueSensitivity(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Calculates the present value sensitivity of the trade.The present value sensitivity of the trade is the sensitivity of present value to the underlying curves.
- Parameters:
trade
- the traderatesProvider
- the rates providerrefData
- the reference data- Returns:
- the present value sensitivity
-
presentValueOnSettle
public CurrencyAmount presentValueOnSettle(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
Calculates the present value of the underlying product.The present value is computed based on the settlement date rather than 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.- Parameters:
trade
- the traderatesProvider
- the rates providerpriceType
- the price typerefData
- the reference data- Returns:
- the price
-
presentValueOnSettleSensitivity
public PointSensitivities presentValueOnSettleSensitivity(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Calculates the present value sensitivity of the underlying product.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(ResolvedCdsIndexTrade, CreditRatesProvider, PriceType, ReferenceData)
.- Parameters:
trade
- the traderatesProvider
- the rates providerrefData
- the reference data- Returns:
- the present value sensitivity
-
rpv01OnSettle
public CurrencyAmount rpv01OnSettle(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
Calculates the risky PV01 of the underlying product.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.
- Parameters:
trade
- the traderatesProvider
- the rates providerpriceType
- the price typerefData
- the reference date- Returns:
- the RPV01
-
recovery01OnSettle
public CurrencyAmount recovery01OnSettle(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Calculates the recovery01 of the underlying product.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.
- Parameters:
trade
- the traderatesProvider
- the rates providerrefData
- the reference data- Returns:
- the recovery01
-
jumpToDefault
public JumpToDefault jumpToDefault(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Calculates the jump-to-default of the underlying product.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.
- Parameters:
trade
- the traderatesProvider
- the rates providerrefData
- the reference data- Returns:
- the recovery01
-
expectedLoss
public CurrencyAmount expectedLoss(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider)
Calculates the expected loss of the underlying product.The expected loss is the (undiscounted) expected default settlement value paid by the protection seller. The resulting value is always positive.
- Parameters:
trade
- the traderatesProvider
- the rates provider- Returns:
- the recovery01
-
-