29 Real deltaThreshold, Real gammaThreshold)
30 : ss_(ss), deltaThreshold_(deltaThreshold), gammaThreshold_(gammaThreshold) {
33 while (SensitivityRecord sr = ss_->next()) {
34 if (sr.isCrossGamma() && fabs(sr.gamma) > gammaThreshold_) {
35 deltaKeys_.insert(sr.key_1);
36 deltaKeys_.insert(sr.key_2);
42FilteredSensitivityStream::FilteredSensitivityStream(
const QuantLib::ext::shared_ptr<SensitivityStream>& ss,
43 QuantLib::Real threshold)
Class that wraps a sensitivity stream and filters out negligible records.
QuantLib::Real gammaThreshold_
The gamma threshold.
FilteredSensitivityStream(const QuantLib::ext::shared_ptr< SensitivityStream > &ss, QuantLib::Real deltaThreshold, QuantLib::Real gammaThreshold)
QuantLib::ext::shared_ptr< SensitivityStream > ss_
The underlying sensitivity stream that has been wrapped.
QuantLib::Real deltaThreshold_
The delta threshold.
void reset() override
Resets the stream so that SensitivityRecord objects can be streamed again.
SensitivityRecord next() override
Returns the next SensitivityRecord in the stream after filtering.
std::set< RiskFactorKey > deltaKeys_
Set to hold Delta Keys appearing in CrossGammas.
Class that wraps a sensitivity stream and filters out negligible records.