Public Member Functions | |
| CamSensitivityStorageManager (const std::vector< std::string > &camCurrencies, const QuantLib::Size nCurveSensitivities, const QuantLib::Size nVegaOptSensitivities, const QuantLib::Size nVegaUndSensitivities, const QuantLib::Size nFxVegaSensitivities, const QuantLib::Size firstCubeIndexToUse, const bool use2ndOrderSensitivities) | |
| QuantLib::Size | getRequiredSize () const override |
| void | addSensitivities (QuantLib::ext::shared_ptr< ore::analytics::NPVCube > cube, const QuantLib::ext::shared_ptr< ore::data::Trade > &trade, const QuantLib::ext::shared_ptr< ore::data::Market > &market, const QuantLib::Size dateIndex=QuantLib::Null< QuantLib::Size >(), const QuantLib::Size sampleIndex=QuantLib::Null< QuantLib::Size >()) const override |
| QuantLib::ext::any | getSensitivities (const QuantLib::ext::shared_ptr< ore::analytics::NPVCube > &cube, const std::string &nettingSetId, const QuantLib::Size dateIndex=QuantLib::Null< QuantLib::Size >(), const QuantLib::Size sampleIndex=QuantLib::Null< QuantLib::Size >()) const override |
|
explicit |
Assuming IR-FX coverage only with LGM1F and FXBS model components, for this the cam currencies list is sufficient to store the sensitivities in a suitable layout
|
overridevirtual |
Get required size (i.e. number of floats / reals) to store sensitivities in cube.
Implements SensitivityStorageManager.
|
overridevirtual |
Add to the sensitivities for the given trade to the cube. The cube must contain an id matching the trade's netting set. The sensitivities are then added to this id. If dateIndex and sampleIndex are null, the T0 slice of the cube is populated, otherwise the cells for the given date and sample. The depth of the cube must at least be what getRequiredSize() returns.
Implements SensitivityStorageManager.
|
overridevirtual |
Return delta, gamma, theta as tuple<Array, Matrix, Real> containing a delta vector, gamma matrix and theta scalar. The coordinates of the delta and gamma entries are
ccy_1 irDelta_1 ... irDelta_nCurveSensitivities
ccy_2 irDelta_1 ... irDelta_nCurveSensitivities
...
ccy_nCamCcys irDelta_1 ... irDelta_nCurveSensitivities
log(fx)-Delta_1 ... log(fx)-Delta_(nCamCcys-1)
theta
which means the number of components is nCurveSensitivities * nCamCurrencies + (nCamCurrencies - 1). All entries are in base ccy (= first ccy in camCurrencies), the fx deltas against base ccy.
Implements SensitivityStorageManager.