2.3.4 Convolutional Neural Networks (CNN)
Although CNNs are typically used for image data,
they can be applied to time-series data like stock
prices by treating them as 1D data. CNNs use
convolutional filters to capture local patterns in the
data. In stock prediction, CNNs can extract features
from financial data, such as technical indicators, and
pass these features to other models (like RNNs) for
prediction. CNNs are implemented using libraries
like PyTorch or Keras. CNNs have been innovatively
combined with LSTMs to capture both local patterns
and long-term dependencies in stock data, providing
more comprehensive predictions. Studies such as
those by Wang et al. (Wang et al., 2022) demonstrate
that CNN-LSTM hybrids significantly improve
prediction accuracy by capturing both immediate and
historical market dynamics. Additionally, multi-scale
CNNs have been explored to capture patterns at
different time resolutions.
3 DISCUSSIONS
The application of machine learning in stock market
prediction has significantly evolved from traditional
methods to advanced deep learning models.
Traditional ML models such as Linear Regression,
Random Forest, SVM and KNN have been
foundational in stock prediction, but they come with
limitations. For example, Linear Regression assumes
a linear relationship, which often oversimplifies stock
market dynamics, while SVMs and Random Forests
struggle with high-dimensional data without proper
feature extraction techniques like PCA. These models
are generally easier to implement and interpret, but
they often fail to capture the complex, non-linear
relationships present in financial data.
This is where deep learning models have shown
clear advantages. Models like ANNs, RNNs, LSTM,
and CNNs have enhanced the prediction process by
handling non-linearity and large-scale datasets
effectively. ANNs can process intricate patterns in
stock prices, volumes, and indicators, whereas RNNs
and LSTMs are particularly effective in dealing with
sequential time-series data, accounting for temporal
dependencies in stock prices. Moreover, LSTM’s
ability to mitigate vanishing gradients has made it
highly effective in predicting long-term trends, and
CNNs have innovatively been applied to extract
features from time-series data by treating stock prices
as 1D data.
Despite the promise of AI models in stock market
prediction, they come with significant challenges.
One of the major limitations is interpretability.
Traditional models like Linear Regression and
Decision Trees are relatively easy to interpret because
the decision-making process can be traced back to
individual variables. However, deep learning models,
particularly neural networks, function as “black
boxes,” making it difficult to understand how
predictions are made. This raises concerns about trust
and transparency, especially in high-stakes financial
environments.
Another challenge is applicability. While AI
models can be powerful when trained on large
datasets, their performance may deteriorate when
applied to different market conditions. Financial
markets are often influenced by external factors such
as government policies, global news, and economic
shocks, which are difficult to quantify and integrate
into models. These external factors can result in
distribution differences, making the models less
robust in handling real-time changes in the market.
For instance, a model trained on data from a stable
market may not perform well during times of crisis,
as it cannot adapt quickly enough to sudden shifts.
Lastly, the integration of external factors such as
policy changes, geopolitical events, and news into AI
models remains a challenge. Although models like
Natural Language Processing (NLP) have been
applied to analyze news articles and social media
sentiment, accurately quantifying the impact of such
information on stock prices is still an area of active
research.
Looking ahead, there are several advancements
that could address the current challenges in AI-driven
stock prediction. One promising direction is the
development of expert systems and the use of
explainable AI methods like Shapley Additive
exPlanations (SHAP) and Local Interpretable Model-
agnostic Explanations (LIME). These techniques aim
to provide insights into how models make
predictions, enhancing transparency and allowing
traders to make more informed decisions. For
instance, SHAP values can show the contribution of
each feature in a stock prediction model, making it
easier to identify key factors influencing predictions.
Another exciting area is transfer learning and
domain adaptation. In the context of stock prediction,
transfer learning could allow models trained on one
set of market conditions to adapt more easily to new
conditions or even different financial markets. This
can help overcome the issue of distribution
differences by enabling models to learn from smaller
datasets or those from different domains, thereby
increasing their adaptability.