26#include <ql/shared_ptr.hpp>
64 QuantLib::ext::shared_ptr<ore::data::Market> market,
const std::string& configuration,
65 QuantLib::ext::shared_ptr<Portfolio> portfolio);
68 QuantLib::ext::shared_ptr<ore::data::Portfolio> portfolio,
69 QuantLib::ext::shared_ptr<ore::data::Market> market = QuantLib::ext::shared_ptr<ore::data::Market>(),
71 const bool includePastCashflows =
false);
75 QuantLib::ext::shared_ptr<ore::data::Market> market,
76 const std::string& configuration,
77 const std::string& baseCcy,
78 const Date& horizon = Date::maxDate());
82 const bool continueOnError =
false);
85 const std::string& tradeId);
88 const std::string& nettingSetId);
93 const std::string& nettingSetId);
96 const std::string& nettingSetId);
99 QuantLib::ext::shared_ptr<Portfolio> portfolio, QuantLib::ext::shared_ptr<PostProcess> postProcess);
104 const std::vector<QuantLib::ext::shared_ptr<SensitivityCube>>& sensitivityCubes,
105 QuantLib::Real outputThreshold = 0.0);
108 QuantLib::Real outputThreshold = 0.0, QuantLib::Size outputPrecision = 2);
111 const std::map<RiskFactorKey, QuantLib::Real>& shiftSizes,
112 const std::map<RiskFactorKey, QuantLib::Real>& baseValues,
113 const std::map<RiskFactorKey, std::string>& keyToFactor);
116 QuantLib::ext::shared_ptr<ore::data::Portfolio> portfolio,
117 QuantLib::ext::shared_ptr<Market> market,
const std::string& baseCurrency,
118 const std::size_t precision = 6);
121 const set<string>& quoteNames,
bool returnAll);
130 const std::map<std::string, std::string>& nettingSetMap = std::map<std::string, std::string>());
142 std::map<
NettingSetDetails, std::pair<std::string, SimmResults>>>& simmResultsMap,
143 const QuantLib::ext::shared_ptr<ore::data::Report> report,
const bool hasNettingSetDetails =
false,
144 const std::string& simmResultCcy =
"",
const std::string& simmCalcCcyCall =
"",
145 const std::string& simmCalcCcyPost =
"",
const std::string& reportCcy =
"",
146 QuantLib::Real fxSpot = 1.0, QuantLib::Real outputThreshold = 0.005);
149 std::map<
NettingSetDetails, std::map<std::string, SimmResults>>>& simmResultsMap,
150 const QuantLib::ext::shared_ptr<ore::data::Report> report,
const bool hasNettingSetDetails =
false,
151 const std::string& simmResultCcy =
"",
const std::string& simmCalcCcyCall =
"",
152 const std::string& simmCalcCcyPost =
"",
const std::string& reportCcy =
"",
153 const bool isFinalSimm =
true, QuantLib::Real fxSpot = 1.0, QuantLib::Real outputThreshold = 0.005);
157 const QuantLib::ext::shared_ptr<ore::data::Report>& dataReport,
158 const bool hasNettingSetDetails =
false);
161 virtual void writeCrifReport(
const QuantLib::ext::shared_ptr<ore::data::Report>& report,
165 const std::vector<ore::analytics::RiskFactorKey>& keys,
166 QuantLib::Size numPaths,
const std::vector<QuantLib::Date>& dates,
170 const std::vector<ore::analytics::RiskFactorKey>& keys,
171 QuantLib::Size numPaths,
const std::vector<QuantLib::Date>& dates,
178 virtual void writeStockSplitReport(
const QuantLib::ext::shared_ptr<ore::analytics::Scenario>& baseScenario,
179 const QuantLib::ext::shared_ptr<ore::analytics::HistoricalScenarioLoader>& hsloader,
180 const QuantLib::ext::shared_ptr<ore::data::AdjustmentFactors>& adjFactors,
181 const QuantLib::ext::shared_ptr<ore::data::Report>& report);
184 const QuantLib::ext::shared_ptr<ore::data::Report>& report);
187 QuantLib::ext::shared_ptr<HistoricalScenarioGenerator>& hsgen,
188 const QuantLib::ext::shared_ptr<ore::analytics::ScenarioSimMarket>& simMarket,
189 const QuantLib::ext::shared_ptr<ore::analytics::ScenarioSimMarketParameters>& simMarketParams,
190 QuantLib::ext::shared_ptr<ore::data::Report> histScenDetailsReport, QuantLib::ext::shared_ptr<ore::data::Report> statReport,
191 QuantLib::ext::shared_ptr<ore::data::Report> distReport, QuantLib::Size distSteps = Null<Size>());
195 std::map<
NettingSetDetails, std::pair<std::string, IMScheduleResults>>>& finalResultsMap,
196 const QuantLib::ext::shared_ptr<Report> report,
const bool hasNettingSetDetails =
false,
197 const std::string& simmResultCcy =
"",
const std::string& reportCcy =
"", QuantLib::Real fxSpot = 1.0,
198 QuantLib::Real outputThreshold = 0.005);
200 virtual void writeIMScheduleTradeReport(
const std::map<std::string, std::vector<IMScheduleCalculator::IMScheduleTradeData>>& tradeResults,
201 const QuantLib::ext::shared_ptr<ore::data::Report> report,
202 const bool hasNettingSetDetails =
false);
205 const ext::shared_ptr<InMemoryReport>& t0NpvReport,
206 const ext::shared_ptr<InMemoryReport>& t0NpvLaggedReport,
207 const ext::shared_ptr<InMemoryReport>& t1NpvLaggedReport,
208 const ext::shared_ptr<InMemoryReport>& t1NpvReport,
209 const ext::shared_ptr<InMemoryReport>& t0CashFlowReport,
210 const Date& startDate,
const Date& endDate,
211 const std::string& baseCurrency,
212 const ext::shared_ptr<ore::data::Market>& market,
const std::string& configuration,
213 const ext::shared_ptr<Portfolio>& portfolio);
218 const QuantLib::Date& actualDate = Date());
Container for storing simulated market data.
Write ORE outputs to reports.
void addMarketDatum(ore::data::Report &report, const ore::data::MarketDatum &md, const QuantLib::Date &actualDate=Date())
void writeHistoricalScenarios(const QuantLib::ext::shared_ptr< HistoricalScenarioLoader > &hsloader, const QuantLib::ext::shared_ptr< ore::data::Report > &report)
virtual void writeStockSplitReport(const QuantLib::ext::shared_ptr< ore::analytics::Scenario > &baseScenario, const QuantLib::ext::shared_ptr< ore::analytics::HistoricalScenarioLoader > &hsloader, const QuantLib::ext::shared_ptr< ore::data::AdjustmentFactors > &adjFactors, const QuantLib::ext::shared_ptr< ore::data::Report > &report)
virtual void writeHistoricalScenarioDetails(const QuantLib::ext::shared_ptr< ore::analytics::HistoricalScenarioGenerator > &generator, ore::data::Report &report)
virtual void writeScenarioStatistics(const QuantLib::ext::shared_ptr< ore::analytics::ScenarioGenerator > &generator, const std::vector< ore::analytics::RiskFactorKey > &keys, QuantLib::Size numPaths, const std::vector< QuantLib::Date > &dates, ore::data::Report &report)
virtual void writeSIMMReport(const std::map< SimmConfiguration::SimmSide, std::map< NettingSetDetails, std::map< std::string, SimmResults > > > &simmResultsMap, const QuantLib::ext::shared_ptr< ore::data::Report > report, const bool hasNettingSetDetails=false, const std::string &simmResultCcy="", const std::string &simmCalcCcyCall="", const std::string &simmCalcCcyPost="", const std::string &reportCcy="", const bool isFinalSimm=true, QuantLib::Real fxSpot=1.0, QuantLib::Real outputThreshold=0.005)
const std::string & nullString() const
virtual void writeMarketData(ore::data::Report &report, const QuantLib::ext::shared_ptr< ore::data::Loader > &loader, const QuantLib::Date &asof, const set< string > "eNames, bool returnAll)
virtual void writeSIMMReport(const std::map< SimmConfiguration::SimmSide, std::map< NettingSetDetails, std::pair< std::string, SimmResults > > > &simmResultsMap, const QuantLib::ext::shared_ptr< ore::data::Report > report, const bool hasNettingSetDetails=false, const std::string &simmResultCcy="", const std::string &simmCalcCcyCall="", const std::string &simmCalcCcyPost="", const std::string &reportCcy="", QuantLib::Real fxSpot=1.0, QuantLib::Real outputThreshold=0.005)
virtual void writePnlReport(ore::data::Report &report, const ext::shared_ptr< InMemoryReport > &t0NpvReport, const ext::shared_ptr< InMemoryReport > &t0NpvLaggedReport, const ext::shared_ptr< InMemoryReport > &t1NpvLaggedReport, const ext::shared_ptr< InMemoryReport > &t1NpvReport, const ext::shared_ptr< InMemoryReport > &t0CashFlowReport, const Date &startDate, const Date &endDate, const std::string &baseCurrency, const ext::shared_ptr< ore::data::Market > &market, const std::string &configuration, const ext::shared_ptr< Portfolio > &portfolio)
virtual void writeAdditionalResultsReport(ore::data::Report &report, QuantLib::ext::shared_ptr< ore::data::Portfolio > portfolio, QuantLib::ext::shared_ptr< Market > market, const std::string &baseCurrency, const std::size_t precision=6)
virtual void writeSIMMData(const ore::analytics::Crif &simmData, const QuantLib::ext::shared_ptr< ore::data::Report > &dataReport, const bool hasNettingSetDetails=false)
Write the SIMM data report i.e. the netted CRIF records used in a SIMM calculation.
virtual void writeCube(ore::data::Report &report, const QuantLib::ext::shared_ptr< NPVCube > &cube, const std::map< std::string, std::string > &nettingSetMap=std::map< std::string, std::string >())
virtual void writeIMScheduleTradeReport(const std::map< std::string, std::vector< IMScheduleCalculator::IMScheduleTradeData > > &tradeResults, const QuantLib::ext::shared_ptr< ore::data::Report > report, const bool hasNettingSetDetails=false)
virtual void writeNettingSetCvaSensitivities(ore::data::Report &report, QuantLib::ext::shared_ptr< PostProcess > postProcess, const std::string &nettingSetId)
ReportWriter(const std::string &nullString="#NA")
virtual void writeCashflowNpv(ore::data::Report &report, const ore::data::InMemoryReport &cashflowReport, QuantLib::ext::shared_ptr< ore::data::Market > market, const std::string &configuration, const std::string &baseCcy, const Date &horizon=Date::maxDate())
virtual void writeCrifReport(const QuantLib::ext::shared_ptr< ore::data::Report > &report, const ore::analytics::Crif &crifRecords)
Write out CRIF records to a report.
virtual void writeNettingSetExposures(ore::data::Report &report, QuantLib::ext::shared_ptr< PostProcess > postProcess, const std::string &nettingSetId)
virtual void writeDividends(ore::data::Report &report, const QuantLib::ext::shared_ptr< ore::data::Loader > &loader)
virtual void writeCurves(ore::data::Report &report, const std::string &configID, const DateGrid &grid, const TodaysMarketParameters &marketConfig, const QuantLib::ext::shared_ptr< Market > &market, const bool continueOnError=false)
virtual void writeSensitivityReport(ore::data::Report &report, const QuantLib::ext::shared_ptr< SensitivityStream > &ss, QuantLib::Real outputThreshold=0.0, QuantLib::Size outputPrecision=2)
virtual void writeTradeExposures(ore::data::Report &report, QuantLib::ext::shared_ptr< PostProcess > postProcess, const std::string &tradeId)
virtual void writeScenarioReport(ore::data::Report &report, const std::vector< QuantLib::ext::shared_ptr< SensitivityCube > > &sensitivityCubes, QuantLib::Real outputThreshold=0.0)
virtual void writeCashflow(ore::data::Report &report, const std::string &baseCurrency, QuantLib::ext::shared_ptr< ore::data::Portfolio > portfolio, QuantLib::ext::shared_ptr< ore::data::Market > market=QuantLib::ext::shared_ptr< ore::data::Market >(), const std::string &configuration=ore::data::Market::defaultConfiguration, const bool includePastCashflows=false)
virtual void writeSensitivityConfigReport(ore::data::Report &report, const std::map< RiskFactorKey, QuantLib::Real > &shiftSizes, const std::map< RiskFactorKey, QuantLib::Real > &baseValues, const std::map< RiskFactorKey, std::string > &keyToFactor)
virtual void writeFixings(ore::data::Report &report, const QuantLib::ext::shared_ptr< ore::data::Loader > &loader)
virtual void writeXVA(ore::data::Report &report, const string &allocationMethod, QuantLib::ext::shared_ptr< Portfolio > portfolio, QuantLib::ext::shared_ptr< PostProcess > postProcess)
virtual void writeScenarioDistributions(const QuantLib::ext::shared_ptr< ore::analytics::ScenarioGenerator > &generator, const std::vector< ore::analytics::RiskFactorKey > &keys, QuantLib::Size numPaths, const std::vector< QuantLib::Date > &dates, QuantLib::Size distSteps, ore::data::Report &report)
virtual void writeNpv(ore::data::Report &report, const std::string &baseCurrency, QuantLib::ext::shared_ptr< ore::data::Market > market, const std::string &configuration, QuantLib::ext::shared_ptr< Portfolio > portfolio)
virtual void writePricingStats(ore::data::Report &report, const QuantLib::ext::shared_ptr< Portfolio > &portfolio)
virtual void writeIMScheduleSummaryReport(const std::map< SimmConfiguration::SimmSide, std::map< NettingSetDetails, std::pair< std::string, IMScheduleResults > > > &finalResultsMap, const QuantLib::ext::shared_ptr< Report > report, const bool hasNettingSetDetails=false, const std::string &simmResultCcy="", const std::string &reportCcy="", QuantLib::Real fxSpot=1.0, QuantLib::Real outputThreshold=0.005)
void writeHistoricalScenarioDistributions(QuantLib::ext::shared_ptr< HistoricalScenarioGenerator > &hsgen, const QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarket > &simMarket, const QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParameters > &simMarketParams, QuantLib::ext::shared_ptr< ore::data::Report > histScenDetailsReport, QuantLib::ext::shared_ptr< ore::data::Report > statReport, QuantLib::ext::shared_ptr< ore::data::Report > distReport, QuantLib::Size distSteps=Null< Size >())
virtual void writeAggregationScenarioData(ore::data::Report &report, const AggregationScenarioData &data)
virtual void writeNettingSetColva(ore::data::Report &report, QuantLib::ext::shared_ptr< PostProcess > postProcess, const std::string &nettingSetId)
SimmSide
Enum indicating the relevant side of the SIMM calculation.
static const string defaultConfiguration
Struct for holding CRIF records.
Struct for holding a CRIF record.
Class for calculating SIMM.
Matrix generator(const Matrix &t, const Real horizon)
Open Risk Engine setup and analytics choice.
Exposure aggregation and XVA calculation.
Scenario generator base classes.
holds a grid of NPVs for a list of trades under various scenarios
Base class for sensitivity record streamer.
Class for holding SIMM results.