public final class IssuerCurveDiscountFactors extends Object implements org.joda.beans.ImmutableBean, Serializable
The discount factor represents the time value of money for the specified issuer and currency when comparing the valuation date to the specified date.
Modifier and Type | Class and Description |
---|---|
static class |
IssuerCurveDiscountFactors.Meta
The meta-bean for
IssuerCurveDiscountFactors . |
Modifier and Type | Method and Description |
---|---|
double |
discountFactor(LocalDate date)
Gets the discount factor.
|
boolean |
equals(Object obj) |
Currency |
getCurrency()
Gets the currency.
|
DiscountFactors |
getDiscountFactors()
Gets the underlying discount factors for a single currency.
|
LegalEntityGroup |
getLegalEntityGroup()
Gets the legal entity group.
|
LocalDate |
getValuationDate()
Gets the valuation date.
|
int |
hashCode() |
static IssuerCurveDiscountFactors.Meta |
meta()
The meta-bean for
IssuerCurveDiscountFactors . |
IssuerCurveDiscountFactors.Meta |
metaBean() |
static IssuerCurveDiscountFactors |
of(DiscountFactors discountFactors,
LegalEntityGroup legalEntityGroup)
Obtains an instance based on discount factors and legal entity group.
|
CurrencyParameterSensitivities |
parameterSensitivity(IssuerCurveZeroRateSensitivity pointSensitivity)
Calculates the curve parameter sensitivity from the point sensitivity.
|
String |
toString() |
IssuerCurveZeroRateSensitivity |
zeroRatePointSensitivity(LocalDate date)
Calculates the zero rate point sensitivity at the specified date.
|
IssuerCurveZeroRateSensitivity |
zeroRatePointSensitivity(LocalDate date,
Currency sensitivityCurrency)
Calculates the zero rate point sensitivity at the specified date specifying the currency of the sensitivity.
|
public static IssuerCurveDiscountFactors of(DiscountFactors discountFactors, LegalEntityGroup legalEntityGroup)
discountFactors
- the discount factorslegalEntityGroup
- the legal entity grouppublic Currency getCurrency()
The currency that discount factors are provided for.
public LocalDate getValuationDate()
The raw data in this provider is calibrated for this date.
public double discountFactor(LocalDate date)
The discount factor represents the time value of money for the specified currency and legal entity when comparing the valuation date to the specified date.
If the valuation date is on or after the specified date, the discount factor is 1.
date
- the date to discount topublic IssuerCurveZeroRateSensitivity zeroRatePointSensitivity(LocalDate date)
This returns a sensitivity instance referring to the zero rate sensitivity of the curve
used to determine the discount factor.
The sensitivity typically has the value (-discountFactor * relativeYearFraction)
.
The sensitivity refers to the result of discountFactor(LocalDate)
.
date
- the date to discount toRuntimeException
- if the result cannot be calculatedpublic IssuerCurveZeroRateSensitivity zeroRatePointSensitivity(LocalDate date, Currency sensitivityCurrency)
This returns a sensitivity instance referring to the zero rate sensitivity of the curve
used to determine the discount factor.
The sensitivity typically has the value (-discountFactor * relativeYearFraction)
.
The sensitivity refers to the result of discountFactor(LocalDate)
.
This method allows the currency of the sensitivity to differ from the currency of the curve.
date
- the date to discount tosensitivityCurrency
- the currency of the sensitivityRuntimeException
- if the result cannot be calculatedpublic CurrencyParameterSensitivities parameterSensitivity(IssuerCurveZeroRateSensitivity pointSensitivity)
This is used to convert a single point sensitivity to curve 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 IssuerCurveDiscountFactors.Meta meta()
IssuerCurveDiscountFactors
.public IssuerCurveDiscountFactors.Meta metaBean()
metaBean
in interface org.joda.beans.Bean
public DiscountFactors getDiscountFactors()
This contains curve, curve currency, valuation date and day count convention.
The discount factor, its point sensitivity and curve sensitivity are computed by this DiscountFactors
.
public LegalEntityGroup getLegalEntityGroup()
The group defines the legal entity that the discount factors are for.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.