The Role of Feature Engineering in Prediction of Tehran Stock Exchange Index Based on LSTM

Document Type : Research Paper

Authors

1 Department of management, Ershad Damavand University, Tehran branch, Tehran, Iran.

2 Faculty of Economics , Allameh Tabatabaei University, Tehran, Iran.

3 Faculty of Accounting, Management and Economic, Payame Noor University, Tehran, Iran.

4 School of Computer Engineering, Iran University of Science and Technology, Tehran, Iran.

Abstract

In this research, the impact of different preprocessing methods on the Long-Short term memory in predicting the financial time series was examined. At first, the model was implemented on the Tehran stock exchange index by utilizing the Principal Component Analysis (PCA) model on 78 technical indicators. Then, the same model was implemented by the advantage of the random forest to select features rather than the PCA to extract them. In the next step, other technical strategy dummy variables were added to the model to examine the changes in its performance. Finally, two deep learning methods with the advantage of only target lags were deployed to compare the accuracy to the other models. The first deep model was plain but the second one was with the advantage of the Wavelet denoising process. The results of the MSE, MAE, MAPE, and R2 score on unseen test sequences showed that applying the Long Short-Term Memory with its own deep feature extraction procedure and the wavelet’s denoising process leads to the best accuracy in prediction of the Tehran stock exchange index. Finally, the Diebold Mariano test exposed a significant difference between the accuracy of the best model and the rest. This result implied that although the application of deep learning gains accurate results, it can be alleviated by feeding the model with creatively extracted and denoised features.

Keywords

Main Subjects


Abbasian, M., Sardar Shahraki, A., & shahraki, J. (2019). The modeling and
comparison of GMDH and RBF artificial neural networks in forecasting
consumption of petroleum products in the agricultural sector. Iranian
Journal of Economic Studies, 8(1), 91-105.
Barbulescu, R. (2014). Remus gabriel anghel (2013), Romanians in Western
Europe. Migration, status dilemmas, and transnational connections [Book
Review]. Central and Eastern European Migration Review, 2.
Chang, Z., Zhang, Y., & Chen, W. (2019). Electricity price prediction based on
hybrid model of adam optimized LSTM neural network and wavelet
transform. Energy, 187, 115804.
Chen, Y., & Hao, Y. (2018). Integrating principle component analysis and
weighted support vector machine for stock trading signals prediction.
Neurocomputing, 321, 381-402.
Cipiloglu Yildiz, Z., & Yildiz, S. B. (2020). A portfolio construction framework
using LSTM-based stock markets forecasting. International Journal of
Finance & Economics, n/a(n/a).
Coakley, J., Marzano, M., & Nankervis, J. (2016). How profitable are FX
technical trading rules? International Review of Financial Analysis, 45, 273-
282. doi:https://doi.org/10.1016/j.irfa.2016.03.010
Eric, D., Andjelic, G., & Redzepagic, S. (2009). Application of MACD and RVI
indicators as functions of investment strategy optimization on the financial
market. Zbornik Radova Ekonomskog Fakultet au Rijeci, 27.
Fama, E. F. (1970). Efficient capital markets: A review of theory and empirical
work. The Journal of Finance, 25(2), 383-417.
Fama, E. F., & Blume, M. E. (1966). Filter rules and stock-market trading. The
Journal of Business, 39(1), 226-241. Retrieved from
 http://www.jstor.org/stable/2351744.
Fernández-Rodrı́guez, F., González-Martel, C., & Sosvilla-Rivero, S. (2000). On
the profitability of technical trading rules based on artificial neural networks:
Evidence from the Madrid stock market. Economics Letters, 69(1), 89-94.
Fifield, S., Power, D., & Sinclair, C. D. (2005). An analysis of trading strategies
in eleven European stock markets. The European Journal of Finance, 11(6),
531-548. Retrieved from
 https://EconPapers.repec.org/RePEc:taf:eurjfi:v:11:y:2005:i:6:p:531-548.
Fischer, T., & Krauss, C. (2018). Deep learning with long short-term memory
networks for financial market predictions. European Journal of Operational
Research, 270(2), 654-669.
Gehrig, T., & Menkhoff, L. (2006). Extended evidence on the use of technical
analysis in foreign exchange. International Journal of Finance & Economics,
11(4), 327-338.