public final class ImmutableLegalEntityDiscountingProvider extends Object implements LegalEntityDiscountingProvider, org.joda.beans.ImmutableBean, Serializable
This used to price bonds issued by a legal entity.
The data to do this includes discount factors of repo curves and issuer curves.
If the bond is inflation linked, the price index data is obtained from RatesProvider.
Two types of discount factors are provided by this class. Repo curves are looked up using either the security ID of the bond, or the issuer (legal entity). Issuer curves are only looked up using the issuer (legal entity).
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableLegalEntityDiscountingProvider.Builder
The bean-builder for
ImmutableLegalEntityDiscountingProvider. |
static class |
ImmutableLegalEntityDiscountingProvider.Meta
The meta-bean for
ImmutableLegalEntityDiscountingProvider. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableLegalEntityDiscountingProvider.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
<T> T |
data(MarketDataId<T> id)
Gets market data of a specific type.
|
boolean |
equals(Object obj) |
<T> Optional<T> |
findData(MarketDataName<T> name)
Finds the market data with the specified name.
|
ImmutableMap<LegalEntityId,LegalEntityGroup> |
getIssuerCurveGroups()
Gets the groups used to find an issuer curve by legal entity.
|
ImmutableMap<Pair<LegalEntityGroup,Currency>,DiscountFactors> |
getIssuerCurves()
Gets the issuer curves, keyed by group and currency.
|
ImmutableMap<LegalEntityId,RepoGroup> |
getRepoCurveGroups()
Gets the groups used to find a repo curve by legal entity.
|
ImmutableMap<Pair<RepoGroup,Currency>,DiscountFactors> |
getRepoCurves()
Gets the repo curves, keyed by group and currency.
|
ImmutableMap<SecurityId,RepoGroup> |
getRepoCurveSecurityGroups()
Gets the groups used to find a repo curve by security.
|
LocalDate |
getValuationDate()
Gets the valuation date.
|
int |
hashCode() |
IssuerCurveDiscountFactors |
issuerCurveDiscountFactors(LegalEntityId issuerId,
Currency currency)
Gets the discount factors from an issuer based on the issuer ID and currency.
|
static ImmutableLegalEntityDiscountingProvider.Meta |
meta()
The meta-bean for
ImmutableLegalEntityDiscountingProvider. |
ImmutableLegalEntityDiscountingProvider.Meta |
metaBean() |
CurrencyParameterSensitivities |
parameterSensitivity(PointSensitivities pointSensitivities)
Computes the parameter sensitivity.
|
RepoCurveDiscountFactors |
repoCurveDiscountFactors(LegalEntityId issuerId,
Currency currency)
Gets the discount factors from a repo curve based on the issuer ID and currency.
|
RepoCurveDiscountFactors |
repoCurveDiscountFactors(SecurityId securityId,
LegalEntityId issuerId,
Currency currency)
Gets the discount factors from a repo curve based on the security ID, issuer ID and currency.
|
ImmutableLegalEntityDiscountingProvider.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
ImmutableLegalEntityDiscountingProvider |
toImmutableLegalEntityDiscountingProvider()
Converts this provider to an equivalent
ImmutableLegalEntityDiscountingProvider. |
String |
toString() |
public RepoCurveDiscountFactors repoCurveDiscountFactors(SecurityId securityId, LegalEntityId issuerId, Currency currency)
LegalEntityDiscountingProviderThis searches first for a curve associated with the security iD and currency, and then for a curve associated with the issuer ID and currency.
If the valuation date is on or after the specified date, the discount factor is 1.
repoCurveDiscountFactors in interface LegalEntityDiscountingProvidersecurityId - the standard ID of security to get the discount factors forissuerId - the standard ID of legal entity to get the discount factors forcurrency - the currency to get the discount factors forpublic RepoCurveDiscountFactors repoCurveDiscountFactors(LegalEntityId issuerId, Currency currency)
LegalEntityDiscountingProviderThis searches for a curve associated with the issuer ID and currency.
If the valuation date is on or after the specified date, the discount factor is 1.
repoCurveDiscountFactors in interface LegalEntityDiscountingProviderissuerId - the standard ID of legal entity to get the discount factors forcurrency - the currency to get the discount factors forpublic IssuerCurveDiscountFactors issuerCurveDiscountFactors(LegalEntityId issuerId, Currency currency)
LegalEntityDiscountingProviderThis searches for a curve associated with the issuer ID and currency.
If the valuation date is on or after the specified date, the discount factor is 1.
issuerCurveDiscountFactors in interface LegalEntityDiscountingProviderissuerId - the standard ID to get the discount factors forcurrency - the currency to get the discount factors forpublic CurrencyParameterSensitivities parameterSensitivity(PointSensitivities pointSensitivities)
LegalEntityDiscountingProvider
This computes the CurrencyParameterSensitivities associated with the PointSensitivities.
This corresponds to the projection of the point sensitivity to the curve internal parameters representation.
This method handles RepoCurveZeroRateSensitivity and IssuerCurveZeroRateSensitivity.
For other sensitivity objects, see RatesProvider.parameterSensitivity(PointSensitivities).
parameterSensitivity in interface LegalEntityDiscountingProviderpointSensitivities - the point sensitivitypublic <T> T data(MarketDataId<T> id)
LegalEntityDiscountingProviderThis is a general purpose mechanism to obtain market data. In general, it is desirable to pass the specific market data needed for pricing into the pricing method. However, in some cases, notably swaps, this is not feasible. It is strongly recommended to clearly state on pricing methods what data is required.
data in interface LegalEntityDiscountingProviderT - the type of the valueid - the identifier to findpublic <T> Optional<T> findData(MarketDataName<T> name)
LegalEntityDiscountingProvider
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 LegalEntityDiscountingProviderT - the type of the market data valuename - the name to findpublic ImmutableLegalEntityDiscountingProvider toImmutableLegalEntityDiscountingProvider()
LegalEntityDiscountingProviderImmutableLegalEntityDiscountingProvider.toImmutableLegalEntityDiscountingProvider in interface LegalEntityDiscountingProviderpublic static ImmutableLegalEntityDiscountingProvider.Meta meta()
ImmutableLegalEntityDiscountingProvider.public static ImmutableLegalEntityDiscountingProvider.Builder builder()
public ImmutableLegalEntityDiscountingProvider.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic LocalDate getValuationDate()
getValuationDate in interface LegalEntityDiscountingProviderpublic ImmutableMap<SecurityId,RepoGroup> getRepoCurveSecurityGroups()
This maps the security ID to a group.
The group is used to find the curve in repoCurves.
public ImmutableMap<LegalEntityId,RepoGroup> getRepoCurveGroups()
This maps the legal entity ID to a group.
The group is used to find the curve in repoCurves.
public ImmutableMap<Pair<RepoGroup,Currency>,DiscountFactors> getRepoCurves()
public ImmutableMap<LegalEntityId,LegalEntityGroup> getIssuerCurveGroups()
This maps the legal entity ID to a group.
The group is used to find the curve in issuerCurves.
This property was renamed in version 1.1 of Strata from legalEntityMap.
public ImmutableMap<Pair<LegalEntityGroup,Currency>,DiscountFactors> getIssuerCurves()
public ImmutableLegalEntityDiscountingProvider.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.