Class IRMarketDataParser
java.lang.Object
net.finmath.smartcontract.simulation.scenariogeneration.IRMarketDataParser
Scenario Generator generates IRScenarios from a given json file
- Author:
- Peter Kohl-Landgraf, Christian Fries
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<IRMarketDataSet>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<IRMarketDataSet>getScenariosFromJsonFile(String fileName)Static method which parses a json file from its file name and converts it to a list of market data scenariosstatic List<IRMarketDataSet>getScenariosFromJsonString(String jsonString)Static method which parses a json file from its string content and converts it to a list of market data scenarios
-
Constructor Details
-
IRMarketDataParser
public IRMarketDataParser()
-
-
Method Details
-
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.
-
getScenariosFromJsonFile
public static final List<IRMarketDataSet> getScenariosFromJsonFile(String fileName) throws IOExceptionStatic 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
-
getScenariosFromJsonString
public static final List<IRMarketDataSet> getScenariosFromJsonString(String jsonString) throws UnsupportedEncodingException, IOExceptionStatic method which parses a json file from its string content and converts it to a list of market data scenarios- Parameters:
jsonString- Content of the json.- Returns:
- List of
IRMarketDataScenario - Throws:
IOException- File not foundUnsupportedEncodingException- UnsupportedEncodingException
-