Logo
Reference manual - version orea_version
CrifGenerator Class Reference

Class that generates a CRIF report. More...

#include <orea/simm/crifgenerator.hpp>

Public Member Functions

 CrifGenerator (const QuantLib::ext::shared_ptr< SimmConfiguration > &simmConfiguration, const QuantLib::ext::shared_ptr< SimmNameMapper > &nameMapper, const QuantLib::ext::shared_ptr< SimmTradeData > &tradeData, const QuantLib::ext::shared_ptr< CrifMarket > &crifMarket, bool xccyDiscounting=false, const std::string &currency="USD", QuantLib::Real usdSpot=1.0, const QuantLib::ext::shared_ptr< ore::data::PortfolioFieldGetter > &fieldGetter=nullptr, const QuantLib::ext::shared_ptr< ore::data::ReferenceDataManager > &referenceData=nullptr, const QuantLib::ext::shared_ptr< ore::data::CurveConfigurations > &curveConfigs=nullptr, const std::string &discountIndex="")
QuantLib::ext::shared_ptr< ore::analytics::CrifgenerateCrif (const QuantLib::ext::shared_ptr< ore::analytics::SensitivityStream > &ss)
std::vector< ore::analytics::CrifRecordprocessSensitivityStream (ore::analytics::SensitivityStream &ss, std::set< std::string > &failedTrades)
const std::string & discountIndex () const
 Return the base currency's discount index name. May be empty if not populated.
const bool & hasNettingSetDetails () const
 Check if at least one trade in the portfolio uses netting set details, and not just netting set ID.

Detailed Description

Class that generates a CRIF report.

Constructor & Destructor Documentation

◆ CrifGenerator()

CrifGenerator ( const QuantLib::ext::shared_ptr< SimmConfiguration > & simmConfiguration,
const QuantLib::ext::shared_ptr< SimmNameMapper > & nameMapper,
const QuantLib::ext::shared_ptr< SimmTradeData > & tradeData,
const QuantLib::ext::shared_ptr< CrifMarket > & crifMarket,
bool xccyDiscounting = false,
const std::string & currency = "USD",
QuantLib::Real usdSpot = 1.0,
const QuantLib::ext::shared_ptr< ore::data::PortfolioFieldGetter > & fieldGetter = nullptr,
const QuantLib::ext::shared_ptr< ore::data::ReferenceDataManager > & referenceData = nullptr,
const QuantLib::ext::shared_ptr< ore::data::CurveConfigurations > & curveConfigs = nullptr,
const std::string & discountIndex = "" )

Class constructor The nameMapper is a mapping from external names to ISDA SIMM qualifiers

The crifMarket is needed when generating CRIF entries for interest rate and credit vega.

The currency argument denotes the currency of the sensitivities that will be fed to the CRIF generator and if this is different from USD, the usdSpot argument is the rate that converts the sensitivity amounts to USD i.e. the number of units of USD per unit of sensitivity currency.

The xccyDiscounting parameter is true if we are treating all non-base currency discount factor risks as emanating from cross currency basis. The xccyDiscounting parameter is false when we only wish to add cross currency basis risk against cross currency interest rate swap instruments.

Member Function Documentation

◆ generateCrif()

QuantLib::ext::shared_ptr< ore::analytics::Crif > generateCrif ( const QuantLib::ext::shared_ptr< ore::analytics::SensitivityStream > & ss)

Generate a CRIF from a sensitivity record stream

Warning
An exception is thrown if any SensitivityRecords from the stream have a currency that differs from the currency provided in the CrifGenerator constructor.
Warning
An exception is thrown if the FX spot sensitivities are not of the form FXSpot/CCY_1CCY_2/0/spot where CCY_2 is the sensitivity currency