Class IsdaCompliantCreditCurveCalibrator
- java.lang.Object
-
- com.opengamma.strata.pricer.credit.IsdaCompliantCreditCurveCalibrator
-
- Direct Known Subclasses:
FastCreditCurveCalibrator
,SimpleCreditCurveCalibrator
public abstract class IsdaCompliantCreditCurveCalibrator extends Object
ISDA compliant credit curve calibrator.A single credit curve is calibrated for credit default swaps on a legal entity.
The curve is defined using one or more nodes. Each node primarily defines enough information to produce a reference CDS trade. All of the curve nodes must be based on a common legal entity and currency.
Calibration involves pricing, and re-pricing, these trades to find the best fit using a root finder. Relevant discount curve and recovery rate curve are required to complete the calibration.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
IsdaCompliantCreditCurveCalibrator()
protected
IsdaCompliantCreditCurveCalibrator(AccrualOnDefaultFormula formula)
protected
IsdaCompliantCreditCurveCalibrator(AccrualOnDefaultFormula formula, ArbitrageHandling arbHandling)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description LegalEntitySurvivalProbabilities
calibrate(IsdaCreditCurveDefinition curveDefinition, MarketData marketData, ImmutableCreditRatesProvider ratesProvider, ReferenceData refData)
Calibrates the ISDA compliant credit curve to the market data.abstract NodalCurve
calibrate(List<ResolvedCdsTrade> calibrationCDSs, DoubleArray flactionalSpreads, DoubleArray pointsUpfront, CurveName name, LocalDate valuationDate, CreditDiscountFactors discountFactors, RecoveryRates recoveryRates, ReferenceData refData)
Calibrate the ISDA compliant credit curve to points upfront and fractional spread.protected AccrualOnDefaultFormula
getAccrualOnDefaultFormula()
Obtains the accrual-on-default formula.protected ArbitrageHandling
getArbitrageHandling()
Obtains the arbitrage handling.protected IsdaCdsTradePricer
getTradePricer()
Obtains the trade pricer used in this calibration.
-
-
-
Constructor Detail
-
IsdaCompliantCreditCurveCalibrator
protected IsdaCompliantCreditCurveCalibrator()
-
IsdaCompliantCreditCurveCalibrator
protected IsdaCompliantCreditCurveCalibrator(AccrualOnDefaultFormula formula)
-
IsdaCompliantCreditCurveCalibrator
protected IsdaCompliantCreditCurveCalibrator(AccrualOnDefaultFormula formula, ArbitrageHandling arbHandling)
-
-
Method Detail
-
getArbitrageHandling
protected ArbitrageHandling getArbitrageHandling()
Obtains the arbitrage handling.See
ArbitrageHandling
for detail.- Returns:
- the arbitrage handling
-
getAccrualOnDefaultFormula
protected AccrualOnDefaultFormula getAccrualOnDefaultFormula()
Obtains the accrual-on-default formula.See
AccrualOnDefaultFormula
for detail.- Returns:
- the formula
-
getTradePricer
protected IsdaCdsTradePricer getTradePricer()
Obtains the trade pricer used in this calibration.- Returns:
- the trade pricer
-
calibrate
public LegalEntitySurvivalProbabilities calibrate(IsdaCreditCurveDefinition curveDefinition, MarketData marketData, ImmutableCreditRatesProvider ratesProvider, ReferenceData refData)
Calibrates the ISDA compliant credit curve to the market data.This creates the single credit curve for a legal entity. The curve nodes in
IsdaCreditCurveDefinition
should be single-name credit default swaps on this legal entity.The relevant discount curve and recovery rate curve must be stored in
ratesProvider
. The day count convention for the resulting credit curve is the same as that of the discount curve.- Parameters:
curveDefinition
- the curve definitionmarketData
- the market dataratesProvider
- the rates providerrefData
- the reference data- Returns:
- the ISDA compliant credit curve
-
calibrate
public abstract NodalCurve calibrate(List<ResolvedCdsTrade> calibrationCDSs, DoubleArray flactionalSpreads, DoubleArray pointsUpfront, CurveName name, LocalDate valuationDate, CreditDiscountFactors discountFactors, RecoveryRates recoveryRates, ReferenceData refData)
Calibrate the ISDA compliant credit curve to points upfront and fractional spread.- Parameters:
calibrationCDSs
- the calibration CDSflactionalSpreads
- the fractional spreadspointsUpfront
- the points upfront valuesname
- the curve namevaluationDate
- the valuation datediscountFactors
- the discount factorsrecoveryRates
- the recovery ratesrefData
- the reference data- Returns:
- the ISDA compliant credit curve
-
-