4 DISCUSSION
The results elucidate the capabilities of the LSTM
model in forecasting stock prices, specifically
emphasizing the pivotal role of the loss function in
shaping predictive outcomes. Our evaluation, covering
accuracy, precision, recall, and F1-score, offers a
panoramic view of the model's prowess in discerning
the directional tendencies of stock prices.
4.1 Evaluation of Loss Functions
The study's chosen gamut of loss functions—Mean
Squared Error (MSE), Mean Absolute Error (MAE),
Mean Absolute Percentage Error (MAPE), and
Differenced Mean Absolute Error (D-MAE)—reveal
diverse impacts on the model's forecasting acumen:
MSE and MAE: Revered as classical loss
functions, both MSE and MAE underscore numerical
prediction accuracy concerning stock price values.
However, their potential to accurately map directional
nuances remains under question.
MAPE: Emphasizing relative error, MAPE
appears less adept for tasks demanding high precision,
such as stock prediction, primarily due to its
susceptibility to extreme values.
D-MAE: Emerging as a potential frontrunner, D-
MAE is custom-tailored to enhance traditional MAE by
factoring in the intricacies of stock price directionality,
thus demonstrating a commendable balance between
numerical accuracy and trend discernment.
4.2 Distinct Stock Performances
A closer observation of individual stocks—AAPL,
GOOG, MSFT, and AMZN—unveils distinct
predictive patterns. These patterns are likely driven by
the inherent market behaviors unique to each
company, emphasizing the need for tailored models or
strategies when predicting for specific stocks.
4.3 Comparative Analysis and Insights
The juxtaposition of different loss functions brings to
light the criticality of this choice in achieving superior
predictive results. While traditional loss functions like
MSE and MAE depict a decent performance,
specialized ones like D-MAE manifest an edge in
balancing prediction accuracy with trend identification.
4.4 Future Directions
Navigating the intricate maze of stock price
predictions necessitates an in-depth understanding of
various loss functions and their implications. As we
stride forward, research endeavors should pivot
towards exploring avant-garde loss functions and
refining model architectures, keeping pace with the
ever-evolving financial market landscape.
5 CONCLUSION
The endeavor to predict stock price movements is a
challenging and multifaceted process, given the
intricacies of global financial markets. By utilizing an
LSTM model and exploring the effects of different loss
functions on its predictive performance, this study has
shed light on the importance of selecting an
appropriate loss function. While traditional loss
functions like MSE and MAE provide reasonable
results, specialized loss functions such as D-MAE
emerge as better-suited for capturing the nuances of
stock price directionality. As financial markets
continually evolve, research in this realm should
remain iterative and adaptive, continually optimizing
algorithms and methodologies to improve prediction
accuracy and inform strategic investment decisions.
REFERENCES
D. P. Gandhmal and K. Kumar, “Systematic analysis and
review of stock market prediction techniques,”
Computer Science Review, vol. 34, p. 100190, 2019.
P. Chhajer, M. Shah, and A. Kshirsagar, "The applications
of artificial neural networks, support vector machines,
and long–short term memory for stock market
prediction," Decision Analytics Journal, vol. 2, p.
100015, 2022.
S. Ahlawat, Reinforcement Learning for Finance: Solve
Problems in Finance with CNN and RNN Using the
TensorFlow Library. Berkeley, CA: Apress L. P., 2023.
Y. Qiu, Y. Ren, and T. Xie, "Global factors and stock market
integration," International Review of Economics &
Finance, vol. 80, pp. 526–551, 2022.
M. Nabipour et al., "Deep learning for stock market
prediction," Entropy, vol. 22, no. 8, p. 840, 2020.
Yahoo Finance, "Download historical data in Yahoo
Finance," 2023. [online].
Available:https://help.yahoo.com/kb/SLN2311.html.
[Accessed : 07-Nov-2023]
L. Huang, Normalization Techniques in Deep Learning.
CA: Springer International Publishing, 2022.
G. V. Houdt, C. Mosquera and G. Napoles, “A review on
the long short-term memory model”, Artif Intell Rev 53,
pp. 5929-5955, 2020.
DAML 2023 - International Conference on Data Analysis and Machine Learning
176