public final class ImmutableCreditRatesProvider extends Object implements CreditRatesProvider, org.joda.beans.ImmutableBean, Serializable
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableCreditRatesProvider.Builder
The bean-builder for
ImmutableCreditRatesProvider. |
static class |
ImmutableCreditRatesProvider.Meta
The meta-bean for
ImmutableCreditRatesProvider. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableCreditRatesProvider.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
CreditDiscountFactors |
discountFactors(Currency currency)
Gets the discount factors for a currency.
|
boolean |
equals(Object obj) |
<T> Optional<T> |
findData(MarketDataName<T> name)
Finds the market data with the specified name.
|
ImmutableMap<Pair<StandardId,Currency>,LegalEntitySurvivalProbabilities> |
getCreditCurves()
Gets the credit curves.
|
ImmutableMap<Currency,CreditDiscountFactors> |
getDiscountCurves()
Gets the discounting curves.
|
ImmutableMap<StandardId,RecoveryRates> |
getRecoveryRateCurves()
Gets the credit rate curves.
|
LocalDate |
getValuationDate()
Gets the valuation date.
|
int |
hashCode() |
static ImmutableCreditRatesProvider.Meta |
meta()
The meta-bean for
ImmutableCreditRatesProvider. |
ImmutableCreditRatesProvider.Meta |
metaBean() |
CurrencyParameterSensitivities |
parameterSensitivity(PointSensitivities pointSensitivities)
Computes the parameter sensitivity.
|
RecoveryRates |
recoveryRates(StandardId legalEntityId)
Gets the recovery rates for a standard ID.
|
CurrencyParameterSensitivity |
singleCreditCurveParameterSensitivity(PointSensitivities pointSensitivities,
StandardId legalEntityId,
Currency currency)
Computes the parameter sensitivity for a specific credit curve.
|
CurrencyParameterSensitivity |
singleDiscountCurveParameterSensitivity(PointSensitivities pointSensitivities,
Currency currency)
Computes the parameter sensitivity for a specific discount curve.
|
LegalEntitySurvivalProbabilities |
survivalProbabilities(StandardId legalEntityId,
Currency currency)
Gets the survival probabilities for a standard ID and a currency.
|
ImmutableCreditRatesProvider.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
ImmutableCreditRatesProvider |
toImmutableCreditRatesProvider()
Converts this provider to an equivalent
ImmutableCreditRatesProvider. |
String |
toString() |
public LegalEntitySurvivalProbabilities survivalProbabilities(StandardId legalEntityId, Currency currency)
CreditRatesProvider
If both the standard ID and currency are matched, the relevant LegalEntitySurvivalProbabilities is returned.
If the valuation date is on the specified date, the survival probability is 1.
survivalProbabilities in interface CreditRatesProviderlegalEntityId - the standard ID of legal entity to get the discount factors forcurrency - the currency to get the discount factors forpublic CreditDiscountFactors discountFactors(Currency currency)
CreditRatesProviderThe 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.
discountFactors in interface CreditRatesProvidercurrency - the currency to get the discount factors forpublic RecoveryRates recoveryRates(StandardId legalEntityId)
CreditRatesProvider
If both the standard ID and currency are matched, the relevant RecoveryRates is returned.
recoveryRates in interface CreditRatesProviderlegalEntityId - the standard ID of legal entity to get the discount factors forpublic CurrencyParameterSensitivities parameterSensitivity(PointSensitivities pointSensitivities)
CreditRatesProvider
This computes the CurrencyParameterSensitivities associated with the PointSensitivities.
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, use RatesProvider instead.
parameterSensitivity in interface CreditRatesProviderpointSensitivities - the point sensitivitypublic CurrencyParameterSensitivity singleCreditCurveParameterSensitivity(PointSensitivities pointSensitivities, StandardId legalEntityId, Currency currency)
CreditRatesProvider
The credit curve is specified by legalEntityId and currency.
singleCreditCurveParameterSensitivity in interface CreditRatesProviderpointSensitivities - the point sensitivitylegalEntityId - the legal entitycurrency - the currencypublic CurrencyParameterSensitivity singleDiscountCurveParameterSensitivity(PointSensitivities pointSensitivities, Currency currency)
CreditRatesProvider
The discount curve is specified by currency.
singleDiscountCurveParameterSensitivity in interface CreditRatesProviderpointSensitivities - the point sensitivitycurrency - the currencypublic <T> Optional<T> findData(MarketDataName<T> name)
CreditRatesProvider
This is most commonly used to find a Curve using a CurveName.
If the market data cannot be found, empty is returned.
findData in interface CreditRatesProviderT - the type of the market data valuename - the name to findpublic ImmutableCreditRatesProvider toImmutableCreditRatesProvider()
CreditRatesProviderImmutableCreditRatesProvider.toImmutableCreditRatesProvider in interface CreditRatesProviderpublic static ImmutableCreditRatesProvider.Meta meta()
ImmutableCreditRatesProvider.public static ImmutableCreditRatesProvider.Builder builder()
public ImmutableCreditRatesProvider.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic LocalDate getValuationDate()
All curves and other data items in this provider are calibrated for this date.
getValuationDate in interface CreditRatesProviderpublic ImmutableMap<Pair<StandardId,Currency>,LegalEntitySurvivalProbabilities> getCreditCurves()
The curve data, predicting the survival probability, associated with each legal entity and currency.
public ImmutableMap<Currency,CreditDiscountFactors> getDiscountCurves()
The curve data, predicting the discount factor, associated with each currency.
public ImmutableMap<StandardId,RecoveryRates> getRecoveryRateCurves()
The curve date, predicting the recovery rate, associated with each legal entity.
public ImmutableCreditRatesProvider.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.