Class CalibrationParserDataItems
java.lang.Object
net.finmath.smartcontract.valuation.marketdata.curvecalibration.CalibrationParserDataItems
- All Implemented Interfaces:
CalibrationParser
Parses calibration data points and converts it to calibration specs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CalibrationDatasetgetCalibrationDataSetFromXML(String xmlString, List<CalibrationDataItem.Spec> dataSpecs) static List<CalibrationDataset> getScenariosFromCSVFile(String fileName) Static method which parses a csv file - using jackson csv mapper - and converts it to a list of market data scenariosstatic List<CalibrationDataset> getScenariosFromJsonFile(String fileName) Static method which parses a json file from its file name and converts it to a list of market data scenariosstatic final List<CalibrationDataset> getScenariosFromJsonString(String content) Static method which parses a json file from its string content and converts it to a list of market data scenariosparse(Stream<CalibrationDataItem> datapoints)
-
Constructor Details
-
CalibrationParserDataItems
public CalibrationParserDataItems()
-
-
Method Details
-
parse
- Specified by:
parsein interfaceCalibrationParser
-
getScenariosFromJsonFile
Static method which parses a json file from its file name and converts it to a list of market data scenarios- Parameters:
fileName- Name of the input file.- Returns:
- List of
IRMarketDataScenario - Throws:
IOException- File not foundUnsupportedEncodingException- UnsupportedEncodingException
-
getCalibrationDataSetFromXML
public static CalibrationDataset getCalibrationDataSetFromXML(String xmlString, List<CalibrationDataItem.Spec> dataSpecs) -
getScenariosFromCSVFile
Static method which parses a csv file - using jackson csv mapper - and converts it to a list of market data scenarios- Parameters:
fileName- Name of the input file.- Returns:
- List of
IRMarketDataScenario - Throws:
IOException- Thrown if market data file is not found.
-
getScenariosFromJsonString
Static method which parses a json file from its string content and converts it to a list of market data scenarios- Parameters:
content- Content of the json.- Returns:
- List of
IRMarketDataScenario - Throws:
IllegalArgumentException- If the JSON format is incorrect.
-