Class FiniteDifferenceSpreadSensitivityCalculator
- java.lang.Object
-
- com.opengamma.strata.pricer.credit.SpreadSensitivityCalculator
-
- com.opengamma.strata.pricer.credit.FiniteDifferenceSpreadSensitivityCalculator
-
public class FiniteDifferenceSpreadSensitivityCalculator extends SpreadSensitivityCalculator
Finite difference spread sensitivity calculator.This computes the present value sensitivity to par spreads of bucketed CDSs by bump-and-reprice, i.e., finite difference method.
-
-
Field Summary
Fields Modifier and Type Field Description static FiniteDifferenceSpreadSensitivityCalculator
DEFAULT
Default implementation.
-
Constructor Summary
Constructors Constructor Description FiniteDifferenceSpreadSensitivityCalculator(AccrualOnDefaultFormula formula, double bumpAmount)
Constructor with accrual-on-default formula and bump amount specified.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CurrencyAmount
parallelCs01(ResolvedCdsTrade trade, List<ResolvedCdsTrade> bucketCds, CreditRatesProvider ratesProvider, ReferenceData refData)
Computes parallel CS01 for CDS.-
Methods inherited from class com.opengamma.strata.pricer.credit.SpreadSensitivityCalculator
bucketedCs01, bucketedCs01, bucketedCs01, bucketedCs01, checkCdsBucket, getCalibrator, getPricer, impliedSpread, parallelCs01, parallelCs01, parallelCs01
-
-
-
-
Field Detail
-
DEFAULT
public static final FiniteDifferenceSpreadSensitivityCalculator DEFAULT
Default implementation.The bump amount is one basis point.
-
-
Constructor Detail
-
FiniteDifferenceSpreadSensitivityCalculator
public FiniteDifferenceSpreadSensitivityCalculator(AccrualOnDefaultFormula formula, double bumpAmount)
Constructor with accrual-on-default formula and bump amount specified.- Parameters:
formula
- the formulabumpAmount
- the bump amount
-
-
Method Detail
-
parallelCs01
public CurrencyAmount parallelCs01(ResolvedCdsTrade trade, List<ResolvedCdsTrade> bucketCds, CreditRatesProvider ratesProvider, ReferenceData refData)
Description copied from class:SpreadSensitivityCalculator
Computes parallel CS01 for CDS.The relevant credit curve must be stored in
RatesProvider
.- Specified by:
parallelCs01
in classSpreadSensitivityCalculator
- Parameters:
trade
- the tradebucketCds
- the CDS bucketratesProvider
- the rates providerrefData
- the reference data- Returns:
- the parallel CS01
-
-