public final class BuiltScenarioMarketData extends Object implements ScenarioMarketData, ImmutableBean
The MarketDataFactory
can be used to build market data from external
sources and by calibration. This implementation of ScenarioMarketData
provides the result, and includes all the market data, such as quotes and curves.
This implementation differs from ImmutableScenarioMarketData
because it
stores the failures that occurred during the build process.
These errors are exposed to users when data is queried.
Modifier and Type | Class and Description |
---|---|
static class |
BuiltScenarioMarketData.Meta
The meta-bean for
BuiltScenarioMarketData . |
Modifier and Type | Method and Description |
---|---|
boolean |
containsValue(MarketDataId<?> id)
Checks if this market data contains a value for the specified identifier.
|
boolean |
equals(Object obj) |
<T> Set<MarketDataId<T>> |
findIds(MarketDataName<T> name)
Finds the market data identifiers associated with the specified name.
|
<T> Optional<MarketDataBox<T>> |
findValue(MarketDataId<T> id)
Finds the market data value associated with the specified identifier.
|
Set<MarketDataId<?>> |
getIds()
Gets the market data identifiers.
|
int |
getScenarioCount()
Gets the number of scenarios.
|
LocalDateDoubleTimeSeries |
getTimeSeries(ObservableId id)
Gets the time-series associated with the specified identifier, empty if not found.
|
ImmutableMap<MarketDataId<?>,Failure> |
getTimeSeriesFailures()
Gets the failures that occurred when building time series of market data values.
|
Set<ObservableId> |
getTimeSeriesIds()
Gets the time-series identifiers.
|
ImmutableScenarioMarketData |
getUnderlying()
Gets the underlying market data.
|
MarketDataBox<LocalDate> |
getValuationDate()
Gets a box that can provide the valuation date of each scenario.
|
<T> MarketDataBox<T> |
getValue(MarketDataId<T> id)
Gets the market data value associated with the specified identifier.
|
ImmutableMap<MarketDataId<?>,Failure> |
getValueFailures()
Gets the failures when building single market data values.
|
int |
hashCode() |
static BuiltScenarioMarketData.Meta |
meta()
The meta-bean for
BuiltScenarioMarketData . |
BuiltScenarioMarketData.Meta |
metaBean() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
combinedWith, getScenarioValue, of, of, of, scenario, scenarios, withPerturbation, withValue
property, propertyNames
public MarketDataBox<LocalDate> getValuationDate()
ScenarioMarketData
getValuationDate
in interface ScenarioMarketData
public int getScenarioCount()
ScenarioMarketData
getScenarioCount
in interface ScenarioMarketData
public boolean containsValue(MarketDataId<?> id)
ScenarioMarketData
containsValue
in interface ScenarioMarketData
id
- the identifier to findpublic <T> MarketDataBox<T> getValue(MarketDataId<T> id)
ScenarioMarketData
The result is a box that provides data for all scenarios. If this market data instance contains the identifier, the value will be returned. Otherwise, an exception will be thrown.
getValue
in interface ScenarioMarketData
T
- the type of the market data valueid
- the identifier to findpublic <T> Optional<MarketDataBox<T>> findValue(MarketDataId<T> id)
ScenarioMarketData
The result is a box that provides data for all scenarios. If this market data instance contains the identifier, the value will be returned. Otherwise, an empty optional will be returned.
findValue
in interface ScenarioMarketData
T
- the type of the market data valueid
- the identifier to findpublic Set<MarketDataId<?>> getIds()
ScenarioMarketData
getIds
in interface ScenarioMarketData
public <T> Set<MarketDataId<T>> findIds(MarketDataName<T> name)
ScenarioMarketData
This returns the unique identifiers that refer to the specified name. There may be more than one identifier associated with a name as the name is not unique.
findIds
in interface ScenarioMarketData
T
- the type of the market data valuename
- the name to findpublic Set<ObservableId> getTimeSeriesIds()
ScenarioMarketData
Time series are not affected by scenarios, therefore there is a single time-series for each identifier which is shared between all scenarios.
getTimeSeriesIds
in interface ScenarioMarketData
public LocalDateDoubleTimeSeries getTimeSeries(ObservableId id)
ScenarioMarketData
Time series are not affected by scenarios, therefore there is a single time-series for each identifier which is shared between all scenarios.
getTimeSeries
in interface ScenarioMarketData
id
- the identifier to findpublic static BuiltScenarioMarketData.Meta meta()
BuiltScenarioMarketData
.public BuiltScenarioMarketData.Meta metaBean()
public ImmutableScenarioMarketData getUnderlying()
public ImmutableMap<MarketDataId<?>,Failure> getValueFailures()
public ImmutableMap<MarketDataId<?>,Failure> getTimeSeriesFailures()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.