Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
SensitivityCube Class Reference

SensitivityCube is a wrapper for an npvCube that gives easier access to the underlying cube elements. More...

#include <orea/cube/sensitivitycube.hpp>

+ Collaboration diagram for SensitivityCube:

Classes

struct  FactorData
 

Public Types

typedef std::pair< RiskFactorKey, RiskFactorKeycrossPair
 
typedef ShiftScenarioGenerator::ScenarioDescription ShiftScenarioDescription
 

Public Member Functions

 SensitivityCube (const QuantLib::ext::shared_ptr< NPVSensiCube > &cube, const std::vector< ShiftScenarioDescription > &scenarioDescriptions, const std::map< RiskFactorKey, QuantLib::Real > &targetShiftSizes, const std::map< RiskFactorKey, QuantLib::Real > &actualShiftSizes, const std::map< RiskFactorKey, ShiftScheme > &shiftSchemes)
 Constructor using a vector of scenario descriptions. More...
 
 SensitivityCube (const QuantLib::ext::shared_ptr< NPVSensiCube > &cube, const std::vector< std::string > &scenarioDescriptions, const std::map< RiskFactorKey, QuantLib::Real > &targetShiftSizes, const std::map< RiskFactorKey, QuantLib::Real > &actualshiftSizes, const std::map< RiskFactorKey, ShiftScheme > &shiftSchemes)
 Constructor using a vector of scenario description strings. More...
 

Inspectors

QuantLib::ext::shared_ptr< NPVSensiCubecube_
 
std::vector< ShiftScenarioDescriptionscenarioDescriptions_
 
std::map< RiskFactorKey, QuantLib::Real > targetShiftSizes_
 
std::map< RiskFactorKey, QuantLib::Real > actualShiftSizes_
 
std::map< RiskFactorKey, ShiftSchemeshiftSchemes_
 
std::set< RiskFactorKeyfactors_
 
std::map< std::string, QuantLib::Size > tradeIdx_
 
std::map< ShiftScenarioDescription, QuantLib::Size > scenarioIdx_
 
std::map< RiskFactorKey, FactorDataupFactors_
 
std::map< RiskFactorKey, FactorDatadownFactors_
 
std::map< crossPair, std::tuple< FactorData, FactorData, QuantLib::Size > > crossFactors_
 
std::map< QuantLib::Size, RiskFactorKeyupIndexToKey_
 
std::map< QuantLib::Size, RiskFactorKeydownIndexToKey_
 
std::map< QuantLib::Size, crossPaircrossIndexToKey_
 
const QuantLib::ext::shared_ptr< NPVSensiCube > & npvCube () const
 
const std::vector< ShiftScenarioDescription > & scenarioDescriptions () const
 
bool hasTrade (const std::string &tradeId) const
 Check if the cube has scenario NPVs for trade with ID tradeId. More...
 
const std::map< std::string, QuantLib::Size > & tradeIdx () const
 Return the map of up trade id's to index in cube. More...
 
RiskFactorKey upDownFactor (const Size index) const
 
crossPair crossFactor (const Size crossIndex) const
 
bool hasScenario (const ShiftScenarioDescription &scenarioDescription) const
 Check if the cube has scenario NPVs for scenario with description scenarioDescription. More...
 
std::string factorDescription (const RiskFactorKey &riskFactorKey) const
 
const std::set< RiskFactorKey > & factors () const
 Returns the set of risk factor keys for which a delta and gamma can be calculated. More...
 
const std::map< RiskFactorKey, SensitivityCube::FactorData > & upFactors () const
 Return the map of up risk factors to its factor data. More...
 
const std::map< RiskFactorKey, SensitivityCube::FactorData > & downFactors () const
 Return the map of down risk factors to its factor data. More...
 
const std::map< crossPair, std::tuple< SensitivityCube::FactorData, SensitivityCube::FactorData, QuantLib::Size > > & crossFactors () const
 Returns the set of pairs of risk factor keys for which a cross gamma is available. More...
 
QuantLib::Real targetShiftSize (const RiskFactorKey &riskFactorKey) const
 Returns the absolute target shift size for given risk factor key. More...
 
QuantLib::Real actualShiftSize (const RiskFactorKey &riskFactorKey) const
 Returns the absolute actual shift size for given risk factor key. More...
 
ShiftScheme shiftScheme (const RiskFactorKey &riskFactorKey) const
 Returns the shift scheme for given risk factor key. More...
 
QuantLib::Real npv (const std::string &tradeId) const
 Get the base NPV for trade with ID tradeId. More...
 
QuantLib::Real npv (QuantLib::Size id) const
 Get the NPV for trade given the index of trade in the cube. More...
 
QuantLib::Real delta (const Size tradeIdx, const RiskFactorKey &riskFactorKey) const
 Get the trade delta for trade with index tradeIdx and for the given risk factor key riskFactorKey. More...
 
QuantLib::Real delta (const std::string &tradeId, const RiskFactorKey &riskFactorKey) const
 Get the trade delta for trade with ID tradeId and for the given risk factor key riskFactorKey. More...
 
QuantLib::Real gamma (const Size tradeIdx, const RiskFactorKey &riskFactorKey) const
 Get the trade gamma for trade with index tradeIdx and for the given risk factor key riskFactorKey. More...
 
QuantLib::Real gamma (const std::string &tradeId, const RiskFactorKey &riskFactorKey) const
 Get the trade gamma for trade with ID tradeId and for the given risk factor key riskFactorKey. More...
 
QuantLib::Real crossGamma (const Size tradeIdx, const crossPair &riskFactorKeyPair) const
 
QuantLib::Real crossGamma (const std::string &tradeId, const crossPair &riskFactorKeyPair) const
 
QuantLib::Real crossGamma (QuantLib::Size tradeIdx, QuantLib::Size upIdx_1, QuantLib::Size upIdx_2, QuantLib::Size crossId, QuantLib::Real scaling1, QuantLib::Real scaling2) const
 Get the trade cross gamma for trade given the index of trade and risk factors in the cube. More...
 
std::set< RiskFactorKeyrelevantRiskFactors () const
 Get the relevant risk factors. More...
 
void initialise ()
 Initialise method used by the constructors. More...
 

Detailed Description

SensitivityCube is a wrapper for an npvCube that gives easier access to the underlying cube elements.

Definition at line 42 of file sensitivitycube.hpp.

Member Typedef Documentation

◆ crossPair

typedef std::pair<RiskFactorKey, RiskFactorKey> crossPair

Definition at line 45 of file sensitivitycube.hpp.

◆ ShiftScenarioDescription

Definition at line 46 of file sensitivitycube.hpp.

Constructor & Destructor Documentation

◆ SensitivityCube() [1/2]

SensitivityCube ( const QuantLib::ext::shared_ptr< NPVSensiCube > &  cube,
const std::vector< ShiftScenarioDescription > &  scenarioDescriptions,
const std::map< RiskFactorKey, QuantLib::Real > &  targetShiftSizes,
const std::map< RiskFactorKey, QuantLib::Real > &  actualShiftSizes,
const std::map< RiskFactorKey, ShiftScheme > &  shiftSchemes 
)

Constructor using a vector of scenario descriptions.

Definition at line 59 of file sensitivitycube.cpp.

65 actualShiftSizes_(actualShiftSizes), shiftSchemes_(shiftSchemes) {
66 initialise();
67}
std::map< RiskFactorKey, ShiftScheme > shiftSchemes_
void initialise()
Initialise method used by the constructors.
std::vector< ShiftScenarioDescription > scenarioDescriptions_
std::map< RiskFactorKey, QuantLib::Real > targetShiftSizes_
QuantLib::ext::shared_ptr< NPVSensiCube > cube_
const std::vector< ShiftScenarioDescription > & scenarioDescriptions() const
std::map< RiskFactorKey, QuantLib::Real > actualShiftSizes_
+ Here is the call graph for this function:

◆ SensitivityCube() [2/2]

SensitivityCube ( const QuantLib::ext::shared_ptr< NPVSensiCube > &  cube,
const std::vector< std::string > &  scenarioDescriptions,
const std::map< RiskFactorKey, QuantLib::Real > &  targetShiftSizes,
const std::map< RiskFactorKey, QuantLib::Real > &  actualshiftSizes,
const std::map< RiskFactorKey, ShiftScheme > &  shiftSchemes 
)

Constructor using a vector of scenario description strings.

Definition at line 69 of file sensitivitycube.cpp.

74 : cube_(cube), targetShiftSizes_(targetShiftSizes), actualShiftSizes_(actualShiftSizes),
75 shiftSchemes_(shiftSchemes) {
76
77 // Populate scenarioDescriptions_ from string descriptions
79 for (const auto& des : scenarioDescriptions) {
81 }
82
83 initialise();
84}
ShiftScenarioGenerator::ScenarioDescription ShiftScenarioDescription
+ Here is the call graph for this function:

Member Function Documentation

◆ npvCube()

const QuantLib::ext::shared_ptr< NPVSensiCube > & npvCube ( ) const

Definition at line 72 of file sensitivitycube.hpp.

72{ return cube_; }

◆ scenarioDescriptions()

const std::vector< ShiftScenarioDescription > & scenarioDescriptions ( ) const

Definition at line 73 of file sensitivitycube.hpp.

73{ return scenarioDescriptions_; }
+ Here is the caller graph for this function:

◆ hasTrade()

bool hasTrade ( const std::string &  tradeId) const

Check if the cube has scenario NPVs for trade with ID tradeId.

Definition at line 147 of file sensitivitycube.cpp.

147{ return tradeIdx_.count(tradeId) > 0; }
std::map< std::string, QuantLib::Size > tradeIdx_

◆ tradeIdx()

const std::map< std::string, QuantLib::Size > & tradeIdx ( ) const

Return the map of up trade id's to index in cube.

Definition at line 80 of file sensitivitycube.hpp.

80{ return cube_->idsAndIndexes(); };
+ Here is the caller graph for this function:

◆ upDownFactor()

RiskFactorKey upDownFactor ( const Size  index) const

Return factor for given up or down scenario index or None if given index is not an up or down scenario (to be reviewed)

Definition at line 149 of file sensitivitycube.cpp.

149 {
150 if (auto k = upIndexToKey_.find(index); k != upIndexToKey_.end()) {
151 return k->second;
152 } else if (auto k = downIndexToKey_.find(index); k != downIndexToKey_.end()) {
153 return k->second;
154 } else {
155 return RiskFactorKey();
156 }
157}
std::map< QuantLib::Size, RiskFactorKey > downIndexToKey_
std::map< QuantLib::Size, RiskFactorKey > upIndexToKey_

◆ crossFactor()

SensitivityCube::crossPair crossFactor ( const Size  crossIndex) const

Return factor for given cross scenario index or None if given index is not a cross scenario (to be reviewed)

Definition at line 159 of file sensitivitycube.cpp.

159 {
160 if (auto k = crossIndexToKey_.find(crossIndex); k != crossIndexToKey_.end()) {
161 return k->second;
162 } else {
163 return std::make_pair(RiskFactorKey(), RiskFactorKey());
164 }
165}
std::map< QuantLib::Size, crossPair > crossIndexToKey_

◆ hasScenario()

bool hasScenario ( const ShiftScenarioDescription scenarioDescription) const

Check if the cube has scenario NPVs for scenario with description scenarioDescription.

Definition at line 167 of file sensitivitycube.cpp.

167 {
168 return scenarioIdx_.find(scenarioDescription) != scenarioIdx_.end();
169}
std::map< ShiftScenarioDescription, QuantLib::Size > scenarioIdx_

◆ factorDescription()

std::string factorDescription ( const RiskFactorKey riskFactorKey) const

Get the description for the risk factor key riskFactorKey Returns the result of ShiftScenarioGenerator::ScenarioDescription::factor1()

Definition at line 171 of file sensitivitycube.cpp.

171 {
172 Size scenarioIdx = index(riskFactorKey, upFactors_).index;
173 return scenarioDescriptions_[scenarioIdx].factor1();
174}
std::map< RiskFactorKey, FactorData > upFactors_

◆ factors()

const set< RiskFactorKey > & factors ( ) const

Returns the set of risk factor keys for which a delta and gamma can be calculated.

Definition at line 176 of file sensitivitycube.cpp.

176{ return factors_; }
std::set< RiskFactorKey > factors_

◆ upFactors()

const std::map< RiskFactorKey, SensitivityCube::FactorData > & upFactors ( ) const

Return the map of up risk factors to its factor data.

Definition at line 99 of file sensitivitycube.hpp.

99{ return upFactors_; };

◆ downFactors()

const std::map< RiskFactorKey, SensitivityCube::FactorData > & downFactors ( ) const

Return the map of down risk factors to its factor data.

Definition at line 102 of file sensitivitycube.hpp.

102{ return downFactors_; };
std::map< RiskFactorKey, FactorData > downFactors_

◆ crossFactors()

const std::map< SensitivityCube::crossPair, tuple< SensitivityCube::FactorData, SensitivityCube::FactorData, Size > > & crossFactors ( ) const

Returns the set of pairs of risk factor keys for which a cross gamma is available.

Definition at line 179 of file sensitivitycube.cpp.

179 {
180 return crossFactors_;
181}
std::map< crossPair, std::tuple< FactorData, FactorData, QuantLib::Size > > crossFactors_
+ Here is the caller graph for this function:

◆ targetShiftSize()

Real targetShiftSize ( const RiskFactorKey riskFactorKey) const

Returns the absolute target shift size for given risk factor key.

Definition at line 183 of file sensitivitycube.cpp.

183 {
184 auto it = targetShiftSizes_.find(riskFactorKey);
185 QL_REQUIRE(it != targetShiftSizes_.end(),
186 "Risk factor, " << riskFactorKey << ", was not found in the target shift sizes.");
187 return it->second;
188}
+ Here is the caller graph for this function:

◆ actualShiftSize()

Real actualShiftSize ( const RiskFactorKey riskFactorKey) const

Returns the absolute actual shift size for given risk factor key.

Definition at line 190 of file sensitivitycube.cpp.

190 {
191 auto it = actualShiftSizes_.find(riskFactorKey);
192 QL_REQUIRE(it != actualShiftSizes_.end(),
193 "Risk factor, " << riskFactorKey << ", was not found in the actual shift sizes.");
194 return it->second;
195}
+ Here is the caller graph for this function:

◆ shiftScheme()

ShiftScheme shiftScheme ( const RiskFactorKey riskFactorKey) const

Returns the shift scheme for given risk factor key.

Definition at line 197 of file sensitivitycube.cpp.

197 {
198 auto it = shiftSchemes_.find(riskFactorKey);
199 QL_REQUIRE(it != shiftSchemes_.end(), "Risk factor, " << riskFactorKey << ", was not found in the shift schemes.");
200 return it->second;
201}

◆ npv() [1/2]

Real npv ( const std::string &  tradeId) const

Get the base NPV for trade with ID tradeId.

Definition at line 203 of file sensitivitycube.cpp.

203{ return cube_->getT0(tradeId, 0); }

◆ npv() [2/2]

QuantLib::Real npv ( QuantLib::Size  id) const

Get the NPV for trade given the index of trade in the cube.

◆ delta() [1/2]

Real delta ( const Size  tradeIdx,
const RiskFactorKey riskFactorKey 
) const

Get the trade delta for trade with index tradeIdx and for the given risk factor key riskFactorKey.

Definition at line 219 of file sensitivitycube.cpp.

219 {
220 auto s = shiftSchemes_.find(riskFactorKey);
221 QL_REQUIRE(s != shiftSchemes_.end(),
222 "SensitivityCube::delta(" << tradeIdx << ", " << riskFactorKey << "): no shift scheme stored.");
223 if (s->second == ShiftScheme::Forward) {
224 auto fd = index(riskFactorKey, upFactors_);
225 return (cube_->get(tradeIdx, fd.index) - cube_->getT0(tradeIdx, 0)) * scaling(fd);
226 } else if (s->second == ShiftScheme::Backward) {
227 auto fd = index(riskFactorKey, downFactors_);
228 return (cube_->getT0(tradeIdx, 0) - cube_->get(tradeIdx, fd.index)) * scaling(fd);
229 } else if (s->second == ShiftScheme::Central) {
230 auto fdup = index(riskFactorKey, upFactors_);
231 auto fddown = index(riskFactorKey, downFactors_);
232 return (cube_->get(tradeIdx, fdup.index) - cube_->get(tradeIdx, fddown.index)) / 2.0 * scaling(fdup);
233 } else {
234 QL_FAIL("SensitivityCube::delta(" << tradeIdx << ", " << riskFactorKey << "): unknown shift scheme '"
235 << s->second << "'");
236 }
237}
const std::map< std::string, QuantLib::Size > & tradeIdx() const
Return the map of up trade id's to index in cube.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delta() [2/2]

Real delta ( const std::string &  tradeId,
const RiskFactorKey riskFactorKey 
) const

Get the trade delta for trade with ID tradeId and for the given risk factor key riskFactorKey.

Definition at line 239 of file sensitivitycube.cpp.

239 {
240 return delta(cube_->getTradeIndex(tradeId), riskFactorKey);
241}
QuantLib::Real delta(const Size tradeIdx, const RiskFactorKey &riskFactorKey) const
Get the trade delta for trade with index tradeIdx and for the given risk factor key riskFactorKey.
+ Here is the call graph for this function:

◆ gamma() [1/2]

Real gamma ( const Size  tradeIdx,
const RiskFactorKey riskFactorKey 
) const

Get the trade gamma for trade with index tradeIdx and for the given risk factor key riskFactorKey.

Definition at line 243 of file sensitivitycube.cpp.

243 {
244 auto fdup = index(riskFactorKey, upFactors_);
245 auto fddown = index(riskFactorKey, downFactors_);
246 Real baseNpv = cube_->getT0(tradeIdx, 0);
247 Real upNpv = cube_->get(tradeIdx, fdup.index);
248 Real downNpv = cube_->get(tradeIdx, fddown.index);
249 return (upNpv - 2.0 * baseNpv + downNpv) * std::pow(scaling(fdup), 2);
250}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gamma() [2/2]

Real gamma ( const std::string &  tradeId,
const RiskFactorKey riskFactorKey 
) const

Get the trade gamma for trade with ID tradeId and for the given risk factor key riskFactorKey.

Definition at line 252 of file sensitivitycube.cpp.

252 {
253 return gamma(cube_->getTradeIndex(tradeId), riskFactorKey);
254}
QuantLib::Real gamma(const Size tradeIdx, const RiskFactorKey &riskFactorKey) const
Get the trade gamma for trade with index tradeIdx and for the given risk factor key riskFactorKey.
+ Here is the call graph for this function:

◆ crossGamma() [1/3]

Real crossGamma ( const Size  tradeIdx,
const crossPair riskFactorKeyPair 
) const

Get the trade cross gamma for trade with ID tradeId and for the given risk factor key pair riskFactorKeyPair

Definition at line 269 of file sensitivitycube.cpp.

269 {
270 FactorData upFd_1, upFd_2;
271 Size crossIdx;
272 std::tie(upFd_1, upFd_2, crossIdx) = index(riskFactorKeyPair, crossFactors_);
273 return crossGamma(tradeIdx, upFd_1.index, upFd_2.index, crossIdx, scaling(upFd_1), scaling(upFd_2));
274}
QuantLib::Real crossGamma(const Size tradeIdx, const crossPair &riskFactorKeyPair) const
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crossGamma() [2/3]

Real crossGamma ( const std::string &  tradeId,
const crossPair riskFactorKeyPair 
) const

Get the trade cross gamma for trade with ID tradeId and for the given risk factor key pair riskFactorKeyPair

Definition at line 276 of file sensitivitycube.cpp.

276 {
277 return crossGamma(cube_->getTradeIndex(tradeId), riskFactorKeyPair);
278}
+ Here is the call graph for this function:

◆ crossGamma() [3/3]

QuantLib::Real crossGamma ( QuantLib::Size  tradeIdx,
QuantLib::Size  upIdx_1,
QuantLib::Size  upIdx_2,
QuantLib::Size  crossId,
QuantLib::Real  scaling1,
QuantLib::Real  scaling2 
) const

Get the trade cross gamma for trade given the index of trade and risk factors in the cube.

Definition at line 256 of file sensitivitycube.cpp.

258 {
259 // Approximate f_{xy}|(x,y) by
260 // ([f_{x}|(x,y + dy)] - [f_{x}|(x,y)]) / dy
261 // ([f(x + dx,y + dy) - f(x, y + dy)] - [f(x + dx,y) - f(x,y)]) / (dx dy)
262 Real baseNpv = cube_->getT0(id, 0);
263 Real upNpv_1 = cube_->get(id, upIdx_1);
264 Real upNpv_2 = cube_->get(id, upIdx_2);
265 Real crossNpv = cube_->get(id, crossIdx);
266 return (crossNpv - upNpv_1 - upNpv_2 + baseNpv) * scaling1 * scaling2;
267}

◆ relevantRiskFactors()

std::set< RiskFactorKey > relevantRiskFactors ( ) const

Get the relevant risk factors.

Definition at line 280 of file sensitivitycube.cpp.

280 {
281 std::set<RiskFactorKey> result;
282 for (auto const i : cube_->relevantScenarios()) {
283 result.insert(scenarioDescriptions_[i].key1());
285 result.insert(scenarioDescriptions_[i].key2());
286 }
287 return result;
288}

◆ initialise()

void initialise ( )
private

Initialise method used by the constructors.

Definition at line 86 of file sensitivitycube.cpp.

86 {
87
89 "Expected the first scenario in the sensitivity cube to be of type 'Base'");
90
91 // Populate the scenario lookup map
92 crossPair factorPair;
93 std::map<crossPair, Size> crossFactors;
94 for (Size i = 0; i < scenarioDescriptions_.size(); i++) {
95 auto des = scenarioDescriptions_[i];
96 FactorData fd;
97 // Don't info add for base - missing from maps
98 if (des.type() != ShiftScenarioDescription::Type::Base) {
99 fd.index = i;
100 fd.targetShiftSize = targetShiftSize(des.key1());
101 fd.actualShiftSize = actualShiftSize(des.key1());
102 fd.rfkey = des.key1();
103 fd.factorDesc = deconstructFactor(des.factor1()).second;
104 }
105 scenarioIdx_[des] = i;
106
107 // Populate factors_ = list of factors for which we can calculate a delta/gamma
108 switch (des.type()) {
110 QL_REQUIRE(upFactors_.count(des.key1()) == 0, "Cannot have multiple up factors with "
111 "the same risk factor key["
112 << des.key1() << "]");
113 factors_.insert(des.key1());
114 upFactors_[des.key1()] = fd;
115 upIndexToKey_[fd.index] = des.key1();
116 break;
118 QL_REQUIRE(downFactors_.count(des.key1()) == 0, "Cannot have multiple down factors with "
119 "the same risk factor key ["
120 << des.key1() << "]");
121 factors_.insert(des.key1());
122 downFactors_[des.key1()] = fd;
123 downIndexToKey_[fd.index] = des.key1();
124 break;
126 factorPair = make_pair(des.key1(), des.key2());
127 QL_REQUIRE(crossFactors.count(factorPair) == 0, "Cannot have multiple cross factors with "
128 "the same risk factor key pair ["
129 << des.key1() << ", " << des.key2() << "]");
130 crossFactors[factorPair] = i;
131 crossIndexToKey_[i] = factorPair;
132 break;
133 default:
134 // Do nothing
135 break;
136 }
137 }
138
139 // Add each cross factor to crossFactors with index of the two contributing factors
140 for (auto cf : crossFactors) {
141 FactorData id_1 = index(cf.first.first, upFactors_);
142 FactorData id_2 = index(cf.first.second, upFactors_);
143 crossFactors_[cf.first] = make_tuple(id_1, id_2, cf.second);
144 }
145}
QuantLib::Real actualShiftSize(const RiskFactorKey &riskFactorKey) const
Returns the absolute actual shift size for given risk factor key.
QuantLib::Real targetShiftSize(const RiskFactorKey &riskFactorKey) const
Returns the absolute target shift size for given risk factor key.
const std::map< crossPair, std::tuple< SensitivityCube::FactorData, SensitivityCube::FactorData, QuantLib::Size > > & crossFactors() const
Returns the set of pairs of risk factor keys for which a cross gamma is available.
std::pair< RiskFactorKey, RiskFactorKey > crossPair
pair< RiskFactorKey, string > deconstructFactor(const string &factor)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ cube_

QuantLib::ext::shared_ptr<NPVSensiCube> cube_
private

Definition at line 154 of file sensitivitycube.hpp.

◆ scenarioDescriptions_

std::vector<ShiftScenarioDescription> scenarioDescriptions_
private

Definition at line 155 of file sensitivitycube.hpp.

◆ targetShiftSizes_

std::map<RiskFactorKey, QuantLib::Real> targetShiftSizes_
private

Definition at line 156 of file sensitivitycube.hpp.

◆ actualShiftSizes_

std::map<RiskFactorKey, QuantLib::Real> actualShiftSizes_
private

Definition at line 157 of file sensitivitycube.hpp.

◆ shiftSchemes_

std::map<RiskFactorKey, ShiftScheme> shiftSchemes_
private

Definition at line 158 of file sensitivitycube.hpp.

◆ factors_

std::set<RiskFactorKey> factors_
private

Definition at line 162 of file sensitivitycube.hpp.

◆ tradeIdx_

std::map<std::string, QuantLib::Size> tradeIdx_
private

Definition at line 166 of file sensitivitycube.hpp.

◆ scenarioIdx_

std::map<ShiftScenarioDescription, QuantLib::Size> scenarioIdx_
private

Definition at line 167 of file sensitivitycube.hpp.

◆ upFactors_

std::map<RiskFactorKey, FactorData> upFactors_
private

Definition at line 169 of file sensitivitycube.hpp.

◆ downFactors_

std::map<RiskFactorKey, FactorData> downFactors_
private

Definition at line 169 of file sensitivitycube.hpp.

◆ crossFactors_

std::map<crossPair, std::tuple<FactorData, FactorData, QuantLib::Size> > crossFactors_
private

Definition at line 172 of file sensitivitycube.hpp.

◆ upIndexToKey_

std::map<QuantLib::Size, RiskFactorKey> upIndexToKey_
private

Definition at line 175 of file sensitivitycube.hpp.

◆ downIndexToKey_

std::map<QuantLib::Size, RiskFactorKey> downIndexToKey_
private

Definition at line 176 of file sensitivitycube.hpp.

◆ crossIndexToKey_

std::map<QuantLib::Size, crossPair> crossIndexToKey_
private

Definition at line 177 of file sensitivitycube.hpp.