Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
OutputParameters Class Reference

Traditional ORE input via ore.xml and various files, output into files. More...

#include <orea/app/inputparameters.hpp>

+ Collaboration diagram for OutputParameters:

Public Member Functions

 OutputParameters (const QuantLib::ext::shared_ptr< Parameters > &params)
 
const std::map< std::string, std::string > & fileNameMap ()
 map internal report name to the configured external file name More...
 
std::string outputFileName (const std::string &internalName, const std::string &suffix)
 

Private Attributes

std::map< std::string, std::string > fileNameMap_
 
std::string npvOutputFileName_
 
std::string cashflowOutputFileName_
 
std::string curvesOutputFileName_
 
std::string scenarioDumpFileName_
 
std::string scenarioOutputName_
 
std::string cubeFileName_
 
std::string mktCubeFileName_
 
std::string rawCubeFileName_
 
std::string netCubeFileName_
 
std::string dimEvolutionFileName_
 
std::vector< std::string > dimRegressionFileNames_
 
std::string sensitivityFileName_
 
std::string sensitivityScenarioFileName_
 
std::string parSensitivityFileName_
 
std::string jacobiFileName_
 
std::string jacobiInverseFileName_
 
std::string stressTestFileName_
 
std::string xvaStressTestFileName_
 
std::string stressZeroScenarioDataFileName_
 
std::string varFileName_
 
std::string parConversionOutputFileName_
 
std::string parConversionJacobiFileName_
 
std::string parConversionJacobiInverseFileName_
 
std::string pnlOutputFileName_
 
std::string parStressTestConversionFile_
 
std::string pnlExplainOutputFileName_
 
std::string zeroToParShiftFile_
 

Detailed Description

Traditional ORE input via ore.xml and various files, output into files.

Definition at line 1072 of file inputparameters.hpp.

Constructor & Destructor Documentation

◆ OutputParameters()

OutputParameters ( const QuantLib::ext::shared_ptr< Parameters > &  params)

Definition at line 591 of file inputparameters.cpp.

591 {
592 LOG("OutputFileNameMap called");
593 npvOutputFileName_ = params->get("npv", "outputFileName", false);
594 cashflowOutputFileName_ = params->get("cashflow", "outputFileName", false);
595 curvesOutputFileName_ = params->get("curves", "outputFileName", false);
596 scenarioDumpFileName_ = params->get("simulation", "scenariodump", false);
597 scenarioOutputName_ = params->get("scenario", "scenarioOutputFile", false);
598 cubeFileName_ = params->get("simulation", "cubeFile", false);
599 mktCubeFileName_ = params->get("simulation", "aggregationScenarioDataFileName", false);
600 rawCubeFileName_ = params->get("xva", "rawCubeOutputFile", false);
601 netCubeFileName_ = params->get("xva", "netCubeOutputFile", false);
602 dimEvolutionFileName_ = params->get("xva", "dimEvolutionFile", false);
603 std::string tmp = params->get("xva", "dimRegressionFiles", false);
604 if (tmp != "")
606 sensitivityFileName_ = params->get("sensitivity", "sensitivityOutputFile", false);
607 parSensitivityFileName_ = params->get("sensitivity", "parSensitivityOutputFile", false);
608 jacobiFileName_ = params->get("sensitivity", "jacobiOutputFile", false);
609 jacobiInverseFileName_ = params->get("sensitivity", "jacobiInverseOutputFile", false);
610 sensitivityScenarioFileName_ = params->get("sensitivity", "scenarioOutputFile", false);
611 stressTestFileName_ = params->get("stress", "scenarioOutputFile", false);
612 stressZeroScenarioDataFileName_ = params->get("stress", "stressZeroScenarioDataFile", false);
613 xvaStressTestFileName_ = params->get("xvaStress", "scenarioOutputFile", false);
614 varFileName_ = params->get("parametricVar", "outputFile", false);
615 if (varFileName_.empty())
616 varFileName_ = params->get("historicalSimulationVar", "outputFile", false);
617 parConversionOutputFileName_ = params->get("zeroToParSensiConversion", "outputFile", false);
618 parConversionJacobiFileName_ = params->get("zeroToParSensiConversion", "jacobiOutputFile", false);
619 parConversionJacobiInverseFileName_ = params->get("zeroToParSensiConversion", "jacobiInverseOutputFile", false);
620 pnlOutputFileName_ = params->get("pnl", "outputFileName", false);
621 parStressTestConversionFile_ = params->get("parStressConversion", "stressZeroScenarioDataFile", false);
622 pnlExplainOutputFileName_ = params->get("pnlExplain", "outputFileName", false);
623
624 zeroToParShiftFile_ = params->get("zeroToParShift", "parShiftsFile", false);
625 // map internal report name to output file name
629 fileNameMap_["cube"] = cubeFileName_;
630 fileNameMap_["scenariodata"] = mktCubeFileName_;
632 fileNameMap_["rawcube"] = rawCubeFileName_;
633 fileNameMap_["netcube"] = netCubeFileName_;
634 fileNameMap_["dim_evolution"] = dimEvolutionFileName_;
635 fileNameMap_["sensitivity"] = sensitivityFileName_;
636 fileNameMap_["sensitivity_scenario"] = sensitivityScenarioFileName_;
637 fileNameMap_["par_sensitivity"] = parSensitivityFileName_;
638 fileNameMap_["jacobi"] = jacobiFileName_;
639 fileNameMap_["jacobi_inverse"] = jacobiInverseFileName_;
641 fileNameMap_["stress_ZeroStressData"] = stressZeroScenarioDataFileName_;
642 fileNameMap_["xva_stress"] = xvaStressTestFileName_;
643 fileNameMap_["var"] = varFileName_;
644 fileNameMap_["parConversionSensitivity"] = parConversionOutputFileName_;
645 fileNameMap_["parConversionJacobi"] = parConversionJacobiFileName_;
646 fileNameMap_["parConversionJacobi_inverse"] = parConversionJacobiInverseFileName_;
648 fileNameMap_["parStress_ZeroStressData"] = parStressTestConversionFile_;
650
651 fileNameMap_["parshifts"] = zeroToParShiftFile_;
652 vector<Size> dimOutputGridPoints;
653 tmp = params->get("xva", "dimOutputGridPoints", false);
654 if (tmp != "")
655 dimOutputGridPoints = parseListOfValues<Size>(tmp, parseInteger);
656 QL_REQUIRE(dimOutputGridPoints.size() == dimRegressionFileNames_.size(),
657 "dim regression output grid points size (" << dimOutputGridPoints.size() << ") "
658 << "and file names size (" << dimRegressionFileNames_.size() << ") do not match");
659 for (Size i = 0; i < dimRegressionFileNames_.size(); ++i)
660 fileNameMap_["dim_regression_" + std::to_string(i)] = dimRegressionFileNames_[i];
661
662 tmp = params->get("xva", "creditMigrationTimeSteps", false);
663 if (tmp != "") {
664 auto ts = parseListOfValues<Size>(tmp, &parseInteger);
665 for (auto const& t : ts) {
666 fileNameMap_["credit_migration_" + std::to_string(t)] =
667 params->get("xva", "creditMigrationOutputFiles") + "_" + std::to_string(t);
668 }
669 }
670
671 LOG("OutputFileNameMap complete");
672}
std::map< std::string, std::string > fileNameMap_
std::vector< std::string > dimRegressionFileNames_
#define LOG(text)
std::vector< string > parseListOfValues(string s, const char escape, const char delim, const char quote)
+ Here is the call graph for this function:

Member Function Documentation

◆ fileNameMap()

const std::map< std::string, std::string > & fileNameMap ( )

map internal report name to the configured external file name

Definition at line 1076 of file inputparameters.hpp.

1076{ return fileNameMap_; }

◆ outputFileName()

std::string outputFileName ( const std::string &  internalName,
const std::string &  suffix 
)

Definition at line 674 of file inputparameters.cpp.

674 {
675 auto it = fileNameMap_.find(internalName);
676 if (it == fileNameMap_.end() || it->second == "")
677 return internalName + "." + suffix;
678 else
679 return it->second; // contains suffix
680}

Member Data Documentation

◆ fileNameMap_

std::map<std::string, std::string> fileNameMap_
private

Definition at line 1080 of file inputparameters.hpp.

◆ npvOutputFileName_

std::string npvOutputFileName_
private

Definition at line 1081 of file inputparameters.hpp.

◆ cashflowOutputFileName_

std::string cashflowOutputFileName_
private

Definition at line 1082 of file inputparameters.hpp.

◆ curvesOutputFileName_

std::string curvesOutputFileName_
private

Definition at line 1083 of file inputparameters.hpp.

◆ scenarioDumpFileName_

std::string scenarioDumpFileName_
private

Definition at line 1084 of file inputparameters.hpp.

◆ scenarioOutputName_

std::string scenarioOutputName_
private

Definition at line 1085 of file inputparameters.hpp.

◆ cubeFileName_

std::string cubeFileName_
private

Definition at line 1086 of file inputparameters.hpp.

◆ mktCubeFileName_

std::string mktCubeFileName_
private

Definition at line 1087 of file inputparameters.hpp.

◆ rawCubeFileName_

std::string rawCubeFileName_
private

Definition at line 1088 of file inputparameters.hpp.

◆ netCubeFileName_

std::string netCubeFileName_
private

Definition at line 1089 of file inputparameters.hpp.

◆ dimEvolutionFileName_

std::string dimEvolutionFileName_
private

Definition at line 1090 of file inputparameters.hpp.

◆ dimRegressionFileNames_

std::vector<std::string> dimRegressionFileNames_
private

Definition at line 1091 of file inputparameters.hpp.

◆ sensitivityFileName_

std::string sensitivityFileName_
private

Definition at line 1092 of file inputparameters.hpp.

◆ sensitivityScenarioFileName_

std::string sensitivityScenarioFileName_
private

Definition at line 1093 of file inputparameters.hpp.

◆ parSensitivityFileName_

std::string parSensitivityFileName_
private

Definition at line 1094 of file inputparameters.hpp.

◆ jacobiFileName_

std::string jacobiFileName_
private

Definition at line 1095 of file inputparameters.hpp.

◆ jacobiInverseFileName_

std::string jacobiInverseFileName_
private

Definition at line 1096 of file inputparameters.hpp.

◆ stressTestFileName_

std::string stressTestFileName_
private

Definition at line 1097 of file inputparameters.hpp.

◆ xvaStressTestFileName_

std::string xvaStressTestFileName_
private

Definition at line 1098 of file inputparameters.hpp.

◆ stressZeroScenarioDataFileName_

std::string stressZeroScenarioDataFileName_
private

Definition at line 1099 of file inputparameters.hpp.

◆ varFileName_

std::string varFileName_
private

Definition at line 1100 of file inputparameters.hpp.

◆ parConversionOutputFileName_

std::string parConversionOutputFileName_
private

Definition at line 1101 of file inputparameters.hpp.

◆ parConversionJacobiFileName_

std::string parConversionJacobiFileName_
private

Definition at line 1102 of file inputparameters.hpp.

◆ parConversionJacobiInverseFileName_

std::string parConversionJacobiInverseFileName_
private

Definition at line 1103 of file inputparameters.hpp.

◆ pnlOutputFileName_

std::string pnlOutputFileName_
private

Definition at line 1104 of file inputparameters.hpp.

◆ parStressTestConversionFile_

std::string parStressTestConversionFile_
private

Definition at line 1105 of file inputparameters.hpp.

◆ pnlExplainOutputFileName_

std::string pnlExplainOutputFileName_
private

Definition at line 1106 of file inputparameters.hpp.

◆ zeroToParShiftFile_

std::string zeroToParShiftFile_
private

Definition at line 1107 of file inputparameters.hpp.