Nov 2, 2017

Upload Exchange rate from a Webservice

Your TM1 models can get great benefits from external information, e.g., FX rates, weather forecast, data on commodity prices or consumer confidence. Webservices like Yahoo Finance, Bloomberg or FRED, offer a range of financial and non-financial information. Many of them are Free to use.

How do we bring this data into our TM1 model? TM1py can help us to do this.

What TM1py does:

The load process generally consist of 3 steps

  1. Load raw data from a webservice (e.g. Yahoo Finance, Quandl)
  2. Transform the data
  3. Push the transformed data into TM1

 This article explains the steps to load FX rates from the FRED to a TM1 cube.

What is the FRED?

The Federal Reserve Bank of St.Louis is a financial institution which offers lots of financial data such as all exchange rates. In this example we are interested to the exchange rate from USD to JPY:


This sample uses pandas to get the data from the FRED, before running the script you need to install pandas python module. In a command line type:

  • pip install pandas

Once pandas has been installed, you need to install the pandas_reader module. To install it, run in a command line:

  • pip install pandas_datareader

1. Update TM1 instance settings

Before running the Load Datafx rates to cube script you need to update the TM1 credentials:

This script is going to load the echange rates to TM1py FX Rates cube, to create this cube you need to run the sample script.

2. Run the script

After checking the connectivity with your TM1 instance, open a command line inside the Load Data folder and type the following command:

  • python “fx rates to cube”

3. Check TM1py FX Rates

This script will load daily exchange rates from 1990/01/01 to 2041/01/01in the TM1py FX Rates cube:

4. Load other Exchange rates

If you are interesting about other exchange rate, you can see all available Exchange rate in this link:

For example if you want to load the the Exchange rate USD To Euro, you need to get the index DEXUSEU:

To run this script from a TM1 process you should check the following help article:

Related content

Loading related content