public final class LegalEntitySurvivalProbabilities extends Object implements org.joda.beans.ImmutableBean, Serializable
This represents the survival probabilities of a legal entity for a single currency.
| Modifier and Type | Class and Description |
|---|---|
static class |
LegalEntitySurvivalProbabilities.Meta
The meta-bean for
LegalEntitySurvivalProbabilities. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Currency |
getCurrency()
Gets the currency.
|
StandardId |
getLegalEntityId()
Gets the legal entity identifier.
|
DoubleArray |
getParameterKeys()
Obtains the parameter keys of the underlying curve.
|
CreditDiscountFactors |
getSurvivalProbabilities()
Gets the underlying curve.
|
LocalDate |
getValuationDate()
Gets the valuation date.
|
int |
hashCode() |
static LegalEntitySurvivalProbabilities.Meta |
meta()
The meta-bean for
LegalEntitySurvivalProbabilities. |
LegalEntitySurvivalProbabilities.Meta |
metaBean() |
static LegalEntitySurvivalProbabilities |
of(StandardId legalEntityId,
CreditDiscountFactors survivalProbabilities)
Creates an instance.
|
CurrencyParameterSensitivities |
parameterSensitivity(CreditCurveZeroRateSensitivity pointSensitivity)
Calculates the parameter sensitivity from the point sensitivity.
|
double |
survivalProbability(LocalDate date)
Gets the survival probability for the specified date.
|
String |
toString() |
double |
zeroRate(double yearFraction)
Gets the continuously compounded zero hazard rate for specified year fraction.
|
CreditCurveZeroRateSensitivity |
zeroRatePointSensitivity(double yearFraction)
Calculates the zero rate point sensitivity at the specified year fraction.
|
CreditCurveZeroRateSensitivity |
zeroRatePointSensitivity(double yearFraction,
Currency sensitivityCurrency)
Calculates the zero rate point sensitivity at the specified year fraction specifying the currency of the sensitivity.
|
CreditCurveZeroRateSensitivity |
zeroRatePointSensitivity(LocalDate date)
Calculates the zero rate point sensitivity at the specified date.
|
CreditCurveZeroRateSensitivity |
zeroRatePointSensitivity(LocalDate date,
Currency sensitivityCurrency)
Calculates the zero rate point sensitivity at the specified date specifying the currency of the sensitivity.
|
public static LegalEntitySurvivalProbabilities of(StandardId legalEntityId, CreditDiscountFactors survivalProbabilities)
legalEntityId - the legal entity IDsurvivalProbabilities - the survival probabilitiespublic Currency getCurrency()
The currency that survival probabilities are provided for.
public LocalDate getValuationDate()
The raw data in this provider is calibrated for this date.
public DoubleArray getParameterKeys()
public double survivalProbability(LocalDate date)
If the valuation date is on the specified date, the survival probability is 1.
date - the dateRuntimeException - if the value cannot be obtainedpublic double zeroRate(double yearFraction)
yearFraction - the year fractionRuntimeException - if the value cannot be obtainedpublic CreditCurveZeroRateSensitivity zeroRatePointSensitivity(LocalDate date)
This returns a sensitivity instance referring to the zero hazard rate sensitivity of the
points that were queried in the market data.
The sensitivity typically has the value (-survivalProbability * yearFraction).
The sensitivity refers to the result of survivalProbability(LocalDate).
date - the dateRuntimeException - if the result cannot be calculatedpublic CreditCurveZeroRateSensitivity zeroRatePointSensitivity(double yearFraction)
This returns a sensitivity instance referring to the zero hazard rate sensitivity of the
points that were queried in the market data.
The sensitivity typically has the value (-survivalProbability * yearFraction).
The sensitivity refers to the result of survivalProbability(LocalDate).
yearFraction - the year fractionRuntimeException - if the result cannot be calculatedpublic CreditCurveZeroRateSensitivity zeroRatePointSensitivity(LocalDate date, Currency sensitivityCurrency)
This returns a sensitivity instance referring to the zero hazard rate sensitivity of the
points that were queried in the market data.
The sensitivity typically has the value (-survivalProbability * yearFraction).
The sensitivity refers to the result of survivalProbability(LocalDate).
This method allows the currency of the sensitivity to differ from the currency of the market data.
date - the datesensitivityCurrency - the currency of the sensitivityRuntimeException - if the result cannot be calculatedpublic CreditCurveZeroRateSensitivity zeroRatePointSensitivity(double yearFraction, Currency sensitivityCurrency)
This returns a sensitivity instance referring to the zero hazard rate sensitivity of the
points that were queried in the market data.
The sensitivity typically has the value (-survivalProbability * yearFraction).
The sensitivity refers to the result of survivalProbability(LocalDate).
This method allows the currency of the sensitivity to differ from the currency of the market data.
yearFraction - the year fractionsensitivityCurrency - the currency of the sensitivityRuntimeException - if the result cannot be calculatedpublic CurrencyParameterSensitivities parameterSensitivity(CreditCurveZeroRateSensitivity pointSensitivity)
This is used to convert a single point sensitivity to parameter sensitivity. The calculation typically involves multiplying the point and unit sensitivities.
pointSensitivity - the point sensitivity to convertRuntimeException - if the result cannot be calculatedpublic static LegalEntitySurvivalProbabilities.Meta meta()
LegalEntitySurvivalProbabilities.public LegalEntitySurvivalProbabilities.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic StandardId getLegalEntityId()
This identifier is used for the reference legal entity of a credit derivative.
public CreditDiscountFactors getSurvivalProbabilities()
The metadata of the curve must define a day count.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.