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
- Load raw data from a webservice (e.g. Yahoo Finance, Quandl)
- Transform the data
- 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?
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 Data\fx rates to cube daily.py 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 setup.py 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 daily.py"
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:
To run this script from a TM1 process you should check the following help article: