Package: easymoney
OverviewProject SummaryThis package is primarily intended to be used in the domain of Data Science to simplify
the process of analysing data sets which contain money information. Often, the financial information
within, and very often between, data sets is separated in time (inflation), currency (conversion)
as well as the ways in which these sources refer to the currency being used (e.g., country codes vs. currency codes).
Conventionally, this has required handcrafting a solution to control for these differences on a case-by-case basis.
EasyMoney is intended to streamline this process to make comparisons across these dimensions
extremely simple and straightforward.Feature SummaryComputing InflationCurrency ConversionAdjusting a given currency for Inflation‘Normalizing’ a currency, i.e., adjust for inflation and then convert
to a base currency.Relating ISO Alpha2/3 Country Codes, Currency Codes as well as a
Region’s Name to one another.This tool automatically obtains the latest inflation and
exchange rate information from online databases.NOTICE: THIS TOOL IS FOR INFORMATION PURPOSES ONLY.DependenciesEasyMoney requires:numpy,pandas,pycountry,requestsandwbdata†.InstallationPython Package Index:$pipinstalleasymoneyLatest Build:$pipinstallgit+git://github.com/TariqAHassan/EasyMoney@masterEasyMoney is compatible with Python 2.7 and 3.3+.ExamplesImport the toolfromeasymoney.moneyimportEasyPeasyCreate an instance of the EasyPeasy ClassThe standard way to do this is as follows:ep=EasyPeasy()However,fuzzy searchingcan also easily be enabled.ep=EasyPeasy(fuzzy_threshold=True)Prototypical Conversion Problems1. Currency Converterep.currency_converter(amount=100000,from_currency="USD",to_currency="EUR",pretty_print=True)# 94,553.71 EUR2. Adjust for Inflation and Convert to a base currencyep.normalize(amount=100000,region="CA",from_year=2010,to_year="latest",pretty_print=True)# 76,357.51 EUR3. Convert Currency in a more Natural Wayep.currency_converter(amount=100,from_currency="Canada",to_currency="Ireland",pretty_print=True)# 70.26 EURHandling Common Currencies1. Currency Conversionep.currency_converter(amount=100,from_currency="France",to_currency="Germany",pretty_print=True)# 100.00 EUREasyMoney understands that these two nations share a common currency.2. Normalizationep.normalize(amount=100,region="France",from_year=2010,to_year="latest",base_currency="USD",pretty_print=True)# 111.67 USDep.normalize(amount=100,region="Germany",from_year=2010,to_year="latest",base_currency="USD",pretty_print=True)# 113.06 USDEasyMoney also understands that, while these two nations may share a
common currency, the rate of inflation in these regions could differ.Region InformationEasyPeasy’sregion_map()method exposes some of the functionality
from thepycountriespackage in a streamlined manner.ep.region_map('GB',map_to='alpha_3')# GBRep.region_map('GB',map_to='currency_alpha_3')# GBPIf fuzzy searching is enabled, the search term does not have to exactly
match those stored in the databases cached by anEasyPeasyinstance.For example, it is possible to find the ISO Alpha 2 country code for
‘Germany’ by passing ‘German’.ep.region_map('German',map_to='alpha_2')# DEOptionsIt’s easy to explore the terminology understood byEasyPeasy, as
well as the dates for which data is available.ep.options()RegionAlpha
2Alpha
3Currenci
esInflationD
atesExchangeDatesOverlapAustral
iaAUAUSAUD[1960,
2015][04/01/1999,
29/11/2016][04/01/1999,
31/12/2015]AustriaATAUTEUR[1960,
2015][04/01/1999,
29/11/2016][04/01/1999,
31/12/2015]BelgiumBEBELEUR[1960,
2015][04/01/1999,
29/11/2016][04/01/1999,
31/12/2015]…………………Above, the ‘InflationDates’ and ‘ExchangeDates’ columns provide the
range of dates for which inflation and exchange rate information is
available, respectively. Additionally, all dates for which data is
available can be show by setting therange_table_datesparameter toFalse. The ‘Overlap’ column shows the range of dates shared by the
‘InflationDates’ and ‘ExchangeDates’ columns.LicenseThis software is provided under a BSD License.ResourcesIndicators used:Consumer price index (2010 =
100)Source: International Monetary Fund (IMF), International Financial
Statistics.Notes:All inflation-related results obtained from easymoney
(including, but not necessarily limited to, inflation rate
and normalization) are the result of calculations based on
IMF data. These results do not constitute a direct reporting
of IMF-provided data.Euro foreign exchange reference rates - European Central
BankSource: European Central Bank (ECB).Notes:The ECB data used here can be obtained directly from the
link provided above.Rates are updated by the ECB around 16:00 CET.The ECB states, clearly, that usage of this data for
transaction purposes is strongly discouraged. This sentiment
is echoed here; as stated above,this tool is for
information purposes only.All exchange rate-related results obtained from easymoney
(including, but not necessarily limited to, currency
conversion and normalization) are the result of calculations
based on ECB data. These results do not constitute a direct
reporting of ECB-provided data.†Sherouse, Oliver (2014). Wbdata. Arlington, VA.