Class MarketDataRequirements
- java.lang.Object
-
- com.opengamma.strata.calc.marketdata.MarketDataRequirements
-
- All Implemented Interfaces:
org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class MarketDataRequirements extends Object implements org.joda.beans.ImmutableBean
Requirements for market data.This class is used as the input to
MarketDataFactory
. It includes the market data identifiers that the application needs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MarketDataRequirements.Meta
The meta-bean forMarketDataRequirements
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MarketDataRequirementsBuilder
builder()
Returns an empty mutable builder for building up a set of requirements.static MarketDataRequirements
combine(List<MarketDataRequirements> requirements)
Merges multiple sets of requirements into a single set.static MarketDataRequirements
empty()
Obtains an instance specifying that no market data is required.boolean
equals(Object obj)
ImmutableSet<MarketDataId<?>>
getNonObservables()
Gets keys identifying the market data values required for the calculations.ImmutableSet<ObservableId>
getObservables()
Gets keys identifying the market data values required for the calculations.ImmutableSet<Currency>
getOutputCurrencies()
Gets the currencies in the calculation results.ImmutableSet<ObservableId>
getTimeSeries()
Gets keys identifying the time series of market data values required for the calculations.int
hashCode()
static MarketDataRequirements.Meta
meta()
The meta-bean forMarketDataRequirements
.MarketDataRequirements.Meta
metaBean()
static MarketDataRequirements
of(CalculationRules calculationRules, List<? extends CalculationTarget> targets, List<Column> columns, ReferenceData refData)
Obtains an instance from a set of targets, columns and rules.static MarketDataRequirements
of(MarketDataId<?> id)
Obtains an instance containing a single market data ID.String
toString()
-
-
-
Method Detail
-
of
public static MarketDataRequirements of(CalculationRules calculationRules, List<? extends CalculationTarget> targets, List<Column> columns, ReferenceData refData)
Obtains an instance from a set of targets, columns and rules.The targets will typically be trades. The columns represent the measures to calculate.
- Parameters:
calculationRules
- the rules defining how the calculation is performedtargets
- the targets for which values of the measures will be calculatedcolumns
- the columns that will be calculatedrefData
- the reference data- Returns:
- the market data requirements
-
of
public static MarketDataRequirements of(MarketDataId<?> id)
Obtains an instance containing a single market data ID.- Parameters:
id
- the ID of the only market data value required- Returns:
- a set of requirements containing a single market data ID
-
empty
public static MarketDataRequirements empty()
Obtains an instance specifying that no market data is required.- Returns:
- a set of requirements specifying that no market data is required
-
builder
public static MarketDataRequirementsBuilder builder()
Returns an empty mutable builder for building up a set of requirements.- Returns:
- an empty mutable builder for building up a set of requirements
-
combine
public static MarketDataRequirements combine(List<MarketDataRequirements> requirements)
Merges multiple sets of requirements into a single set.- Parameters:
requirements
- market data requirements- Returns:
- a single set of requirements containing all the requirements from the input sets
-
meta
public static MarketDataRequirements.Meta meta()
The meta-bean forMarketDataRequirements
.- Returns:
- the meta-bean, not null
-
metaBean
public MarketDataRequirements.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getObservables
public ImmutableSet<ObservableId> getObservables()
Gets keys identifying the market data values required for the calculations.- Returns:
- the value of the property, not null
-
getNonObservables
public ImmutableSet<MarketDataId<?>> getNonObservables()
Gets keys identifying the market data values required for the calculations.- Returns:
- the value of the property, not null
-
getTimeSeries
public ImmutableSet<ObservableId> getTimeSeries()
Gets keys identifying the time series of market data values required for the calculations.- Returns:
- the value of the property, not null
-
getOutputCurrencies
public ImmutableSet<Currency> getOutputCurrencies()
Gets the currencies in the calculation results. The market data must include FX rates in the to allow conversion into the reporting currency. The FX rates must have the output currency as the base currency and the reporting currency as the counter currency.- Returns:
- the value of the property, not null
-
-