with a longer period in Yahoo Finance. This can fix the
problem of the lack of data used to train the model.
Furthermore, macroeconomic data including GDP,
unemployment rate, inflation rate, etc. can be added to
the database to help analyze stock prices. Adding these
factors that affect stock prices makes it easier and more
accurate for the module to predict stock prices.
Moreover, since news and social media data also
affect the predictive power of the model, they should
also be added to the database as data for analysis (Li et
al 2014). Using natural language processing (NLP)
technology can help extract company or market-related
information from news articles or social media posts
(Ding 2015). Next, by preprocessing these data, the
accuracy of the model can be improved.
6 CONCLUSION
In the study, I compared the stock price predictions
obtained using the PCA method with the stock price
predictions obtained without using the PCA method.
In the experiment, the LSTM model was trained on
20 data sets containing the opening price, high price,
low-price, closing price, and the volume of the stock
"Gold Dec23". After experimental research, it was
found that the model using the PCA method has fewer
errors than the model without the PCA method.
However, the performance of both models is unstable,
and the output results may be accompanied by large
errors. These issues may be caused by insufficient
data in the database used to train the model. Moreover,
the large price fluctuations of "Gold Dec23" and other
external factors such as policies and government
controls will make the stock price difficult to infer.
To make the accuracy of the production more stable
and excellent, the database used to train the model
should have more data for training the model. When
making stock predictions, factors that may affect
stock prices should be analyzed to optimize the model.
This research can provide a reference for
improving the performance of the neural network
LSTM. After experimental analysis, using the PCA
method to preprocess the data can indeed slightly
improve the data analysis and prediction performance
of the neural network LSTM. It is helpful to help
people who need to use LSTM for data analysis (not
just stock analysis) to analyze data and make the
results more accurate.
The database of this study is not large enough,
and the experiment needs to be improved by adding
more databases. In future research, more influencing
factors and reference data will be added to improve
the experiment.
REFERENCES
Y. Wen, P. Lin, and X. Nie, “Research of stock price
prediction based on PCA-LSTM model,” in IOP
Conference Series: Materials Science and
Engineering, vol. 790, no. 1, Mar. 2020, p. 012109.
X. Zheng and N. Xiong, “Stock price prediction based on
PCA-LSTM model,” in Proc. 2022 5th Int. Conf.
Mathematics and Statistics, Jun. 2022, pp. 79–83.
Y. Gao, R. Wang, and E. Zhou, “Stock prediction based on
optimized LSTM and GRU models,” Scientific
Programming, vol. 2021, pp. 1-8, 2021.
H. Liu, “A research on stock forecasting based on principal
component LSTM model,” in Proc. 2021 IEEE Int.
Conf. Advances in Electrical Engineering and
Computer Applications (AEECA), Aug. 2021, pp.
684–688.
K. Srijiranon, Y. Lertratanakham, and T. Tanantong, “A
hybrid framework using PCA, EMD and LSTM
methods for stock market price prediction with
sentiment analysis,” Applied Sciences, vol. 12, no. 21,
p. 10823, 2022.
J. Liu and D. Sun, “Stock price prediction based on principal
component analysis and long short-term memory
network,” Advances in Applied Mathematics, vol. 9, p.
1954, 2020.
W. Hu, “Stock price prediction based on IndRNN-LSTM
model,” Advances in Applied Mathematics, vol. 11, p.
209, 2022.
L. Gu and X. Wang, “Research on stock price prediction
based on LSTM model: A case study of Poly
Development,” Advances in Social Sciences, vol. 11,
p. 4517, 2022.
G. B. Kim, C. I. Hwang, and M. R. Choi, “PCA-based
multivariate LSTM model for predicting natural
groundwater level variations in a time-series record
affected by anthropogenic factors,” Environmental
Earth Sciences, vol. 80, p. 1-21, 2021.
X. Zhang, X. Lu, W. Li, and S. Wang, “Prediction of the
remaining useful life of cutting tool using the Hurst
exponent and CNN-LSTM,” The Int. Journal of
Advanced Manufacturing Technology, vol. 112, pp.
2277-2299, 2021.
R. Daneshjou, K. Vodrahalli, R. A. Novoa, M. Jenkins, W.
Liang, V. Rotemberg, A. S. Chiou, "Disparities in
dermatology AI performance on a diverse, curated
clinical image set," Science Advances, vol. 8, no. 31,
pp. eabq6147, 2022.
X. Li, H. Xie, L. Chen, J. Wang, and X. Deng, "News impact
on stock price return via sentiment analysis,"
Knowledge-Based Systems, vol. 69, pp. 14-23, 2014.
X. Ding, Y. Zhang, T. Liu, and J. Duan, "Deep learning for
event-driven stock prediction," in Twenty-fourth
International Joint Conference on Artificial
Intelligence, June 2015.