## Class RepoCurveDiscountFactors

• java.lang.Object
• com.opengamma.strata.pricer.bond.RepoCurveDiscountFactors
• All Implemented Interfaces:
java.io.Serializable, Bean, ImmutableBean

public final class RepoCurveDiscountFactors
extends java.lang.Object
implements ImmutableBean, java.io.Serializable

The discount factor represents the time value of money for the specified security, issuer and currency when comparing the valuation date to the specified date.

Serialized Form
• ### Nested Class Summary

Nested Classes
Modifier and Type Class Description
static class  RepoCurveDiscountFactors.Meta
The meta-bean for RepoCurveDiscountFactors.
• ### Method Summary

All Methods
Modifier and Type Method Description
double discountFactor​(java.time.LocalDate date)
Gets the discount factor.
boolean equals​(java.lang.Object obj)
Currency getCurrency()
Gets the currency.
DiscountFactors getDiscountFactors()
Gets the underlying discount factors for a single currency.
RepoGroup getRepoGroup()
Gets the repo group.
java.time.LocalDate getValuationDate()
Gets the valuation date.
int hashCode()
static RepoCurveDiscountFactors.Meta meta()
The meta-bean for RepoCurveDiscountFactors.
RepoCurveDiscountFactors.Meta metaBean()
static RepoCurveDiscountFactors of​(DiscountFactors discountFactors, RepoGroup group)
Obtains an instance based on discount factors and group.
CurrencyParameterSensitivities parameterSensitivity​(RepoCurveZeroRateSensitivity pointSensitivity)
Calculates the curve parameter sensitivity from the point sensitivity.
java.lang.String toString()
RepoCurveZeroRateSensitivity zeroRatePointSensitivity​(java.time.LocalDate date)
Calculates the zero rate point sensitivity at the specified date.
RepoCurveZeroRateSensitivity zeroRatePointSensitivity​(java.time.LocalDate date, Currency sensitivityCurrency)
Calculates the zero rate point sensitivity at the specified date specifying the currency of the sensitivity.
• ### Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait
• ### Methods inherited from interface org.joda.beans.Bean

property, propertyNames
• ### Method Detail

• #### of

public static RepoCurveDiscountFactors of​(DiscountFactors discountFactors,
RepoGroup group)
Obtains an instance based on discount factors and group.
Parameters:
discountFactors - the discount factors
group - the group
Returns:
the repo curve discount factors
• #### getCurrency

public Currency getCurrency()
Gets the currency.

The currency that discount factors are provided for.

Returns:
the currency
• #### getValuationDate

public java.time.LocalDate getValuationDate()
Gets the valuation date.

The raw data in this provider is calibrated for this date.

Returns:
the valuation date
• #### discountFactor

public double discountFactor​(java.time.LocalDate date)
Gets the discount factor.

The discount factor represents the time value of money for the specified currency and bond 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.

Parameters:
date - the date to discount to
Returns:
the discount factor
• #### zeroRatePointSensitivity

public RepoCurveZeroRateSensitivity zeroRatePointSensitivity​(java.time.LocalDate date)
Calculates the zero rate point sensitivity at the specified 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).

Parameters:
date - the date to discount to
Returns:
the point sensitivity of the zero rate
Throws:
java.lang.RuntimeException - if the result cannot be calculated
• #### zeroRatePointSensitivity

public RepoCurveZeroRateSensitivity zeroRatePointSensitivity​(java.time.LocalDate date,
Currency sensitivityCurrency)
Calculates the zero rate point sensitivity at the specified date specifying the currency of the sensitivity.

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.

Parameters:
date - the date to discount to
sensitivityCurrency - the currency of the sensitivity
Returns:
the point sensitivity of the zero rate
Throws:
java.lang.RuntimeException - if the result cannot be calculated
• #### parameterSensitivity

public CurrencyParameterSensitivities parameterSensitivity​(RepoCurveZeroRateSensitivity pointSensitivity)
Calculates the curve parameter sensitivity from the point sensitivity.

This is used to convert a single point sensitivity to curve parameter sensitivity. The calculation typically involves multiplying the point and unit sensitivities.

Parameters:
pointSensitivity - the point sensitivity to convert
Returns:
the parameter sensitivity
Throws:
java.lang.RuntimeException - if the result cannot be calculated
• #### meta

public static RepoCurveDiscountFactors.Meta meta()
The meta-bean for RepoCurveDiscountFactors.
Returns:
the meta-bean, not null
• #### metaBean

public RepoCurveDiscountFactors.Meta metaBean()
Specified by:
metaBean in interface Bean
• #### getDiscountFactors

public DiscountFactors getDiscountFactors()
Gets the underlying discount factors for a single currency.

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.

Returns:
the value of the property, not null
• #### getRepoGroup

public RepoGroup getRepoGroup()
Gets the repo group.

This defines the group that the discount factors are for.

Returns:
the value of the property, not null
• #### equals

public boolean equals​(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
• #### hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
• #### toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object