Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
zerosensitivityloader.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2023 Quaternion Risk Management Ltd
3 All rights reserved.
4
5 This file is part of ORE, a free-software/open-source library
6 for transparent pricing and risk analysis - http://opensourcerisk.org
7
8 ORE is free software: you can redistribute it and/or modify it
9 under the terms of the Modified BSD License. You should have received a
10 copy of the license along with this program.
11 The license is also available online at <http://opensourcerisk.org>
12
13 This program is distributed on the basis that it will form a useful
14 contribution to risk analytics and model standardisation, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17*/
18
19/*! \file orea/app/zerosensitivityloader.hpp
20 \brief Class for structured analytics warnings
21 \ingroup app
22*/
23
24#pragma once
25
26#include <map>
27#include <string>
28#include <vector>
29
30namespace ore {
31namespace analytics {
33public:
35 std::string riskFactor;
36 double delta;
37 std::string currency;
38 double baseNpv;
39 double shiftSize;
40 };
41
42 ZeroSensitivityLoader(const std::string& filename, const std::string& idColum = "TradeId",
43 const std::string& riskFactorColumn = "Factor_1", const std::string& deltaColumn = "Delta",
44 const std::string& currencyColumn = "Currency",
45 const std::string& baseNpvColumn = "Base NPV",
46 const std::string& shiftSizeColumn = "ShiftSize_1");
47
48 std::map<std::string, std::vector<ZeroSensitivity>> sensitivities() { return sensitivities_; }
49
50private:
51 std::map<std::string, std::vector<ZeroSensitivity>> sensitivities_;
52};
53} // namespace analytics
54} // namespace ore
std::map< std::string, std::vector< ZeroSensitivity > > sensitivities()
std::map< std::string, std::vector< ZeroSensitivity > > sensitivities_