54 const QuantLib::ext::shared_ptr<Portfolio>& portfolio,
55 const QuantLib::ext::shared_ptr<NPVCube>& tradeExposureCube,
56 const QuantLib::ext::shared_ptr<NPVCube>& nettedExposureCube,
57 const Size allocatedTradeEpeIndex = 2,
const Size allocatedTradeEneIndex = 3,
58 const Size tradeEpeIndex = 0,
const Size tradeEneIndex = 1,
59 const Size nettingSetEpeIndex = 1,
const Size nettingSetEneIndex = 2);
68 virtual Real
calculateAllocatedEpe(
const string& tid,
const string& nid,
const Date& date,
const Size sample) = 0;
69 virtual Real
calculateAllocatedEne(
const string& tid,
const string& nid,
const Date& date,
const Size sample) = 0;
85 const QuantLib::ext::shared_ptr<Portfolio>& portfolio,
86 const QuantLib::ext::shared_ptr<NPVCube>& tradeExposureCube,
87 const QuantLib::ext::shared_ptr<NPVCube>& nettedExposureCube,
88 const QuantLib::ext::shared_ptr<NPVCube>& npvCube,
89 const Size allocatedTradeEpeIndex = 2,
const Size allocatedTradeEneIndex = 3,
90 const Size tradeEpeIndex = 0,
const Size tradeEneIndex = 1,
91 const Size nettingSetEpeIndex = 1,
const Size nettingSetEneIndex = 2);
94 virtual Real
calculateAllocatedEpe(
const string& tid,
const string& nid,
const Date& date,
const Size sample)
override;
95 virtual Real
calculateAllocatedEne(
const string& tid,
const string& nid,
const Date& date,
const Size sample)
override;
104 const QuantLib::ext::shared_ptr<Portfolio>& portfolio,
105 const QuantLib::ext::shared_ptr<NPVCube>& tradeExposureCube,
106 const QuantLib::ext::shared_ptr<NPVCube>& nettedExposureCube,
107 const QuantLib::ext::shared_ptr<NPVCube>& npvCube,
108 const Size allocatedTradeEpeIndex = 2,
const Size allocatedTradeEneIndex = 3,
109 const Size tradeEpeIndex = 0,
const Size tradeEneIndex = 1,
110 const Size nettingSetEpeIndex = 1,
const Size nettingSetEneIndex = 2);
113 virtual Real
calculateAllocatedEpe(
const string& tid,
const string& nid,
const Date& date,
const Size sample)
override;
114 virtual Real
calculateAllocatedEne(
const string& tid,
const string& nid,
const Date& date,
const Size sample)
override;
122 const QuantLib::ext::shared_ptr<Portfolio>& portfolio,
123 const QuantLib::ext::shared_ptr<NPVCube>& tradeExposureCube,
124 const QuantLib::ext::shared_ptr<NPVCube>& nettedExposureCube,
125 const QuantLib::ext::shared_ptr<NPVCube>& npvCube,
126 const map<string, Real>& tradeCva,
127 const map<string, Real>& tradeDva,
128 const map<string, Real>& nettingSetSumCva,
129 const map<string, Real>& nettingSetSumDva,
130 const Size allocatedTradeEpeIndex = 2,
const Size allocatedTradeEneIndex = 3,
131 const Size tradeEpeIndex = 0,
const Size tradeEneIndex = 1,
132 const Size nettingSetEpeIndex = 0,
const Size nettingSetEneIndex = 1);
135 virtual Real
calculateAllocatedEpe(
const string& tid,
const string& nid,
const Date& date,
const Size sample)
override;
136 virtual Real
calculateAllocatedEne(
const string& tid,
const string& nid,
const Date& date,
const Size sample)
override;
147 const QuantLib::ext::shared_ptr<Portfolio>& portfolio,
148 const QuantLib::ext::shared_ptr<NPVCube>& tradeExposureCube,
149 const QuantLib::ext::shared_ptr<NPVCube>& nettedExposureCube);
152 virtual Real
calculateAllocatedEpe(
const string& tid,
const string& nid,
const Date& date,
const Size sample)
override;
153 virtual Real
calculateAllocatedEne(
const string& tid,
const string& nid,
const Date& date,
const Size sample)
override;
Exposure allocator base class.
Size allocatedTradeEneIndex_
QuantLib::ext::shared_ptr< NPVCube > tradeExposureCube_
const QuantLib::ext::shared_ptr< NPVCube > & exposureCube()
virtual Real calculateAllocatedEpe(const string &tid, const string &nid, const Date &date, const Size sample)=0
virtual ~ExposureAllocator()
map< string, Real > nettingSetPositiveValueToday_
QuantLib::ext::shared_ptr< NPVCube > nettedExposureCube_
map< string, Real > nettingSetValueToday_
virtual void build()
Compute exposures along all paths and fill result structures.
QuantLib::ext::shared_ptr< Portfolio > portfolio_
Size allocatedTradeEpeIndex_
virtual Real calculateAllocatedEne(const string &tid, const string &nid, const Date &date, const Size sample)=0
map< string, Real > nettingSetNegativeValueToday_
virtual Real calculateAllocatedEpe(const string &tid, const string &nid, const Date &date, const Size sample) override
virtual Real calculateAllocatedEne(const string &tid, const string &nid, const Date &date, const Size sample) override
virtual Real calculateAllocatedEpe(const string &tid, const string &nid, const Date &date, const Size sample) override
map< string, Real > nettingSetValueToday_
map< string, Real > tradeValueToday_
virtual Real calculateAllocatedEne(const string &tid, const string &nid, const Date &date, const Size sample) override
virtual Real calculateAllocatedEpe(const string &tid, const string &nid, const Date &date, const Size sample) override
map< string, Real > nettingSetPositiveValueToday_
map< string, Real > tradeValueToday_
virtual Real calculateAllocatedEne(const string &tid, const string &nid, const Date &date, const Size sample) override
map< string, Real > nettingSetNegativeValueToday_
map< string, Real > nettingSetSumCva_
virtual Real calculateAllocatedEpe(const string &tid, const string &nid, const Date &date, const Size sample) override
map< string, Real > nettingSetSumDva_
map< string, Real > tradeDva_
map< string, Real > tradeCva_
map< string, Real > tradeValueToday_
virtual Real calculateAllocatedEne(const string &tid, const string &nid, const Date &date, const Size sample) override
std::ostream & operator<<(std::ostream &out, EquityReturnType t)
ExposureAllocator::AllocationMethod parseAllocationMethod(const string &s)
Convert text representation to ExposureAllocator::AllocationMethod.