Abstract
Stock market predictions help investors benefit in the financial markets. Various papers have proposed different techniques in stock market forecasting, but no model can provide accurate predictions. In this study, we show how to accurately anticipate stock prices using a prediction model based on the Generative Adversarial Networks (GAN) method. We collect the dataset, preprocess it, extract features, evaluate the model, and then deploy the GAN method to develop a stock price prediction model. The GAN comprises two parts: a generator and a discriminator that are both trained using adversarial learning processes. In this study, we utilize features including date, open, high, low, close, and volume to train our model. The results of the experiments gain good accuracy and a low error rate, so it can be a promising solution for dealing with accurate and dynamic stock prices. Moreover, the proposed model can achieve the results obtained are a metric score r2 with real predictions = 0.811166 and synthetic predictions = 0.674971. The MAE function produces real predictions = 0.020665, and synthetic predictions = 0.042406. The MRLE gains real = 0.001087 and synthetic = 0.002479.
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs41870-022-00929-6/MediaObjects/41870_2022_929_Fig1_HTML.png)
Similar content being viewed by others
References
Lin H, Chen C, Huang G, Jafari A (2021) Stock price prediction using generative adversarial networks. J Comput Sci 17(3):188–196
Nabipour M, Nayyeri P, Jabani H, Mosavi A, Salwana E, Shahab S (2020) Deep learning for stock market prediction. Entropy 22(8):840
Saud AS, Shakya S (2020) Analysis of lookback period for stock price prediction with RNN variants. A case study on banking sector of NEPSE. Procedia Comput Sci 167:788–798
Ta V-D, Liu C-M, Tadesse DA (2020) Portofolio optimization-based stock prediction using long-short term memory network in quantitative trading. Appl Sci 10(2):437
Polamuri SR, Srinivas DK, Krishna Mohan DA (2021) Multi-Model Generative Adversarial Network Hybrid Prediction Algorithm (MMGAN-HIPA) for stock market prices prediction. J King Saud Univ Comput Inf Sci. https://doi.org/10.1016/j.jksuci.2021.07.001
Feng F, He X, Wang X, Luo C, Liu Y, Chua T-S (2019) Temporal relational ranking for stock prediction. ACM Trans Inf Syst 37(2):1–30
Zhang K, Zhong G, Dong J, Wang S, Wang Y (2019) Stock market prediction based on generative adversarial network. Procedia Comput Sci 147:400–406
Usmani S, Shamsi JA (2021) News sensitive stock market prediction: literature review and suggestions. PeerJ Comput Sci 7:e490
Sim HS, Kim HI, Ahn JJ (2019) Is deep learning for image recognition applicable to stock market prediction? Complexity 2019:1–10
Kelotra A, Pandey P (2020) Stock market prediction using optimized deep- ConvLSTM model. Big Data 8(1):5–24
Wang Y, Liu H, Guo Q, Xie S, Zhang X (2019) Stock volatility prediction by hybrid neural network. IEEE Access 1–1:2019
Lee J, Kim R, Koh Y, Kang J (2019) Global stock market prediction based on stock chart images using deep Q-network. IEEE Access 2019:1–1
Zhang Y, Li J, Wang H, Choi SCT (2021) Sentiment-guided adversarial learning for stock price prediction. Front Appl Math Stat 2021:7
Zhu Y (2020) Stock price prediction using the RNN model. J Phys Conf Ser 1650:032103
Moghar A, Hamiche M (2020) Stock market prediction using LSTM recurrent neural network. Procedia Comput Sci 170:1168–1173
Wanda P, Hiswati ME, Diqi M, Herlinda R (2021) “Re-Fake: Klasifikasi Akun Palsu di Sosial Media Online menggunakan Algoritma RNN. Pros Semin Nas Sains Teknol dan Inov Indones. 3:191–200
Ronaldo AD (2021) Effective Soil type classification using convolutional neural network. Int J Inform Comput 3(1):20
Jie HJ, Wanda P (2020) Runpool: a dynamic pooling layer for convolution neural network. Int J Comput Intell Syst 13(1):66–76
Wanda P, Jie HJ (2019) URLDeep: continuous prediction of malicious URL with dynamic deep learning in social networks. Int J Netw Secur 21(6):971–978
Liu B, Wu Q, Cao Q (2020) An improved Elman network for stock price prediction service. Secur Commun Netw 2020:1–9
Kartono A, Fatmawati VW, Wahyudi ST, Irmansyah G (2020) Numerical solution of nonlinear Schrodinger approaches using the fourth-order Runge-Kutta method for predicting stock pricing. J Phys Conf Ser 1491:012021
Bhattacharjee I, Bhattacharja P (2019) Stock price prediction: a comparative study between traditional statistical approach and machine learning approach. In: 2019 4th international conference on electrical information and communication technology (EICT)
Kumar D, Sarangi PK, Verma R (2021) A systematic review of stock market prediction using machine learning and statistical techniques. Mater Today Proc 2021:5
Vohra AA, Tanna PJ (2021) A survey of machine learning techniques used on Indian stock market. IOP Conf Ser: Mater Sci Eng 1042:1
Wang X, Yang K, Liu T (2021) Stock Price prediction based on morphological similarity clustering and hierarchical temporal memory. IEEE Access 9(67241–67248):2021
Cao H, Lin T, Li Y, Zhang H (2019) Stock price pattern prediction based on complex network and machine learning. Complexity 2019:1–12
Vijh M, Chandola D, Tikkiwal VA, Kumar A (2020) Stock closing price prediction using machine learning techniques. Procedia Comput Sci 167:599–606
Kaur R, Sharma DYK, Bhatt DP (2021) Measuring Accuracy of stock price prediction using machine learning-based classifiers. IOP Conf Ser Mater Sci Eng 1099(1):012049
Wu JM-T, Li Z, Herencsar N, Vo B, Lin JC-W (2021) A graph-based CNN- LSTM stock price prediction algorithm with leading indicators. Multimedia Syst 8:1
Nti IK, Adekoya AF, Weyori BA (2021) A novel multi-source information- fusion predictive framework based on deep neural networks for accuracy enhancement in stock market prediction. J Big Data 8:1
Matsubara T, Akita R, Uehara K (2018) Stock price prediction by deep neural generative model of news articles. IEICE Trans Inf Syst E101D(4):901–908
Shahriar MH, Haque NI, Rahman MA, Alonso M (2020) G-IDS: generative adversarial networks assisted intrusion detection system
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Diqi, M., Hiswati, M.E. & Nur, A.S. StockGAN: robust stock price prediction using GAN algorithm. Int. j. inf. tecnol. 14, 2309–2315 (2022). https://doi.org/10.1007/s41870-022-00929-6
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s41870-022-00929-6