|
QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
|
exchange rate between two currencies More...
#include <ql/exchangerate.hpp>
Public Types | |
| enum | Type { Direct , Derived } |
Public Member Functions | |
Constructors | |
| ExchangeRate (Currency source, Currency target, Decimal rate) | |
Inspectors | |
| 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 | |
exchange rate between two currencies
| enum Type |
| ExchangeRate | ( | Currency | source, |
| 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.