33 : zeroCubeIdx_(0), cube_(cube), currency_(currency), itCurrent_(currentDeltas_.begin()) {
34 QL_REQUIRE(!
cube_->zeroCubes().empty(),
"ParSensitivityCubeStream: cube contains no zero cubes");
68 sr.
gamma = Null<Real>();
72 }
else if (zeroCubeIdx_ < cube_->zeroCubes().
size() - 1) {
void init()
Shared initialisation.
QuantLib::ext::shared_ptr< ZeroToParCube > cube_
Handle on the SensitivityCube.
std::string currency_
Currency of the sensitivities in the SensitivityCube.
std::map< std::string, QuantLib::Size >::const_iterator tradeIdx_
TradeId and index of current trade ID in the underlying cube.
Size zeroCubeIdx_
zero cube idx
ParSensitivityCubeStream(const QuantLib::ext::shared_ptr< ZeroToParCube > &cube, const std::string ¤cy)
std::map< ore::analytics::RiskFactorKey, QuantLib::Real >::iterator itCurrent_
Iterator to current delta.
void reset() override
Resets the stream so that SensitivityRecord objects can be streamed again.
ore::analytics::SensitivityRecord next() override
std::map< ore::analytics::RiskFactorKey, QuantLib::Real > currentDeltas_
Par deltas for current trade ID.
pair< RiskFactorKey, string > deconstructFactor(const string &factor)
Size size(const ValueType &v)
Class for streaming SensitivityRecords from a par sensitivity cube.
Struct for holding a sensitivity record.
Shift scenario generation.