public class PublisherUtils extends Object
| Constructor and Description |
|---|
PublisherUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
buildMatrixInterpolatedAndBaseTupleMaps(PublisherDataStructures publisherDataStructures,
PublisherContext context,
IParameterRetriever parameterRetriever,
IMaturityConverter saSbmMaturityConverter,
IInterpolator interpolator)
Uses the Sensitivities, Option maturity, Residual maturity and Sensitivity Currencies
to vectorise and interpolate tuples and fill in the interpolated tuple list and the trade base tuple list.
|
static void |
buildMatrixSensitivityAndCurrencyMaps(Collection<Object[]> tuples,
PublisherDataStructures publisherDataStructures,
PublisherStoreIndexes indexes,
PublisherContext context)
Takes a collection of tuples and fills in the FRTBTupleKey-to-Sensitivities, FRTBTupleKey-to-Option Maturities, FRTBTupleKey-to-Residual Maturities and FRTBTupleKey-to-Sensitivity Currency maps.
|
static void |
buildSingleValueAndTradeBaseTuples(Collection<Object[]> tuples,
PublisherDataStructures publisherDataStructures,
PublisherStoreIndexes indexes,
PublisherContext context)
Fills in store tuples and TradeBase tuples without performing vectorisation or interpolation.
|
static void |
buildVectorInterpolatedAndBaseTupleCurvatureMaps(PublisherDataStructures shiftUpData,
PublisherDataStructures shiftDownData,
PublisherContext context,
IParameterRetriever parameterRetriever) |
static void |
buildVectorInterpolatedAndBaseTupleMaps(PublisherDataStructures publisherDataStructures,
PublisherContext context,
IParameterRetriever parameterRetriever,
IMaturityConverter saSbmMaturityConverter,
IInterpolator interpolator)
Uses the Sensitivities and Sensitivity Currencies to vectorise and interpolate tuples and fill in the interpolated tuple list and the trade base tuple list.
|
static void |
buildVectorSensitivityAndCurrencyMaps(Collection<Object[]> tuples,
PublisherDataStructures publisherDataStructures,
PublisherStoreIndexes indexes,
PublisherContext context)
Takes a collection of tuples and fills in the FRTBTupleKey-to-Sensitivities and FRTBTupleKey-to-Sensitivity Currency maps.
|
static Object[] |
convertToTradeBaseTuple(Object[] tuple,
PublisherContext context)
Creates a tuple for the TradeBase store
|
static Object[] |
createTupleForStore(com.qfs.store.IDatastore datastore,
Map<String,Integer> translatorTupleFields,
Object[] initialTuple,
String store)
Creates a tuple for the required store, by attempting to extract the value for each store field from the input tuple
|
static Object[] |
createTupleForStore(com.qfs.store.IDatastore datastore,
Map<String,Integer> translatorTupleFields,
Object[] initialTuple,
String store,
Map<String,Object> fieldsToOverride)
Creates a tuple for the required store, by attempting to extract the value for each store field from the input tuple
|
static List<Object[]> |
extractDistinctTuples(Collection<Object[]> tuples)
Extracts unique tuples from an incoming list.
|
static void |
staticConfig(String preInterpolationLoggingLevel)
Static config to allow loading parameters from config files.
|
public static void staticConfig(String preInterpolationLoggingLevel)
preInterpolationLoggingLevel - The logging level to be used when treating tuples as pre-interpolated.public static Object[] createTupleForStore(com.qfs.store.IDatastore datastore, Map<String,Integer> translatorTupleFields, Object[] initialTuple, String store, Map<String,Object> fieldsToOverride)
datastore - The datastore objecttranslatorTupleFields - Map holding the fields that exist in the incoming tuple and their respective indexesinitialTuple - The initial tuple from the sourcestore - The store for which a tuple has to be createdfieldsToOverride - A map of any fields that have values set by the tuple publisher and those valuespublic static Object[] createTupleForStore(com.qfs.store.IDatastore datastore, Map<String,Integer> translatorTupleFields, Object[] initialTuple, String store)
datastore - The datastore objecttranslatorTupleFields - Map holding the fields that exist in the incoming tuple and their respective indexesinitialTuple - The initial tuple from the sourcestore - The store for which a tuple has to be createdpublic static void buildVectorSensitivityAndCurrencyMaps(Collection<Object[]> tuples, PublisherDataStructures publisherDataStructures, PublisherStoreIndexes indexes, PublisherContext context)
tuples - The incoming tuplespublisherDataStructures - The data structures to be used in the vectorisation, interpolation and tuple creation processes.indexes - The object containing all relevant tuple indexes.context - The object containing relevant publisher specific objects.public static void buildMatrixSensitivityAndCurrencyMaps(Collection<Object[]> tuples, PublisherDataStructures publisherDataStructures, PublisherStoreIndexes indexes, PublisherContext context)
tuples - The incoming tuplespublisherDataStructures - The data structures to be used in the vectorisation, interpolation and tuple creation processes.indexes - The object containing the relevant tuple indexes.context - The object containing relevant publisher specific objects.public static void buildVectorInterpolatedAndBaseTupleMaps(PublisherDataStructures publisherDataStructures, PublisherContext context, IParameterRetriever parameterRetriever, IMaturityConverter saSbmMaturityConverter, IInterpolator interpolator)
publisherDataStructures - The data structures to be used in the vectorisation, interpolation and tuple creation processes.context - The object containing relevant publisher specific objects.parameterRetriever - the parameter retriever used to return parameter store valuessaSbmMaturityConverter - The maturity converter to use for parsing tenors and calculating day countsinterpolator - Linear interpolator for tenorspublic static void buildVectorInterpolatedAndBaseTupleCurvatureMaps(PublisherDataStructures shiftUpData, PublisherDataStructures shiftDownData, PublisherContext context, IParameterRetriever parameterRetriever)
public static void buildMatrixInterpolatedAndBaseTupleMaps(PublisherDataStructures publisherDataStructures, PublisherContext context, IParameterRetriever parameterRetriever, IMaturityConverter saSbmMaturityConverter, IInterpolator interpolator)
publisherDataStructures - The data structures to be used in the vectorisation, interpolation and tuple creation processes.context - The object containing relevant publisher specific objects.parameterRetriever - the parameter retriever used to return parameter store valuessaSbmMaturityConverter - The maturity converter to use for parsing tenors and calculating day countsinterpolator - Linear interpolator for tenorspublic static Object[] convertToTradeBaseTuple(Object[] tuple, PublisherContext context)
tuple - The incoming tuple.context - The object containing relevant publisher specific objects.public static void buildSingleValueAndTradeBaseTuples(Collection<Object[]> tuples, PublisherDataStructures publisherDataStructures, PublisherStoreIndexes indexes, PublisherContext context)
tuples - The incoming tuples.publisherDataStructures - The data structures to be used in the vectorisation, interpolation and tuple creation processes.indexes - The object containing the relevant tuple indexes.context - The object containing relevant publisher specific objects.public static List<Object[]> extractDistinctTuples(Collection<Object[]> tuples)
tuples - The list of tuples that contains duplicates.Copyright © 2019. All rights reserved.