Allow for interpretation of how data is stored within cube and AggregationScenarioData. More...
#include <orea/cube/cubeinterpretation.hpp>
Public Member Functions | |
CubeInterpretation (const bool storeFlows, const bool withCloseOutLag, const QuantLib::Handle< AggregationScenarioData > &aggregationScenarioData=QuantLib::Handle< AggregationScenarioData >(), const QuantLib::ext::shared_ptr< DateGrid > &dateGrid=nullptr, const Size storeCreditStateNPVs=0, const bool flipViewXVA=false) | |
bool | storeFlows () const |
inspectors More... | |
bool | withCloseOutLag () const |
const QuantLib::Handle< AggregationScenarioData > & | aggregationScenarioData () const |
const QuantLib::ext::shared_ptr< DateGrid > & | dateGrid () const |
Size | storeCreditStateNPVs () const |
bool | flipViewXVA () const |
Size | requiredNpvCubeDepth () const |
npv cube depth that is at least required to work with this interpretation More... | |
Size | defaultDateNpvIndex () const |
indices in depth direction, might be Null<Size>() if not applicable More... | |
Size | closeOutDateNpvIndex () const |
Size | mporFlowsIndex () const |
Size | creditStateNPVsIndex () const |
Real | getGenericValue (const QuantLib::ext::shared_ptr< NPVCube > &cube, Size tradeIdx, Size dateIdx, Size sampleIdx, Size depth) const |
Retrieve an arbitrary value from the Cube (user needs to know the precise location within depth axis) More... | |
Real | getDefaultNpv (const QuantLib::ext::shared_ptr< NPVCube > &cube, Size tradeIdx, Size dateIdx, Size sampleIdx) const |
Retrieve the default date NPV from the Cube. More... | |
Real | getCloseOutNpv (const QuantLib::ext::shared_ptr< NPVCube > &cube, Size tradeIdx, Size dateIdx, Size sampleIdx) const |
Retrieve the close-out date NPV from the Cube. More... | |
Real | getMporPositiveFlows (const QuantLib::ext::shared_ptr< NPVCube > &cube, Size tradeIdx, Size dateIdx, Size sampleIdx) const |
Retrieve the aggregate value of Margin Period of Risk positive cashflows from the Cube. More... | |
Real | getMporNegativeFlows (const QuantLib::ext::shared_ptr< NPVCube > &cube, Size tradeIdx, Size dateIdx, Size sampleIdx) const |
Retrieve the aggregate value of Margin Period of Risk negative cashflows from the Cube. More... | |
Real | getMporFlows (const QuantLib::ext::shared_ptr< NPVCube > &cube, Size tradeIdx, Size dateIdx, Size sampleIdx) const |
Retrieve the aggregate value of Margin Period of Risk cashflows from the Cube. More... | |
Real | getDefaultAggregationScenarioData (const AggregationScenarioDataType &dataType, Size dateIdx, Size sampleIdx, const std::string &qualifier="") const |
Retrieve a (default date) simulated risk factor value from AggregationScenarioData. More... | |
Real | getCloseOutAggregationScenarioData (const AggregationScenarioDataType &dataType, Size dateIdx, Size sampleIdx, const std::string &qualifier="") const |
Retrieve a (default date) simulated risk factor value from AggregationScenarioData. More... | |
Size | getMporCalendarDays (const QuantLib::ext::shared_ptr< NPVCube > &cube, Size dateIdx) const |
Number of Calendar Days between a given default date and corresponding close-out date. More... | |
Private Attributes | |
bool | storeFlows_ |
bool | withCloseOutLag_ |
QuantLib::Handle< AggregationScenarioData > | aggregationScenarioData_ |
QuantLib::ext::shared_ptr< DateGrid > | dateGrid_ |
Size | storeCreditStateNPVs_ |
bool | flipViewXVA_ |
Size | requiredCubeDepth_ |
Size | defaultDateNpvIndex_ = QuantLib::Null<Size>() |
Size | closeOutDateNpvIndex_ = QuantLib::Null<Size>() |
Size | mporFlowsIndex_ = QuantLib::Null<Size>() |
Size | creditStateNPVsIndex_ = QuantLib::Null<Size>() |
Allow for interpretation of how data is stored within cube and AggregationScenarioData.
Definition at line 44 of file cubeinterpretation.hpp.
CubeInterpretation | ( | const bool | storeFlows, |
const bool | withCloseOutLag, | ||
const QuantLib::Handle< AggregationScenarioData > & | aggregationScenarioData = QuantLib::Handle<AggregationScenarioData>() , |
||
const QuantLib::ext::shared_ptr< DateGrid > & | dateGrid = nullptr , |
||
const Size | storeCreditStateNPVs = 0 , |
||
const bool | flipViewXVA = false |
||
) |
Definition at line 26 of file cubeinterpretation.cpp.
bool storeFlows | ( | ) | const |
bool withCloseOutLag | ( | ) | const |
Definition at line 56 of file cubeinterpretation.cpp.
const QuantLib::Handle< AggregationScenarioData > & aggregationScenarioData | ( | ) | const |
Definition at line 60 of file cubeinterpretation.cpp.
const QuantLib::ext::shared_ptr< DateGrid > & dateGrid | ( | ) | const |
Definition at line 64 of file cubeinterpretation.cpp.
Size storeCreditStateNPVs | ( | ) | const |
Definition at line 58 of file cubeinterpretation.cpp.
bool flipViewXVA | ( | ) | const |
Definition at line 66 of file cubeinterpretation.cpp.
Size requiredNpvCubeDepth | ( | ) | const |
npv cube depth that is at least required to work with this interpretation
Definition at line 68 of file cubeinterpretation.cpp.
Size defaultDateNpvIndex | ( | ) | const |
indices in depth direction, might be Null<Size>() if not applicable
Definition at line 70 of file cubeinterpretation.cpp.
Size closeOutDateNpvIndex | ( | ) | const |
Definition at line 71 of file cubeinterpretation.cpp.
Size mporFlowsIndex | ( | ) | const |
Definition at line 72 of file cubeinterpretation.cpp.
Size creditStateNPVsIndex | ( | ) | const |
Definition at line 73 of file cubeinterpretation.cpp.
Real getGenericValue | ( | const QuantLib::ext::shared_ptr< NPVCube > & | cube, |
Size | tradeIdx, | ||
Size | dateIdx, | ||
Size | sampleIdx, | ||
Size | depth | ||
) | const |
Retrieve an arbitrary value from the Cube (user needs to know the precise location within depth axis)
Definition at line 75 of file cubeinterpretation.cpp.
Real getDefaultNpv | ( | const QuantLib::ext::shared_ptr< NPVCube > & | cube, |
Size | tradeIdx, | ||
Size | dateIdx, | ||
Size | sampleIdx | ||
) | const |
Retrieve the default date NPV from the Cube.
Definition at line 84 of file cubeinterpretation.cpp.
Real getCloseOutNpv | ( | const QuantLib::ext::shared_ptr< NPVCube > & | cube, |
Size | tradeIdx, | ||
Size | dateIdx, | ||
Size | sampleIdx | ||
) | const |
Retrieve the close-out date NPV from the Cube.
Definition at line 89 of file cubeinterpretation.cpp.
Real getMporPositiveFlows | ( | const QuantLib::ext::shared_ptr< NPVCube > & | cube, |
Size | tradeIdx, | ||
Size | dateIdx, | ||
Size | sampleIdx | ||
) | const |
Retrieve the aggregate value of Margin Period of Risk positive cashflows from the Cube.
Definition at line 98 of file cubeinterpretation.cpp.
Real getMporNegativeFlows | ( | const QuantLib::ext::shared_ptr< NPVCube > & | cube, |
Size | tradeIdx, | ||
Size | dateIdx, | ||
Size | sampleIdx | ||
) | const |
Retrieve the aggregate value of Margin Period of Risk negative cashflows from the Cube.
Definition at line 112 of file cubeinterpretation.cpp.
Real getMporFlows | ( | const QuantLib::ext::shared_ptr< NPVCube > & | cube, |
Size | tradeIdx, | ||
Size | dateIdx, | ||
Size | sampleIdx | ||
) | const |
Retrieve the aggregate value of Margin Period of Risk cashflows from the Cube.
Definition at line 126 of file cubeinterpretation.cpp.
Real getDefaultAggregationScenarioData | ( | const AggregationScenarioDataType & | dataType, |
Size | dateIdx, | ||
Size | sampleIdx, | ||
const std::string & | qualifier = "" |
||
) | const |
Retrieve a (default date) simulated risk factor value from AggregationScenarioData.
Definition at line 131 of file cubeinterpretation.cpp.
Real getCloseOutAggregationScenarioData | ( | const AggregationScenarioDataType & | dataType, |
Size | dateIdx, | ||
Size | sampleIdx, | ||
const std::string & | qualifier = "" |
||
) | const |
Retrieve a (default date) simulated risk factor value from AggregationScenarioData.
Definition at line 138 of file cubeinterpretation.cpp.
Size getMporCalendarDays | ( | const QuantLib::ext::shared_ptr< NPVCube > & | cube, |
Size | dateIdx | ||
) | const |
Number of Calendar Days between a given default date and corresponding close-out date.
Definition at line 152 of file cubeinterpretation.cpp.
|
private |
Definition at line 101 of file cubeinterpretation.hpp.
|
private |
Definition at line 102 of file cubeinterpretation.hpp.
|
private |
Definition at line 103 of file cubeinterpretation.hpp.
|
private |
Definition at line 104 of file cubeinterpretation.hpp.
|
private |
Definition at line 105 of file cubeinterpretation.hpp.
|
private |
Definition at line 106 of file cubeinterpretation.hpp.
|
private |
Definition at line 108 of file cubeinterpretation.hpp.
|
private |
Definition at line 109 of file cubeinterpretation.hpp.
|
private |
Definition at line 110 of file cubeinterpretation.hpp.
|
private |
Definition at line 111 of file cubeinterpretation.hpp.
|
private |
Definition at line 112 of file cubeinterpretation.hpp.