QuantLib_ExchangeRate man page

ExchangeRate — exchange rate between two currencies  


#include <ql/exchangerate.hpp>

Public Types

enum Type { Direct, Derived }

Public Member Functions


ExchangeRate ()
ExchangeRate (const Currency &source, const Currency &target, Decimal rate)


const Currency & source () const
the source currency.
const Currency & target () const
the target currency.
Type type () const
the type
Decimal rate () const
the exchange rate (when available)

Utility methods

Money exchange (const Money &amount) const
apply the exchange rate to a cash amount
static ExchangeRate chain (const ExchangeRate &r1, const ExchangeRate &r2)
chain two exchange rates

Detailed Description

exchange rate between two currencies


application of direct and derived exchange rate is tested against calculations.

Member Enumeration Documentation

enum Type



given directly by the user


derived from exchange rates between other currencies

Constructor & Destructor Documentation

ExchangeRate (const Currency & source, const Currency & target, Decimal rate)

the rate $ r $ is given with the convention that a unit of the source is worth $ r $ units of the target.


Generated automatically by Doxygen for QuantLib from the source code.

Referenced By

addchain.3alc(3), addloins.3alc(3), addlosig.3alc(3), append.3alc(3), delchain.3alc(3), freechain.3alc(3), getsigname.3alc(3), lofig.3alc(3), losig.3alc(3), phfig.3alc(3), reverse.3alc(3).

chain(3), Derived(3), Direct(3), exchange(3), ExchangeRate(3), source(3) and target(3) are aliases of QuantLib_ExchangeRate(3).

Fri Jun 2 2017 Version 1.10 QuantLib