public interface RatesProvider extends BaseProvider
This provides the environmental information against which pricing occurs. The valuation date, FX rates, discount factors, time-series and forward curves are included.
The standard independent implementation is ImmutableRatesProvider
.
All implementations of this interface must be immutable and thread-safe.
Modifier and Type | Method and Description |
---|---|
default MultiCurrencyAmount |
currencyExposure(PointSensitivities pointSensitivities)
Computes the currency exposure.
|
<T> Optional<T> |
findData(MarketDataName<T> name)
Finds the market data with the specified name.
|
FxForwardRates |
fxForwardRates(CurrencyPair currencyPair)
Gets the forward FX rates for a currency pair.
|
FxIndexRates |
fxIndexRates(FxIndex index)
Gets the rates for an FX index.
|
Set<IborIndex> |
getIborIndices()
Gets the set of Ibor indices that are available.
|
Set<OvernightIndex> |
getOvernightIndices()
Gets the set of Overnight indices that are available.
|
Set<PriceIndex> |
getPriceIndices()
Gets the set of Price indices that are available.
|
Set<Index> |
getTimeSeriesIndices()
Gets the set of indices that have time-series available.
|
IborIndexRates |
iborIndexRates(IborIndex index)
Gets the rates for an Ibor index.
|
default Stream<Index> |
indices()
Gets the forward indices that are available.
|
OvernightIndexRates |
overnightIndexRates(OvernightIndex index)
Gets the rates for an Overnight index.
|
default CurrencyParameterSensitivities |
parameterSensitivity(PointSensitivities pointSensitivities)
Computes the parameter sensitivity.
|
PriceIndexValues |
priceIndexValues(PriceIndex index)
Gets the values for an Price index.
|
LocalDateDoubleTimeSeries |
timeSeries(Index index)
Gets the time series.
|
ImmutableRatesProvider |
toImmutableRatesProvider()
Converts this provider to an equivalent
ImmutableRatesProvider . |
data, discountFactor, discountFactors, fxRate, fxRate, getDiscountCurrencies, getValuationDate
convert, convert, lazy, minimal, noConversion
default Stream<Index> indices()
Normally this will only return Ibor, Overnight and Price indices, however it may return other types of index.
Set<IborIndex> getIborIndices()
If an index is present in the result of this method, then
iborIndexRates(IborIndex)
should not throw an exception.
Set<OvernightIndex> getOvernightIndices()
If an index is present in the result of this method, then
overnightIndexRates(OvernightIndex)
should not throw an exception.
Set<PriceIndex> getPriceIndices()
If an index is present in the result of this method, then
priceIndexValues(PriceIndex)
should not throw an exception.
Set<Index> getTimeSeriesIndices()
Note that the method timeSeries(Index)
returns an empty time-series
when the index is not known, thus this method is useful to determine if there
actually is a time-series in the underlying data.
FxIndexRates fxIndexRates(FxIndex index)
This returns an object that can provide historic and forward rates for the specified index.
An FX rate is the conversion rate between two currencies. An FX index is the rate as published by a specific organization, typically at a well-known time-of-day.
index
- the index to find rates forIllegalArgumentException
- if the rates are not availableFxForwardRates fxForwardRates(CurrencyPair currencyPair)
This returns an object that can provide forward rates for the specified currency pair.
See fxIndexRates(FxIndex)
for forward rates with daily fixings.
currencyPair
- the currency pair to find forward rates forIllegalArgumentException
- if the rates are not availableIborIndexRates iborIndexRates(IborIndex index)
The rate of the Ibor index, such as 'GBP-LIBOR-3M', varies over time. This returns an object that can provide historic and forward rates for the specified index.
index
- the index to find rates forIllegalArgumentException
- if the rates are not availableOvernightIndexRates overnightIndexRates(OvernightIndex index)
The rate of the Overnight index, such as 'EUR-EONIA', varies over time. This returns an object that can provide historic and forward rates for the specified index.
index
- the index to find rates forIllegalArgumentException
- if the rates are not availablePriceIndexValues priceIndexValues(PriceIndex index)
The value of the Price index, such as 'US-CPI-U', varies over time. This returns an object that can provide historic and forward values for the specified index.
index
- the index to find values forIllegalArgumentException
- if the values are not availabledefault CurrencyParameterSensitivities parameterSensitivity(PointSensitivities pointSensitivities)
This computes the CurrencyParameterSensitivities
associated with the PointSensitivities
.
This corresponds to the projection of the point sensitivity to the internal parameters representation.
For example, the point sensitivities could represent the sensitivity to a date on the first of each month in a year relative to a specific forward curve. This method converts to the point sensitivities to be relative to each parameter on the underlying curve, such as the 1 day, 1 week, 1 month, 3 month, 12 month and 5 year nodal points.
pointSensitivities
- the point sensitivitiesdefault MultiCurrencyAmount currencyExposure(PointSensitivities pointSensitivities)
This computes the currency exposure in the form of a MultiCurrencyAmount
associated with the
PointSensitivities
. This corresponds to the projection of the point sensitivity to the
currency exposure associated to an FxIndexSensitivity
.
For example, the point sensitivities could represent the sensitivity to a FX Index. This method produces the implicit currency exposure embedded in the FX index sensitivity.
Reference: Currency Exposure and FX index, OpenGamma Documentation 32, July 2015.
pointSensitivities
- the point sensitivities<T> Optional<T> findData(MarketDataName<T> name)
This is most commonly used to find a Curve
using a CurveName
.
If the market data cannot be found, empty is returned.
T
- the type of the market data valuename
- the name to findLocalDateDoubleTimeSeries timeSeries(Index index)
This returns time series for the index.
index
- the indexImmutableRatesProvider toImmutableRatesProvider()
ImmutableRatesProvider
.Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.