Interface FxRateLookup

  • All Superinterfaces:
    CalculationParameter
    All Known Subinterfaces:
    RatesMarketDataLookup

    public interface FxRateLookup
    extends CalculationParameter
    The lookup that provides access to FX rates in market data.

    An instance of MarketData can contain many different FX rates. This lookup allows a specific set of rates to be obtained.

    Implementations of this interface must be immutable.

    • Method Detail

      • ofRates

        static FxRateLookup ofRates()
        Obtains the standard instance.

        This expects the market data to contain instances of FxRateId based on the default ObservableSource. Triangulation will use the default of the currency, typically USD.

        Returns:
        the FX rate lookup
      • ofRates

        static FxRateLookup ofRates​(ObservableSource observableSource)
        Obtains the standard instance.

        This expects the market data to contain instances of FxRateId based on the specified ObservableSource. Triangulation will use the default of the currency, typically USD.

        Parameters:
        observableSource - the source of observable market data
        Returns:
        the FX rate lookup
      • ofRates

        static FxRateLookup ofRates​(Currency triangulationCurrency)
        Obtains an instance that uses triangulation on the specified currency.

        This expects the market data to contain instances of FxRateId based on the default ObservableSource. Triangulation will use the specified currency.

        Parameters:
        triangulationCurrency - the triangulation currency
        Returns:
        the FX rate lookup
      • ofRates

        static FxRateLookup ofRates​(Currency triangulationCurrency,
                                    ObservableSource observableSource)
        Obtains an instance that uses triangulation on the specified currency.

        This expects the market data to contain instances of FxRateId based on the specified ObservableSource. Triangulation will use the specified currency.

        Parameters:
        triangulationCurrency - the triangulation currency
        observableSource - the source of observable market data
        Returns:
        the FX rate lookup
      • ofMatrix

        static FxRateLookup ofMatrix()
        Obtains an instance that uses an FX matrix.

        This expects the market data to contain an instance of FxMatrix accessed by the standard FxMatrixId.

        Returns:
        the FX rate lookup
      • ofMatrix

        static FxRateLookup ofMatrix​(FxMatrixId matrixId)
        Obtains an instance that uses an FX matrix.

        This expects the market data to contain an instance of FxMatrix accessed by the specified FxMatrixId.

        Parameters:
        matrixId - the FX matrix identifier
        Returns:
        the FX rate lookup
      • fxRateProvider

        FxRateProvider fxRateProvider​(MarketData marketData)
        Obtains an FX rate provider based on the specified market data.

        This provides an FxRateProvider suitable for obtaining FX rates.

        Parameters:
        marketData - the complete set of market data for one scenario
        Returns:
        the FX rate provider