Logo
Reference manual - version ored_version
FXTriangulation Class Reference

Public Member Functions

 FXTriangulation ()
 FXTriangulation (std::map< std::string, QuantLib::Handle< QuantLib::Quote > > quotes)
QuantLib::Handle< QuantLib::Quote > getQuote (const std::string &pair) const
QuantLib::Handle< QuantExt::FxIndex > getIndex (const std::string &indexOrPair, const Market *market, const std::string &configuration) const

Constructor & Destructor Documentation

◆ FXTriangulation() [1/2]

FXTriangulation ( )

Set up empty repository

◆ FXTriangulation() [2/2]

FXTriangulation ( std::map< std::string, QuantLib::Handle< QuantLib::Quote > > quotes)
explicit

Set up fx quote repository with available market quotes ccypair => quote

Member Function Documentation

◆ getQuote()

QuantLib::Handle< QuantLib::Quote > getQuote ( const std::string & pair) const

Get quote, possibly via triangulation If you need an exact handling of spot lag differences, use getIndex() instead.

◆ getIndex()

QuantLib::Handle< QuantExt::FxIndex > getIndex ( const std::string & indexOrPair,
const Market * market,
const std::string & configuration ) const

Get fx index, possibly via triangulation. The index name can be of the form FX-TAG-CCY1-CCY2 or also be just a currency pair CCY1CCY2. In the latter case, the fixing source is set to TAG = GENERIC. The fx index requires discount curves from a market. The assumption is that the market provides discount curves consistent with cross-currency discounting under the specified configuration. If the triangulation is not possible or required curves are not available an exception is thrown.