Fine-tuning and Comparative Analysis of CNN Pre-trained Model for Stock Market Trend Prediction
-
https://doi.org/10.14419/7y9sax33
Received date: May 6, 2025
Accepted date: May 22, 2025
Published date: June 9, 2025
-
Fine Tuning; Stock Trend Classification, Trading; Convolutional Neural Network; GAF; MTF [42]. -
Abstract
This manuscript examines the utilization of pre-trained Convolutional Neural Networks (CNNs), namely VGG16, ResNet50, InceptionV3, MobileNetV2, and Xception, for the prediction of stock market trends. The framework introduced herein hinges upon transforming financial time series into a 2D image. This transformation is done via the application of the Grammian Angular Field (GAF) and the Markov Transition Field (MTF). This image transformation allows for CNN compatibility, thereby optimizing the models for financial forecasting. The prediction of the trend is done in two ways. Initially, unmodified pre-trained CNNs are deployed for prediction. Subsequently, fine-tuning via the obtained financial images is done, and the results are recorded. The aim here is to augment the predictive performance substantially. The viability of the framework is assessed in the Indian Financial sector. Specifically, by focusing on twenty stocks from the NSE index: Nifty, we aim to quantify the performance of the proposed work. By experimenting on this dataset, we try to quantify how effectively pre-trained CNNs improve the competency of economic time series prediction. Moreover, the analysis presented in this article sheds further insights into future research and current procedures at the Intersection of Economics and Artificial Intelligence.
-
References
- Fama, E.F.: Efficient capital markets: A review of theory and empirical work. Journal of Finance 25, 383–417 (1970) https://doi.org/10.2307/2325486.
- Malkiel, B.G.: A Random Walk Down Wall Street (1973).
- Shefrin, H.: Behavioral Corporate Finance: Decisions that Create Value. McGraw-Hill/Irwin, (2005).
- Black, F., Scholes, M.: The pricing of options and corporate liabilities. Journal of Political Economy 81, 637–654 (1973) https://doi.org/10.1086/260062.
- Abhyankar, A., Copeland, L., Wong, W.: Nonlinear dynamics in real-time equity market indices: Evidence from the United Kingdom. The Eco-nomic Journal 107, 864–880 (1997) https://doi.org/10.2307/2235155.
- Hartman, P., Hlinka, P.: Structural breaks in financial time series. Finance Research Letters 24, 66–73 (2018).
- LeCun, Y., Bengio, Y., Hinton, G.: Deep learning. Nature 521, 436–444 (2015) https://doi.org/10.1038/nature14539.
- Simonyan, K., Zisserman, A.: Very deep convolutional networks for large-scale image recognition (2014)
- He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 770–778 (2015) https://doi.org/10.1109/CVPR.2016.90.
- Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., Wojna, Z.: Rethinking the inception architecture for computer vision. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2818–2826 (2016) https://doi.org/10.1109/CVPR.2016.308.
- Wang, Z., Oates, T.: Encoding time series as images for visual inspection and classification using tiled convolutional neural networks. Proceedings of the 24th International Conference on Artificial Intelligence (IJCAI) (2015).
- Box, G.E., Jenkins, G.M.: Time Series Analysis: Forecasting and Control. Holden-Day, (1976).
- Atsalakis, G.S., Valavanis, K.P.: Surveying stock market forecasting techniques—part ii: Soft computing methods. Expert Systems with Applica-tions 36(3), 5932–5941 (2009) https://doi.org/10.1016/j.eswa.2008.07.006.
- Krizhevsky, A., Sutskever, I., Hinton, G.E.: Imagenet classification with deep convolutional neural networks. In: Advances in Neural Infor-mation Processing Systems, pp. 1097–1105 (2012).
- Shin, H.-C., Roth, H.R., Gao, M., Lu, L., Xu, Z., Nogues, I., Yao, J., Mollura, D., Summers, R.M.: Deep convolutional neural networks for com-puter-aided detection: Cnn architectures, dataset characteristics and transfer learning. IEEE Transactions on medical imaging 35(5), 1285–1298 (2016) https://doi.org/10.1109/TMI.2016.2528162.
- Devlin, J., Chang, M.-W., Lee, K., Toutanova, K.: Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805 (2018).
- Dixon, M., Klabjan, D., Jin Hoon, B.: Sequence classification for credit scoring using deep learning. arXiv preprint arXiv:1607.02470 (2016).
- Wang, Z., Oates, T.: Encoding time series as images for visual inspection and classification using tiled convolutional neural networks. AAAI Workshop: Time Series, 40–46 (2015).
- Sezer, O.B., Ozbayoglu, M.: Algorithmic financial trading with deep convolutional neural networks: Time series to image conversion approach. Ap-plied Soft Computing 70, 525–538 (2018) https://doi.org/10.1016/j.asoc.2018.04.024
- Bao, W., Yue, J., Rao, Y.: A deep learning framework for financial time series using stacked autoencoders and long-short term memory. PLOS ONE 12(7), 0180944 (2017) https://doi.org/10.1371/journal.pone.0180944.
- Ding, X., Zhang, Y., Liu, T., Duan, J.: Deep learning for event-driven stock prediction. Proceedings of the 24th International Conference on Artifi-cial Intelligence, 2327–2333 (2015).
- Zhang, Y., Zhao, J., Leung, H.F.: Stock price prediction with big data: A deep learning approach. IEEE Transactions on Cybernetics 49(11), 3958–3970 (2019).
- Fischer, T., Krauss, C.: Deep learning with long short-term memory networks for financial market predictions. European Journal of Oper-ational Research 270(2), 654–669 (2018).
- Ding, X., Zhang, Y., Liu, T., Duan, J.: Deep learning for event-driven stock prediction. In: Proceedings of the 24th International Joint Conference on Artificial Intelligence (IJCAI), pp. 2327–2333 (2015).
- Guo, X., Sharma, A., Rissanen, J.: Stock price prediction with a hybrid model using multiple sources. Expert Systems with Applications 95, 43–54 (2018).
- Kwon, Y.K., Moon, B.R.: Stock price prediction using deep learning and sentiment analysis. Expert Systems with Applications 129, 150–168 (2019).
- Kim, Y.D., Choi, J., Kim, Y.J., Kim, C.H.: Stock price prediction using cnn-lstm neural net- works. In: Proceedings of the International Conference on Artificial Neural Networks (ICANN), pp. 483–490 (2016).
- Akita, R., Yoshihara, A., Matsubara, T.: Stock price prediction with deep temporal cnn-lstm networks. Expert Systems with Applications 141, 112953 (2020).
- Zhang, Y., Zhang, Y., Liu, Y., Dai, Q.: Deep learning for financial market prediction. In: Pro- ceedings of the European Conference on Computer Vision (ECCV) Workshops, pp. 391–407 (2017).
- Lahmiri, S., Bekiros, S., Al-Yahyaee, K.H.: Stock market forecasting: A systematic literature review. Expert Systems with Applications 129, 418–450 (2019).
- Yoon, J.H., Swales, G.D., Kim, Y.S.: Predicting stock prices using convolutional neural networks. In: Proceedings of the International Conference on Computational Science and Computational Intelligence (CSCI), pp. 1102–1107 (2018).
- Pan, S.J., Yang, Q.: A survey on transfer learning. IEEE Transactions on Knowledge and Data Engineering 22(10), 1345–1359 (2010) https://doi.org/10.1109/TKDE.2009.191
- Shorten, C., Khoshgoftaar, T.M.: A survey on image data augmentation for deep learning. Journal of Big Data 6(1), 60 (2019) https://doi.org/10.1186/s40537-019-0197-0.
- Srivastava, N., Hinton, G.E., Krizhevsky, A., Sutskever, I., Salakhutdinov, R.: Dropout: A simple way to prevent neural networks from overfitting. Journal of Machine Learning Research 15(1), 1929–1958 (2014).
- Ganin, Y., Ustinova, E., Ajakan, H., Germain, P., Larochelle, H., Laviolette, F., Lempitsky, V.: Domain-adversarial training of neural networks. Journal of Machine Learning Research 17(1), 2096–2030 (2016).
- Bergstra, J., Bengio, Y.: Random search for hyper-parameter optimization. Journal of Machine Learning Research 13(1), 281–305 (2012)
- He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. Proceedings of the IEEE conference on computer vision and pat-tern recognition (CVPR), 770–778 (2017) https://doi.org/10.1109/CVPR.2016.90.
- Abadi, M., Barham, P., Chen, J., Chen, Z., Davis, A., Dean, J., Zheng, X.: Tensorflow: A system for large-scale machine learning. 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI 16), 265–283 (2016).
- Yam, S.S., Ang Jr, M.H., Ng, S.K., Tan, K.: Efficient fine-tuning of deep convolutional neural networks with transferred fisher scores for object recognition. Proceedings of the IEEE conference on computer vision and pattern recognition (CVPR), 475–484 (2017).
- Razavian, A.S., Azizpour, H., Sullivan, J., Carlsson, S.: Cnn features off-the-shelf: An astounding baseline for recognition. Proceedings of the IEEE conference on computer vision and pattern recognition (CVPR), 806–813 (2014) https://doi.org/10.1109/CVPRW.2014.131.
- Han, Z., Zhu, X., & Su, Z. (2024). Forecasting Maritime and Financial Market Trends: Leveraging CNN-LSTM Models for Sustainable Shipping and China’s Financial Market Integration. Sustainability, 16(22), 9853. https://doi.org/10.3390/su16229853
- Chauhan, J. K., Ahmed, T., & Sinha, A. (2023, December). Comparative Analysis of CNN Pre-trained Model for Stock Market Trend Prediction. In International Conference on Recent Trends in Image Processing and Pattern Recognition (pp. 110-129). Cham: Springer Nature Switzerland. https://doi.org/10.1007/978-3-031-53082-1_10.
- Fischer, T., & Krauss, C. (2018). Deep learning with long short-term memory networks for financial market predictions. European journal of opera-tional research, 270(2), 654-669. https://doi.org/10.1016/j.ejor.2017.11.054.
-
Downloads
-
How to Cite
Chauhan, J. K. ., Ahmed, T. ., & Sinha, A. . (2025). Fine-tuning and Comparative Analysis of CNN Pre-trained Model for Stock Market Trend Prediction. International Journal of Basic and Applied Sciences, 14(2), 68-77. https://doi.org/10.14419/7y9sax33
