Interface ObservableId

  • All Superinterfaces:
    All Known Implementing Classes:
    IndexQuoteId, QuoteId

    public interface ObservableId
    extends MarketDataId<Double>
    A market data identifier that identifies observable data.

    Observable data can be requested from an external data provider, for example Bloomberg or Reuters.

    An observable ID contains three pieces of information:

    • A StandardId identifying the market data. This ID can come from any system. It might be an OpenGamma ID, for example OpenGammaIndex~GBP_LIBOR_3M, or it can be an ID from a market data source, for example BloombergTicker~AAPL US Equity.
    • A FieldName indicating the field in the market data record containing the data. See the FieldName documentation for more details.
    • A ObservableSource indicating where the data should come from. It is important to note that the standard ID is not necessarily related to the source. There is typically a mapping step in the market data system that maps the standard ID into an ID that can be used to look up the data in the source.

    Observable data is always represented by a double.

    • Method Detail

      • getMarketDataType

        default Class<Double> getMarketDataType()
        Gets the type of data this identifier refers to, which is a double.
        Specified by:
        getMarketDataType in interface MarketDataId<Double>
        the type of the market data this identifier refers to, Double.class
      • getStandardId

        StandardId getStandardId()
        Gets the standard identifier identifying the data.

        The identifier may be the identifier used to identify the item in an underlying data provider, for example a Bloomberg ticker. It also may be any arbitrary unique identifier that can be resolved to one or more data provider identifiers which are used to request the data from the provider.

        a standard identifier, such as a ticker, to identify the desired data
      • getFieldName

        FieldName getFieldName()
        Gets the field name in the market data record that contains the market data item.

        Each ticker typically exposes many different fields. The field name specifies the desired field. For example, the market value.

        the field name in the market data record that contains the market data item
      • getObservableSource

        ObservableSource getObservableSource()
        Gets the source of market data from which the market data should be retrieved.

        The source identifies the source of data, such as Bloomberg or Reuters.

        the source from which the market data should be retrieved
      • withObservableSource

        ObservableId withObservableSource​(ObservableSource obsSource)
        Returns an identifier equivalent to this with the specified source.
        obsSource - the source of market data
        the observable identifier