Class ImmutableCreditRatesProvider
- java.lang.Object
-
- com.opengamma.strata.pricer.credit.ImmutableCreditRatesProvider
-
- All Implemented Interfaces:
CreditRatesProvider,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class ImmutableCreditRatesProvider extends Object implements CreditRatesProvider, org.joda.beans.ImmutableBean, Serializable
The immutable rates provider, used to calculate analytic measures.The primary usage of this provider is to price credit default swaps on a legal entity. This includes credit curves, discounting curves and recovery rate curves.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCreditRatesProvider.BuilderThe bean-builder forImmutableCreditRatesProvider.static classImmutableCreditRatesProvider.MetaThe meta-bean forImmutableCreditRatesProvider.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCreditRatesProvider.Builderbuilder()Returns a builder used to create an instance of the bean.CreditDiscountFactorsdiscountFactors(Currency currency)Gets the discount factors for a currency.booleanequals(Object obj)<T> Optional<T>findData(MarketDataName<T> name)Finds the market data with the specified name.LocalDategetValuationDate()Gets the valuation date.inthashCode()static ImmutableCreditRatesProvider.Metameta()The meta-bean forImmutableCreditRatesProvider.ImmutableCreditRatesProvider.MetametaBean()CurrencyParameterSensitivitiesparameterSensitivity(PointSensitivities pointSensitivities)Computes the parameter sensitivity.RecoveryRatesrecoveryRates(StandardId legalEntityId)Gets the recovery rates for a standard ID.CurrencyParameterSensitivitysingleCreditCurveParameterSensitivity(PointSensitivities pointSensitivities, StandardId legalEntityId, Currency currency)Computes the parameter sensitivity for a specific credit curve.CurrencyParameterSensitivitysingleDiscountCurveParameterSensitivity(PointSensitivities pointSensitivities, Currency currency)Computes the parameter sensitivity for a specific discount curve.LegalEntitySurvivalProbabilitiessurvivalProbabilities(StandardId legalEntityId, Currency currency)Gets the survival probabilities for a standard ID and a currency.ImmutableCreditRatesProvider.BuildertoBuilder()Returns a builder that allows this bean to be mutated.ImmutableCreditRatesProvidertoImmutableCreditRatesProvider()Converts this provider to an equivalentImmutableCreditRatesProvider.StringtoString()
-
-
-
Method Detail
-
survivalProbabilities
public LegalEntitySurvivalProbabilities survivalProbabilities(StandardId legalEntityId, Currency currency)
Description copied from interface:CreditRatesProviderGets the survival probabilities for a standard ID and a currency.If both the standard ID and currency are matched, the relevant
LegalEntitySurvivalProbabilitiesis returned.If the valuation date is on the specified date, the survival probability is 1.
- Specified by:
survivalProbabilitiesin interfaceCreditRatesProvider- Parameters:
legalEntityId- the standard ID of legal entity to get the discount factors forcurrency- the currency to get the discount factors for- Returns:
- the survival probabilities
-
discountFactors
public CreditDiscountFactors discountFactors(Currency currency)
Description copied from interface:CreditRatesProviderGets the discount factors for a currency.The discount factor represents the time value of money for the specified currency when comparing the valuation date to the specified date.
If the valuation date is on the specified date, the discount factor is 1.
- Specified by:
discountFactorsin interfaceCreditRatesProvider- Parameters:
currency- the currency to get the discount factors for- Returns:
- the discount factors for the specified currency
-
recoveryRates
public RecoveryRates recoveryRates(StandardId legalEntityId)
Description copied from interface:CreditRatesProviderGets the recovery rates for a standard ID.If both the standard ID and currency are matched, the relevant
RecoveryRatesis returned.- Specified by:
recoveryRatesin interfaceCreditRatesProvider- Parameters:
legalEntityId- the standard ID of legal entity to get the discount factors for- Returns:
- the recovery rates
-
parameterSensitivity
public CurrencyParameterSensitivities parameterSensitivity(PointSensitivities pointSensitivities)
Description copied from interface:CreditRatesProviderComputes the parameter sensitivity.This computes the
CurrencyParameterSensitivitiesassociated with thePointSensitivities. This corresponds to the projection of the point sensitivity to the curve internal parameters representation.The sensitivities handled here are
CreditCurveZeroRateSensitivity,ZeroRateSensitivity. For the other sensitivity objects, useRatesProviderinstead.- Specified by:
parameterSensitivityin interfaceCreditRatesProvider- Parameters:
pointSensitivities- the point sensitivity- Returns:
- the sensitivity to the curve parameters
-
singleCreditCurveParameterSensitivity
public CurrencyParameterSensitivity singleCreditCurveParameterSensitivity(PointSensitivities pointSensitivities, StandardId legalEntityId, Currency currency)
Description copied from interface:CreditRatesProviderComputes the parameter sensitivity for a specific credit curve.The credit curve is specified by
legalEntityIdandcurrency.- Specified by:
singleCreditCurveParameterSensitivityin interfaceCreditRatesProvider- Parameters:
pointSensitivities- the point sensitivitylegalEntityId- the legal entitycurrency- the currency- Returns:
- the sensitivity to the curve parameters
-
singleDiscountCurveParameterSensitivity
public CurrencyParameterSensitivity singleDiscountCurveParameterSensitivity(PointSensitivities pointSensitivities, Currency currency)
Description copied from interface:CreditRatesProviderComputes the parameter sensitivity for a specific discount curve.The discount curve is specified by
currency.- Specified by:
singleDiscountCurveParameterSensitivityin interfaceCreditRatesProvider- Parameters:
pointSensitivities- the point sensitivitycurrency- the currency- Returns:
- the sensitivity to the curve parameters
-
findData
public <T> Optional<T> findData(MarketDataName<T> name)
Description copied from interface:CreditRatesProviderFinds the market data with the specified name.This is most commonly used to find a
Curveusing aCurveName. If the market data cannot be found, empty is returned.- Specified by:
findDatain interfaceCreditRatesProvider- Type Parameters:
T- the type of the market data value- Parameters:
name- the name to find- Returns:
- the market data value, empty if not found
-
toImmutableCreditRatesProvider
public ImmutableCreditRatesProvider toImmutableCreditRatesProvider()
Description copied from interface:CreditRatesProviderConverts this provider to an equivalentImmutableCreditRatesProvider.- Specified by:
toImmutableCreditRatesProviderin interfaceCreditRatesProvider- Returns:
- the equivalent immutable legal entity provider
-
meta
public static ImmutableCreditRatesProvider.Meta meta()
The meta-bean forImmutableCreditRatesProvider.- Returns:
- the meta-bean, not null
-
builder
public static ImmutableCreditRatesProvider.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public ImmutableCreditRatesProvider.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getValuationDate
public LocalDate getValuationDate()
Gets the valuation date.All curves and other data items in this provider are calibrated for this date.
- Specified by:
getValuationDatein interfaceCreditRatesProvider- Returns:
- the value of the property, not null
-
toBuilder
public ImmutableCreditRatesProvider.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-