Class CurveMarketDataFunction
- java.lang.Object
-
- com.opengamma.strata.measure.curve.CurveMarketDataFunction
-
- All Implemented Interfaces:
MarketDataFunction<Curve,CurveId>
public class CurveMarketDataFunction extends Object implements MarketDataFunction<Curve,CurveId>
Market data function that locates a curve by name.This function finds an instance of
Curve
using the name held inCurveId
.The curve is not actually built in this class, it is extracted from an existing
RatesCurveGroup
. The curve group must be available in theMarketDataLookup
passed to thebuild(com.opengamma.strata.market.curve.CurveId, com.opengamma.strata.calc.marketdata.MarketDataConfig, com.opengamma.strata.data.scenario.ScenarioMarketData, com.opengamma.strata.basics.ReferenceData)
method.
-
-
Constructor Summary
Constructors Constructor Description CurveMarketDataFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MarketDataBox<Curve>
build(CurveId id, MarketDataConfig config, ScenarioMarketData marketData, ReferenceData refData)
Builds and returns the market data identified by the ID.Class<CurveId>
getMarketDataIdType()
Returns the type of market data ID this function can handle.MarketDataRequirements
requirements(CurveId id, MarketDataConfig config)
Returns requirements representing the data needed to build the item of market data identified by the ID.
-
-
-
Method Detail
-
requirements
public MarketDataRequirements requirements(CurveId id, MarketDataConfig config)
Description copied from interface:MarketDataFunction
Returns requirements representing the data needed to build the item of market data identified by the ID.- Specified by:
requirements
in interfaceMarketDataFunction<Curve,CurveId>
- Parameters:
id
- an ID identifying an item of market dataconfig
- configuration specifying how market data values should be built- Returns:
- requirements representing the data needed to build the item of market data identified by the ID
-
build
public MarketDataBox<Curve> build(CurveId id, MarketDataConfig config, ScenarioMarketData marketData, ReferenceData refData)
Description copied from interface:MarketDataFunction
Builds and returns the market data identified by the ID.If the data cannot be built the result contains details of the problem.
- Specified by:
build
in interfaceMarketDataFunction<Curve,CurveId>
- Parameters:
id
- ID of the market data that should be builtconfig
- configuration specifying how the market data should be builtmarketData
- a set of market data including any data required to build the requested datarefData
- the reference data- Returns:
- built market data, or details of the problems that prevented building
-
getMarketDataIdType
public Class<CurveId> getMarketDataIdType()
Description copied from interface:MarketDataFunction
Returns the type of market data ID this function can handle.- Specified by:
getMarketDataIdType
in interfaceMarketDataFunction<Curve,CurveId>
- Returns:
- the type of market data ID this function can handle
-
-