closing price, which is 236.48. According to Figure 1,
after reaching the lowest point in April 2024, the
stock prices started to go up and rose sharply after
May 2024. This might mean that during this time,
people's interest in this stock grew, leading to a higher
price.
Initial data processing and dataset division into
training and testing sets are part of the methodology.
Three regression models were employed: Random
Forest Regressor, Linear Regression, and XGBoost
Regressor, along with a combined model.
Classification models and voting classifiers were also
utilized to compare their performance. The combined
model was then used to predict the closing price five
days ahead.
2.2 Data Processing
2.2.1 Logarithmic Returns Calculation
To capture the percentage change in stock prices, this
paper calculate the logarithmic returns using
Equation (1).
πΏπππ
ππ‘π’ππ
ξ―§
=ln
(
πΆπππ π
ξ―§
)
βln
(
πΆπππ π

)(
1
)
This transformation helps stabilize the variance
and is commonly used in financial time series
analysis. The resulting series is denoted as log_return.
2.2.2 Augmented Dickey-Fuller Test
The log_return series is subjected to the Augmented
Dickey-Fuller (ADF) test to determine whether it is
stationary; the test statistic, p-value, and critical
values are extracted according to the test findings.
The time series is non-stationary, according to the
ADF test's null hypothesis; a series is considered
stationary if its p-value is less, often less than 0.05.
Table 2: The results of the ADF test.
ADF Statistic P value Critical values
-14.945638327 1.3028808059e-27
1% 5% 10%
-3.456780 -2.873171 -2.572968
The ADF test outcomes are displayed in Table 2,
which includes the ADF Statistic, P value, and
Critical values at different significance levels (1%,
5%, and 10%). The P value is incredibly small at
1.3028808059e-27, much below the conventional
threshold of 0.05, while the ADF Statistic is -
14.945638327. In contrast to the null hypothesis, this
suggests strong evidence that there are no stationary
time series. As a result, the series is deemed stagnant.
2.2.3 Moving Averages Calculation
To smooth the price data and capture trends, this
paper calculate the moving averages with different
window sizes by Equation (2).
Mπ΄
ξ―‘
=
1
π
ξ·πΆπππ π
ξ―
ξ―§
ξ―ξ
(
2
)
In this formula, ππ΄
ξ―‘
represents the moving
average on day n, n is the window size, and πΆπππ π
ξ―
is
the closing price on day i. Specifically, this paper
compute: MA_5 (5-day moving average),MA_10
(10-day moving average),MA_30 (30-day moving
average) and MA_60 (60-day moving average).
2.2.4 Relative Strength Index Calculation
A momentum indicator called the Relative Strength
Index (RSI) gauges the size of the most current
pricing movements to identify whether the market is
overbought or oversold. It is created using equations
(3) and (4).
RSI=100 β
100
1+π
π
(
3
)
where
RS=
π΄π£ππππππΊπππ
π΄π£πππππ£πΏππ π
(
4
)
Specifically, AverageGain is the average increase
in stock prices on days when the stock price went up
within a selected time period, and Average Loss is the
average decrease in stock prices on days when the
stock price went down within the same time period.
Higher RSI readings may indicate overbought
conditions, while lower values may indicate oversold
conditions. RSI values typically range from 0 to 100.
2.2.5 On-Balance Volume (OBV)
Calculation
OBV is a momentum indicator that relates price
changes to volume. It is calculated as shown in
Equation (5), Equation (6) and Equation(7) .
ππ΅π=ππ΅π

+π πππ
(
π₯πΆπππ π
ξ―§
)
Γππππ’ππ
ξ―§
(
5
)
where