Class ImmutableRatesProviderBuilder
- java.lang.Object
-
- com.opengamma.strata.pricer.rate.ImmutableRatesProviderBuilder
-
public final class ImmutableRatesProviderBuilder extends Object
Builder for the immutable rates provider.- See Also:
ImmutableRatesProvider
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableRatesProvider
build()
Completes the builder, returning the provider.ImmutableRatesProviderBuilder
discountCurve(Currency currency, Curve discountCurve)
Adds a discount curve to the provider.ImmutableRatesProviderBuilder
discountCurves(Map<Currency,? extends Curve> discountCurves)
Adds discount curves to the provider.ImmutableRatesProviderBuilder
fxRateProvider(FxRateProvider fxRateProvider)
Sets the FX rate provider.ImmutableRatesProviderBuilder
iborIndexCurve(IborIndex index, Curve forwardCurve)
Adds an Ibor index forward curve to the provider.ImmutableRatesProviderBuilder
iborIndexCurve(IborIndex index, Curve forwardCurve, LocalDateDoubleTimeSeries timeSeries)
Adds an Ibor index forward curve to the provider with associated time-series.ImmutableRatesProviderBuilder
indexCurve(Index index, Curve forwardCurve)
Adds an index forward curve to the provider.ImmutableRatesProviderBuilder
indexCurve(Index index, Curve forwardCurve, LocalDateDoubleTimeSeries timeSeries)
Adds an index forward curve to the provider with associated time-series.ImmutableRatesProviderBuilder
indexCurves(Map<? extends Index,? extends Curve> indexCurves)
Adds index forward curves to the provider with associated time-series.ImmutableRatesProviderBuilder
indexCurves(Map<? extends Index,? extends Curve> indexCurves, Map<? extends Index,LocalDateDoubleTimeSeries> timeSeries)
Adds index forward curves to the provider with associated time-series.ImmutableRatesProviderBuilder
overnightIndexCurve(OvernightIndex index, Curve forwardCurve)
Adds an Overnight index forward curve to the provider.ImmutableRatesProviderBuilder
overnightIndexCurve(OvernightIndex index, Curve forwardCurve, LocalDateDoubleTimeSeries timeSeries)
Adds an Overnight index forward curve to the provider with associated time-series.ImmutableRatesProviderBuilder
priceIndexCurve(PriceIndex index, Curve forwardCurve)
Adds a Price index forward curve to the provider.ImmutableRatesProviderBuilder
priceIndexCurve(PriceIndex index, Curve forwardCurve, LocalDateDoubleTimeSeries timeSeries)
Adds an index forward curve to the provider with associated time-series.ImmutableRatesProviderBuilder
timeSeries(Index index, LocalDateDoubleTimeSeries timeSeries)
Adds a time-series to the provider.ImmutableRatesProviderBuilder
timeSeries(Map<? extends Index,LocalDateDoubleTimeSeries> timeSeries)
Adds time-series to the provider.
-
-
-
Method Detail
-
fxRateProvider
public ImmutableRatesProviderBuilder fxRateProvider(FxRateProvider fxRateProvider)
Sets the FX rate provider.- Parameters:
fxRateProvider
- the rate provider- Returns:
- this, for chaining
-
discountCurve
public ImmutableRatesProviderBuilder discountCurve(Currency currency, Curve discountCurve)
Adds a discount curve to the provider.This adds the specified discount curve to the provider. This operates using
Map.put(Object, Object)
semantics using the currency as the key.- Parameters:
currency
- the currency of the curvediscountCurve
- the discount curve- Returns:
- this, for chaining
-
discountCurves
public ImmutableRatesProviderBuilder discountCurves(Map<Currency,? extends Curve> discountCurves)
Adds discount curves to the provider.This adds the specified discount curves to the provider. This operates using
Map.putAll(Map)
semantics using the currency as the key.- Parameters:
discountCurves
- the discount curves- Returns:
- this, for chaining
-
iborIndexCurve
public ImmutableRatesProviderBuilder iborIndexCurve(IborIndex index, Curve forwardCurve)
Adds an Ibor index forward curve to the provider.This adds the specified forward curve to the provider. This operates using
Map.put(Object, Object)
semantics using the index as the key.- Parameters:
index
- the index of the curveforwardCurve
- the Ibor index forward curve- Returns:
- this, for chaining
-
iborIndexCurve
public ImmutableRatesProviderBuilder iborIndexCurve(IborIndex index, Curve forwardCurve, LocalDateDoubleTimeSeries timeSeries)
Adds an Ibor index forward curve to the provider with associated time-series.This adds the specified forward curve and time-series to the provider. This operates using
Map.put(Object, Object)
semantics using the index as the key.- Parameters:
index
- the index of the curveforwardCurve
- the index forward curvetimeSeries
- the associated time-series- Returns:
- this, for chaining
-
overnightIndexCurve
public ImmutableRatesProviderBuilder overnightIndexCurve(OvernightIndex index, Curve forwardCurve)
Adds an Overnight index forward curve to the provider.This adds the specified forward curve to the provider. This operates using
Map.put(Object, Object)
semantics using the index as the key.- Parameters:
index
- the index of the curveforwardCurve
- the Overnight index forward curve- Returns:
- this, for chaining
-
overnightIndexCurve
public ImmutableRatesProviderBuilder overnightIndexCurve(OvernightIndex index, Curve forwardCurve, LocalDateDoubleTimeSeries timeSeries)
Adds an Overnight index forward curve to the provider with associated time-series.This adds the specified forward curve and time-series to the provider. This operates using
Map.put(Object, Object)
semantics using the index as the key.- Parameters:
index
- the index of the curveforwardCurve
- the index forward curvetimeSeries
- the associated time-series- Returns:
- this, for chaining
-
priceIndexCurve
public ImmutableRatesProviderBuilder priceIndexCurve(PriceIndex index, Curve forwardCurve)
Adds a Price index forward curve to the provider.This adds the specified forward curve to the provider. This operates using
Map.put(Object, Object)
semantics using the index as the key.- Parameters:
index
- the index of the curveforwardCurve
- the Price index forward curve- Returns:
- this, for chaining
-
priceIndexCurve
public ImmutableRatesProviderBuilder priceIndexCurve(PriceIndex index, Curve forwardCurve, LocalDateDoubleTimeSeries timeSeries)
Adds an index forward curve to the provider with associated time-series.This adds the specified forward curve and time-series to the provider. This operates using
Map.put(Object, Object)
semantics using the index as the key.- Parameters:
index
- the index of the curveforwardCurve
- the index forward curvetimeSeries
- the associated time-series- Returns:
- this, for chaining
-
indexCurve
public ImmutableRatesProviderBuilder indexCurve(Index index, Curve forwardCurve)
Adds an index forward curve to the provider.This adds the specified forward curve to the provider. This operates using
Map.put(Object, Object)
semantics using the index as the key.Any index may be used, however
RatesProvider
only directly supports Ibor, Overnight and Price indices.- Parameters:
index
- the index of the curveforwardCurve
- the Ibor index forward curve- Returns:
- this, for chaining
-
indexCurve
public ImmutableRatesProviderBuilder indexCurve(Index index, Curve forwardCurve, LocalDateDoubleTimeSeries timeSeries)
Adds an index forward curve to the provider with associated time-series.This adds the specified forward curve to the provider. This operates using
Map.put(Object, Object)
semantics using the index as the key.Any index may be used, however
RatesProvider
only directly supports Ibor, Overnight and Price indices.- Parameters:
index
- the index of the curveforwardCurve
- the Ibor index forward curvetimeSeries
- the time-series- Returns:
- this, for chaining
-
indexCurves
public ImmutableRatesProviderBuilder indexCurves(Map<? extends Index,? extends Curve> indexCurves)
Adds index forward curves to the provider with associated time-series.This adds the specified index forward curves to the provider. This operates using
Map.putAll(Map)
semantics using the index as the key.Any index may be used, however
RatesProvider
only directly supports Ibor, Overnight and Price indices.- Parameters:
indexCurves
- the index forward curves- Returns:
- this, for chaining
-
indexCurves
public ImmutableRatesProviderBuilder indexCurves(Map<? extends Index,? extends Curve> indexCurves, Map<? extends Index,LocalDateDoubleTimeSeries> timeSeries)
Adds index forward curves to the provider with associated time-series.This adds the specified index forward curves to the provider. This operates using
Map.putAll(Map)
semantics using the index as the key.Any index may be used, however
RatesProvider
only directly supports Ibor, Overnight and Price indices.- Parameters:
indexCurves
- the index forward curvestimeSeries
- the associated time-series- Returns:
- this, for chaining
-
timeSeries
public ImmutableRatesProviderBuilder timeSeries(Index index, LocalDateDoubleTimeSeries timeSeries)
Adds a time-series to the provider.This adds the specified time-series to the provider. This operates using
Map.put(Object, Object)
semantics using the index as the key.Any index may be used, however
RatesProvider
only directly supports Ibor, Overnight and Price indices.- Parameters:
index
- the FX indextimeSeries
- the FX index time-series- Returns:
- this, for chaining
-
timeSeries
public ImmutableRatesProviderBuilder timeSeries(Map<? extends Index,LocalDateDoubleTimeSeries> timeSeries)
Adds time-series to the provider.This adds the specified time-series to the provider. This operates using
Map.putAll(Map)
semantics using the index as the key.Any index may be used, however
RatesProvider
only directly supports Ibor, Overnight and Price indices.- Parameters:
timeSeries
- the FX index time-series- Returns:
- this, for chaining
-
build
public ImmutableRatesProvider build()
Completes the builder, returning the provider.- Returns:
- the provider
-
-