#include <orea/engine/historicalsensipnlcalculator.hpp>
|
using | TradePnLStore = std::vector< std::vector< QuantLib::Real > > |
|
|
| PNLCalculator (ore::data::TimePeriod pnlPeriod) |
|
virtual | ~PNLCalculator () |
|
virtual void | writePNL (QuantLib::Size scenarioIdx, bool isCall, const RiskFactorKey &key_1, QuantLib::Real shift_1, QuantLib::Real delta, QuantLib::Real gamma, QuantLib::Real deltaPnl, Real gammaPnl, const RiskFactorKey &key_2=RiskFactorKey(), QuantLib::Real shift_2=0.0, const std::string &tradeId="") |
|
const bool | isInTimePeriod (QuantLib::Date startDate, QuantLib::Date endDate) |
|
void | populatePNLs (const std::vector< QuantLib::Real > &allPnls, const std::vector< QuantLib::Real > &foPnls, const std::vector< QuantLib::Date > &startDates, const std::vector< QuantLib::Date > &endDates) |
|
void | populateTradePNLs (const TradePnLStore &allPnls, const TradePnLStore &foPnls) |
|
const std::vector< QuantLib::Real > & | pnls () |
|
const std::vector< QuantLib::Real > & | foPnls () |
|
const TradePnLStore & | tradePnls () |
|
const TradePnLStore & | foTradePnls () |
|
void | clear () |
|
◆ TradePnLStore
◆ PNLCalculator()
◆ ~PNLCalculator()
◆ writePNL()
virtual void writePNL |
( |
QuantLib::Size |
scenarioIdx, |
|
|
bool |
isCall, |
|
|
const RiskFactorKey & |
key_1, |
|
|
QuantLib::Real |
shift_1, |
|
|
QuantLib::Real |
delta, |
|
|
QuantLib::Real |
gamma, |
|
|
QuantLib::Real |
deltaPnl, |
|
|
Real |
gammaPnl, |
|
|
const RiskFactorKey & |
key_2 = RiskFactorKey() , |
|
|
QuantLib::Real |
shift_2 = 0.0 , |
|
|
const std::string & |
tradeId = "" |
|
) |
| |
|
virtual |
◆ isInTimePeriod()
const bool isInTimePeriod |
( |
QuantLib::Date |
startDate, |
|
|
QuantLib::Date |
endDate |
|
) |
| |
◆ populatePNLs()
void populatePNLs |
( |
const std::vector< QuantLib::Real > & |
allPnls, |
|
|
const std::vector< QuantLib::Real > & |
foPnls, |
|
|
const std::vector< QuantLib::Date > & |
startDates, |
|
|
const std::vector< QuantLib::Date > & |
endDates |
|
) |
| |
Definition at line 130 of file historicalsensipnlcalculator.cpp.
133 {
134 QL_REQUIRE(allPnls.size() == allFoPnls.size(), "PNLs and first order PNLs must be the same size");
135
136 pnls_.reserve(allPnls.size());
137 foPnls_.reserve(allPnls.size());
138
139 for (Size i = 0; i < allPnls.size(); i++) {
140
142 pnls_.push_back(allPnls[i]);
143 foPnls_.push_back(allFoPnls[i]);
144 }
145 }
146 pnls_.shrink_to_fit();
148}
std::vector< QuantLib::Real > pnls_
std::vector< QuantLib::Real > foPnls_
◆ populateTradePNLs()
◆ pnls()
const std::vector< QuantLib::Real > & pnls |
( |
| ) |
|
◆ foPnls()
const std::vector< QuantLib::Real > & foPnls |
( |
| ) |
|
◆ tradePnls()
◆ foTradePnls()
◆ clear()
◆ pnls_
std::vector<QuantLib::Real> pnls_ |
|
protected |
◆ foPnls_
std::vector<QuantLib::Real> foPnls_ |
|
protected |
◆ pnlPeriod_
◆ tradePnls_
◆ foTradePnls_