The most recent successful time series prediction models are a combination of three elements: traditional stochastic models, machine learning models and signal processing techniques. CEEMDAN-LSTM models have combined empirical mode decomposition and long short-term memory neural networks to achieve state-of-the-art results for financial data. In this work, we propose a generalized CEEMDAN-LSTM architecture for time series forecasting capable of dealing with exogenous features as input, and the consequences of input data growth, such as convergence difficulties. Our model was applied to time series from 10 of the most liquid Brazilian stocks, and results show that accuracy is overall improved when compared to the original single feature input CEEMDAN-LSTM architecture.
The article was published in Springer's Lecture Notes in Computer Science.
- Set all your desired hyperparameters for a given batch of experiments in files xlstm_ceemdan_full_spline.ipynb, lstm_ceemdan.ipynb, lstm_ceemdan_spline.ipynb , xlstm_ceemdan_full.ipynb.
Warning: Also set the output folder at the last cell of each of these files (the default one is exp_records folder).
-
Set the number of experiments in a batch and Run run_batch_exps.py. Then the results of a batch will be put in your desired folder (the default one is exp_records) in csv format.
-
Run the notebook avg_metrics.ipynb, which will summarize average metrics in a csv, output goes to folder summary_results.
-
Repeat steps 1 to 3 with different hyperparameters, for example changing the IMF number for threshold, changing data or even changing learning rate, noise scale and so on.
Warning: in order to create new batches it is recommended to manually change the destination folder at the end of each of the above cited files.
-
Set all your desired hyperparameters in file xlstm_ceemdan_full_spline_imfs.ipynb and run all its cells once.
-
Change IMF threshold and reproduce step 1.
Change threshold in the following line:
imfs_to_predict_with_neural = [] # set to ['IMF1'] , ['IMF1', 'IMF2], ['IMF1','IMF2','IMF3'] and so on
- Run file imf_threshold_metrics.ipynb. The output will be a csv file in folder imfs_exp_records.
The graph will be generated in the imf_threshold_metrics.ipynb when ran.
-
Reproduce steps to generate Table 2.
-
In avg_metrics.ipynb last notebook cell a Table is generated for a given IMF threshold:
-
Reproduce steps to generate Table 2 with different IMF threshold number.
-
Run avg_metrics again for the new batch and generate another table as in step 2.
-
Manually merge the two tables to compare relative improvements for each of the IMF threshold values as in the paper.
Cite this paper as:
de Luca Avila R., De Bona G. (2020) Financial Time Series Forecasting via CEEMDAN-LSTM with Exogenous Features. In: Cerri R., Prati R.C. (eds) Intelligent Systems. BRACIS 2020. Lecture Notes in Computer Science, vol 12320. Springer, Cham. https://doi.org/10.1007/978-3-030-61380-8_38
Please, feel free to reach me at: [email protected]!
Or you can even send me a message at my linkedin https://www.linkedin.com/in/delucarenan.
Thanks to Escola Politécnica da Universidade de São Paulo, and thanks to BTG Pactual for supporting the work.