QuantLib_ExchangeRateManager man page

ExchangeRateManager — exchange-rate repository

Synopsis

#include <ql/currencies/exchangeratemanager.hpp>

Inherits Singleton< ExchangeRateManager >.

Public Member Functions

void add (const ExchangeRate &, const Date &startDate=Date::minDate(), const Date &endDate=Date::maxDate())
Add an exchange rate.
ExchangeRate lookup (const Currency &source, const Currency &target, Date date=Date(), ExchangeRate::Type type=ExchangeRate::Derived) const

void clear ()
remove the added exchange rates

Friends

class Singleton< ExchangeRateManager >

Additional Inherited Members

Detailed Description

exchange-rate repository

Tests

lookup of direct, triangulated, and derived exchange rates is tested.

Member Function Documentation

void add (const ExchangeRate &, const Date & startDate = Date::minDate(), const Date & endDate = Date::maxDate())

Add an exchange rate. The given rate is valid between the given dates.

Note:

If two rates are given between the same currencies and with overlapping date ranges, the latest one added takes precedence during lookup.

ExchangeRate lookup (const Currency & source, const Currency & target, Date date = Date(), ExchangeRate::Type type = ExchangeRate::Derived) const

Lookup the exchange rate between two currencies at a given date. If the given type is Direct, only direct exchange rates will be returned if available; if Derived, direct rates are still preferred but derived rates are allowed.

Warning

if two or more exchange-rate chains are possible which allow to specify a requested rate, it is unspecified which one is returned.

Author

Generated automatically by Doxygen for QuantLib from the source code.

Referenced By

clear(3), lookup(3) and Singleton_ExchangeRateManager(3) are aliases of QuantLib_ExchangeRateManager(3).

Fri Sep 23 2016 Version 1.8.1 QuantLib