public final class QuoteId extends Object implements ObservableId, org.joda.beans.ImmutableBean, Serializable
A quote ID identifies a piece of data in an external data provider.
Where possible, applications should use higher level IDs, instead of this class. Higher level market data keys allow the system to associate the market data with metadata when applying scenario definitions. If quote IDs are used directly, the system has no way to perturb the market data using higher level rules that rely on metadata.
The StandardId in a quote ID is typically the ID from an underlying data provider (e.g.
Bloomberg or Reuters). However the field name is a generic name which is mapped to the field name
in the underlying provider by the market data system.
The reason for this difference is the different sources of the ID and field name data. The ID is typically taken from an object which is provided to any calculations, for example a security linked to the trade. The calculation rarely has to make up an ID for an object it doesn't have access to.
In contrast, calculations will often have to reference field names that aren't part their arguments. For example, if a calculation requires the last closing price of a security, it could take the ID from the security, but it needs a way to specify the field name containing the last closing price.
If the field name were specific to the market data provider, the calculation would have to be aware
of the source of its market data. However, if it uses a generic field name from FieldNames
the market data source can change without affecting the calculation.
FieldName,
Serialized Form| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
FieldName |
getFieldName()
Gets the field name in the market data record that contains the market data item.
|
ObservableSource |
getObservableSource()
Gets the source of observable market data.
|
StandardId |
getStandardId()
Gets the identifier of the data.
|
int |
hashCode() |
static org.joda.beans.TypedMetaBean<QuoteId> |
meta()
The meta-bean for
QuoteId. |
org.joda.beans.TypedMetaBean<QuoteId> |
metaBean() |
static QuoteId |
of(StandardId standardId)
Obtains an instance used to obtain an observable value.
|
static QuoteId |
of(StandardId standardId,
FieldName fieldName)
Obtains an instance used to obtain an observable value.
|
static QuoteId |
of(StandardId standardId,
FieldName fieldName,
ObservableSource obsSource)
Obtains an instance used to obtain an observable value,
specifying the source of observable market data.
|
String |
toString() |
QuoteId |
withObservableSource(ObservableSource obsSource) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetMarketDataTypepublic static QuoteId of(StandardId standardId)
The field name containing the data is FieldName.MARKET_VALUE and the market
data source is ObservableSource.NONE.
standardId - the standard identifier of the data in the underlying data providerpublic static QuoteId of(StandardId standardId, FieldName fieldName)
The market data source is ObservableSource.NONE.
standardId - the standard identifier of the data in the underlying data providerfieldName - the name of the field in the market data record holding the datapublic static QuoteId of(StandardId standardId, FieldName fieldName, ObservableSource obsSource)
standardId - the standard identifier of the data in the underlying data providerfieldName - the name of the field in the market data record holding the dataobsSource - the source of observable market datapublic QuoteId withObservableSource(ObservableSource obsSource)
withObservableSource in interface ObservableIdpublic static org.joda.beans.TypedMetaBean<QuoteId> meta()
QuoteId.public org.joda.beans.TypedMetaBean<QuoteId> metaBean()
metaBean in interface org.joda.beans.Beanpublic StandardId getStandardId()
getStandardId in interface ObservableIdpublic FieldName getFieldName()
getFieldName in interface ObservableIdpublic ObservableSource getObservableSource()
getObservableSource in interface ObservableIdCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.