This is a project focusing on applying computer science techniques on economics-related topics. Specifically, we are trying to build up a read-to-use and user-friendly toolbox for economic forecasting backend by neural networks.
In this project, neural networks are built to make predictions on economic and financial data. Codes in this project are mainly python scripts and typical python libraries are required for the model to be trained.
Models are implemented in Keras
, Tensorflow
and Matlab
libraries. (tensorflow
and matlab
models are archived as we found models based on keras
are more robust compared to the alternative libraries.)
-
Topic directory:
./k models/exchange/
-
In this project, we feed multiple (26 in total) exchange rate time series into a recurrent neural network and use lagged values to predict the future value of CAD-USD exchange rate.
- Core: the model is built on
keras
(version 2.2.2
) withtensorflow
backend. - Data:
numpy
,pandas
andsklearn
are required for data processing. - Visualization:
matplotlib
andbokeh
are required for visualization.
- The baseline model takes historical time series data of exchange rate and make single or multiple step forecasting.
- In additional to the baseline model, extra time series are fed to the neural networks. The multi-variate version takes longer to be trained but can achieve higher accuracy.
-
Open your terminal
-
Change directory:
cd ./k\ models/exchange/
-
And execute the script
python{$your_python3_version} ./multi_ex.py
-
Then follow the prompt shown in terminal
Working on this
- Other economic indicators will be added.
Archived codes can be found at ./archived/
./archived/alpha/
is atensorflow
based model to forecast macroeconomic indicators like price level and unemployment rate../archived/matlab code/
is amatlab
based model for macroeconomic indicator forecasting.- Note: Archived models are scripts Functionality of archived topics are not guaranteed.
-
All model based on
keras
can be training using GPU-accelerated servers automatically once applicable. And it's been tested using AWS server with Nvidia Tesla V100 GPU. -
Note: I tested the training function of
keras
(tensorflow backend
) on Amazon Web Service with GPUs (Nvidia Tesla V100). The training efficiency might not be higher with GPU accelerated server compared with CPU server (16C32T) for some tasks.
- All reference papers and books could be found in Mendeley group AnnEcon.
- St. Louis Fed (FRED) Economic data by Federal Reserve Bank of St. Louis
- IMF DataMapper by International Monetary Fund
- World Bank Open Data
- Global Financial Data