## Qualified Money

We simulate the spreading of tainted money. In a second step, we implement qualifiers that regulate different qualities of money.

First step was to gather money flow data. For this purpose, every country's trade import and export is used [1]. As there is no historical data of the trade partner fractions, the most recent data is used for all years [2].

Money can be contagious (i.e. if a country receives _any_ bad money, the country is 'bad') or bad money dilutes with respect to the money reservoir of the country. In the first case, no trade amounts are necessary. In the second case of dilution, we start with the amount of money (M2) in the country as initial value.

Starting from an initial setup (all countries good, one bad; half good; half bad; …), year by year the quality indicater is updated according to the flows of money.

## Assumptions and Limits

- Only merchandise trade balance is considered (i.e. no services)
- Only the five biggest trading partners are reported
- Money that is created is untainted ($q=1$)
- For the remaining trade amount, there are different options
- spread with everyone
- scale the trade partners to 100%
- trade the rest with the country's neighbors (data should reflect that)
- neglect it

## Algorithm

- $V_i$ is the volume of money (M2) corresponding to country $i$
- $q_i$ is the percentage (%) of non-tainted money, where $q \in [0,1]$; 0 is fully tainted money, 1 is non-tainted money
- $\Delta V_i$ is the increase of volume of money
- $f_{ij}$ is the fraction (in % of $V_j$) of money flowing from $j$ to $i$

Then the following (simplified) algorithm applies for the volume forward: \[V_i(t+1) = V_i(t) + \sum_j{f_{ij} \cdot V_j}-\sum_j{f_{ji} \cdot V_i}+\Delta V_i(t)\] i.e. the new volume is the old volume plus inward flow, minus outward flow, plus internal change of volume

and corresponding to this the quality indicator $q$: \[q_i(t+1)\cdot V_i(t+1) = q_i(t) \cdot V_i(t) + \sum_j{q_j(t) \cdot f_{ij} \cdot V_j}-\sum_j{q_i(t) \cdot f_{ji} \cdot V_i}+(q=1)\cdot\Delta V_i(t)\] i.e. the new 'quality' is the weighted average of the quality-weighted current volume, minus the quality weighted outward flow, plus the quality weighted inward flow, plus internal change of volume (which is assumed to be clear).

In order to compute the new values at each step, we have to transform the data at hand because e.g. the trading share is not given as a fraction of available money but as a fraction of absolute import/export.

## Important Points

- EU share is spread to all EU member countries (probably according to GDP)
- If $i$ exports to $j$ that is an
**inflow**of money for country $i$

## Data

- [1] Import and Export yearly data: http://data.worldbank.org/data-catalog/world-development-indicators
- [2] Import and Export Partners Fraction (top 5): http://stat.wto.org/CountryProfile/WSDBcountryPFExportZip.aspx?Language=E
- Bitcoin Data? http://anonymity-in-bitcoin.blogspot.ch
- List of IFSC Codes: https://www.paisa.co/ifsc/union-bank-of-india/
- Country balance of trade: https://en.wikipedia.org/wiki/Balance_of_trade
- List of countries by net exports: https://en.wikipedia.org/wiki/List_of_countries_by_net_exports based on WTO, CIA world factbook
- Balance of payments: https://en.wikipedia.org/wiki/Balance_of_payments
- Illicit Money Flows: http://iffdec2011.gfintegrity.org/downloads.html
- Best Credit Cards: https://www.paisa.co/credit-card/fi/sbi-cards

## Team

- Giancarlo Scrugli
- Loic Jaouen
- Dirk Helbing
- Vito Impagliazzo
- Ostap Cherkashin
- Thomas Bisig