java.lang.Object
net.finmath.smartcontract.simulation.scenariogeneration.IRMarketDataParser

public class IRMarketDataParser extends Object
Scenario Generator generates IRScenarios from a given json file
Author:
Peter Kohl-Landgraf, Christian Fries
  • Constructor Details

    • IRMarketDataParser

      public IRMarketDataParser()
  • Method Details

    • getScenariosFromCSVFile

      public static List<IRMarketDataSet> getScenariosFromCSVFile(String fileName) throws IOException
      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 IOException
      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 found
      UnsupportedEncodingException - UnsupportedEncodingException
    • getScenariosFromJsonString

      public static final List<IRMarketDataSet> getScenariosFromJsonString(String jsonString) throws UnsupportedEncodingException, IOException
      Static 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 found
      UnsupportedEncodingException - UnsupportedEncodingException