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 |
FXTriangulation | ( | ) |
Set up empty repository
|
explicit |
Set up fx quote repository with available market quotes ccypair => quote
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.
QuantLib::Handle<QuantExt::FxIndex> getIndex | ( | const std::string & | indexOrPair, |
const Market * | market | ||
) | 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 its default configuration. If the triangulation is not possible or required curves are not available an exception is thrown.