43 const QuantLib::ext::shared_ptr<SensitivityStream>& ss,
const std::string& baseCurrency,
44 std::map<std::string, std::map<std::string, double>> defaultRiskDecompositionWeights = {},
45 const std::set<std::string>& eqComDecompositionTradeIds = {},
46 const std::map<std::string, std::map<std::string, double>>& currencyHedgedIndexQuantities = {},
47 const QuantLib::ext::shared_ptr<ore::data::ReferenceDataManager>& refDataManager =
nullptr,
48 const QuantLib::ext::shared_ptr<ore::data::CurveConfigurations>&
curveConfigs =
nullptr,
49 const QuantLib::ext::shared_ptr<SensitivityScenarioData>& scenarioData =
nullptr,
50 const QuantLib::ext::shared_ptr<ore::data::Market>& todaysMarket =
nullptr);
54 void reset()
override;
60 std::map<std::string, double>
fxRisk;
66 std::map<std::string, double>
70 std::map<std::string, double>
72 const std::map<std::string, std::vector<std::string>>& constituentCurrencies,
73 const std::map<std::string, double>& fxSpotShiftSize,
const double eqShiftSize)
const;
78 std::map<std::string, double>
fxRiskShiftSizes(
const std::map<std::string, std::vector<std::string>>& constituentCurrencies)
const;
85 std::map<std::string, std::vector<std::string>>
getConstituentCurrencies(
const std::map<std::string, double>& constituents,
86 const std::string& indexCurrency,
97 std::vector<SensitivityRecord>
sensitivityRecords(
const std::map<std::string, double>& eqDeltas,
98 const std::map<std::string, double>& fxDeltas,
99 const std::string indexCurrency,
109 QuantLib::ext::shared_ptr<SensitivityStream>
ss_;
120 QuantLib::ext::shared_ptr<SensitivityScenarioData>
ssd_;
Class that wraps a sensitivity stream and decompose default, equity and commodity risk records given ...
QuantLib::ext::shared_ptr< ore::data::CurveConfigurations > curveConfigs_
std::map< std::string, std::vector< std::string > > getConstituentCurrencies(const std::map< std::string, double > &constituents, const std::string &indexCurrency, const ore::data::CurveSpec::CurveType curveType) const
QuantLib::ext::shared_ptr< ore::data::Market > todaysMarket_
std::string baseCurrency_
IndexDecompositionResult indexDecomposition(double delta, const std::string &indexName, const ore::data::CurveSpec::CurveType curveType) const
double commoditySpotShiftSize(const std::string name) const
double assetSpotShiftSize(const std::string name, const ore::data::CurveSpec::CurveType curveType) const
Return the asset spot shift size.
std::string curveCurrency(const std::string &name, ore::data::CurveSpec::CurveType curveType) const
double equitySpotShiftSize(const std::string name) const
QuantLib::ext::shared_ptr< SensitivityScenarioData > ssd_
std::vector< SensitivityRecord > decomposeSurvivalProbability(const SensitivityRecord &record) const
QuantLib::ext::shared_ptr< SensitivityStream > ss_
The underlying sensitivity stream that has been wrapped.
std::vector< SensitivityRecord > decompose(const SensitivityRecord &record) const
Decompose the record and add it to the internal storage;.
std::map< std::string, double > fxRiskFromDecomposition(const std::map< std::string, double > &spotRisk, const std::map< std::string, std::vector< std::string > > &constituentCurrencies, const std::map< std::string, double > &fxSpotShiftSize, const double eqShiftSize) const
Compute the resulting fx risks from a given equity/commodity decomposition.
QuantLib::ext::shared_ptr< ore::data::ReferenceDataManager > refDataManager_
refDataManager holding the equity and commodity index decomposition weights
double fxRiskShiftSize(const std::string ccy) const
Return the sensi shift size for the shifting the ccy-baseCurrency spot quote.
std::vector< SensitivityRecord >::iterator itCurrent_
std::vector< SensitivityRecord > decomposedRecords_
std::map< std::string, std::map< std::string, double > > currencyHedgedIndexQuantities_
list of trade id, for which a commodity index decomposition should be applied
std::vector< SensitivityRecord > decomposeCurrencyHedgedIndexRisk(const SensitivityRecord &record) const
std::map< std::string, double > constituentSpotRiskFromDecomposition(const double spotDelta, const std::map< std::string, double > &indexWeights) const
Decompose a equity/commodity spot sensitivity into the constituent spot sensistivities.
std::map< std::string, double > fxRiskShiftSizes(const std::map< std::string, std::vector< std::string > > &constituentCurrencies) const
Returns the shift sizes for all currencies in the map.
std::vector< SensitivityRecord > sensitivityRecords(const std::map< std::string, double > &eqDeltas, const std::map< std::string, double > &fxDeltas, const std::string indexCurrency, const SensitivityRecord &orginialRecord) const
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< std::string > eqComDecompositionTradeIds_
list of trade id, for which a equity index decomposition should be applied
std::map< std::string, std::map< std::string, double > > defaultRiskDecompositionWeights_
map of trade ids to the basket consituents with their resp. weights
Base Class for streaming SensitivityRecords.
A class to hold the parametrisation for building sensitivity scenarios.
Base class for sensitivity record streamer.
std::map< std::string, double > spotRisk
std::map< std::string, double > fxRisk
std::string indexCurrency
vector< string > curveConfigs