Currency conversion

Overview

The function currency_conversion allows the user to convert an cashflow in a currency to the equivalent cashflow in other currency using the specified exchange_rate. In addition, it is possible to include the devaluation of the foreign exchange rate.

Functions in this module

cashflows.currency.currency_conversion(cflo, exchange_rate=1, devaluation=None, base_date=0)[source]

Converts a cashflow of dollars to another currency.

Parameters:
  • cflo (pandas.Series) – Generic cashflow.
  • exchange_rate (float) – Exchange rate at time base_date.
  • devaluation (pandas.Series) – Devaluation rate per compounding period.
  • base_date (int) – Time index for the exchange_rate in current dollars.
Returns:

A TimeSeries object.

Examples.

>>> cflo = cashflow(const_value=[100] * 5, start='2015', freq='A')
>>> devaluation = interest_rate(const_value=[5]*5, start='2015', freq='A')
>>> currency_conversion(cflo=cflo, exchange_rate=2) 
2015    200.0
2016    200.0
2017    200.0
2018    200.0
2019    200.0
Freq: A-DEC, dtype: float64
>>> currency_conversion(cflo=cflo, exchange_rate=2, devaluation=devaluation) 
2015    200.00000
2016    210.00000
2017    220.50000
2018    231.52500
2019    243.10125
Freq: A-DEC, dtype: float64
>>> currency_conversion(cflo=cflo, exchange_rate=2,
... devaluation=devaluation, base_date='2017') 
2015    181.405896
2016    190.476190
2017    200.000000
2018    210.000000
2019    220.500000
Freq: A-DEC, dtype: float64