
financial forecasting, particularly in high-frequency
trading environments, where traditional methods may
fall short. The dynamic nature of the model allowed
for more accurate and real-time predictions, crucial
for financial decision-making.
The potential of neural networks in forecasting
financial market volatility is also demonstrated in
(Hamid and Iqbal, 2004). The importance of data
pre-processing, variable selection and proper network
training in achieving accurate predictions are well
highlighted in the paper.
Despite many papers on forecasting financial in-
strument prices, there is a significant gap in simulta-
neous chronometer analysis of several time-frame sets
using neural networks. Solving this issue is the prin-
cipal scientific novelty of this paper.
3 METHODS
This section covers various aspects of this research,
including the dataset, the technical indicators used in
each timeframe, the labelling algorithm, and the neu-
ral networks employed.
3.1 Dataset
The dataset for this research consists of Apple Inc
(AAPL) data across the following three intraday time-
frames:
• 5-minute timeframe : 47,350 rows (70% of data)
• 15-minute timeframe: 15,963 rows (24% of data)
• 60-minute timeframe : 3,994 rows (6% of data)
The total number of rows is 68,307 with raw data
features including open, high, low, close and volume.
The data was accessed and downloaded from Alpha
Vantagethrough their API, selected for several rea-
sons, with the primary one being the ease of access
it offers, allowing for straightforward retrieval of data
through API calls.
The technical indicators were extracted from the
raw dataset and used as derived features. In this
research, the following technical indicators are also
included in the input data: momentum, volume,
moving averages, and directional indicators. These
technical indicators are distributed across three time
frames.
Short-Term Timeframe (5 Minutes)
This timeframe is used for analysing charts that focus
on shorter-term movements, typically on an intraday
or very high-frequency basis, such as hourly or every
couple of minutes (Achuthan and Hurst, 2021). The
aim of these charts is largely for determining the most
precise entry and exit points form the trends. Price
action (i.e. logic) is usually tested on the short-term
timeframe for the timing of trades (especially on an
intraday basis). For the purpose of this research, the
technical indicators On-Balance volume, parabolic
stop and reverse (parabolic SAR) and Williams Per-
cent Range (Williams%R) of the closing prices were
chosen for the short-term timeframe.
Medium-Term Timeframe (15 Minutes)
This timeframe is used for analysing charts that are
typically medium-term (i.e. daily charts) (Achuthan
and Hurst, 2021). The aim of these charts is largely
for determining the potential entry points based on
long-term trends seen in the longer term charts. For
the purpose of this research, the technical indicators
Exponential Moving Average, Alligator, Average Di-
rectional Index and Stochastic Oscillator of the clos-
ing prices were chosen for the medium-term time-
frame.
Long-Term Timeframe (60 Minutes)
As the name implies, this timeframe is used for
analysing charts that are typically longer term (i.e.,
weekly or monthly charts). The purpose of these
charts is largely to determine the long-term trends
(Achuthan and Hurst, 2021). For the purpose of
this research, the technical indicators Moving Aver-
age Convergence Divergence, Relative Strength In-
dex, Bollinger Bands and On-Balance-Volume of the
closing prices were chosen for the long-term time
frame.
The choice of these sets of technical indicators for
each of the above timeframes was determined by the
analysis of numerous empirical experiments that are
not of significant value to this paper.
3.2 Labelling Algorithm
The labelling algorithm is defined to classify the
movements of closing prices at each time interval
and for each timeframe into three categories: upward
(up), no action (wait) and downward (down) move-
ments. In order to achieve an accurate labelling al-
gorithm for the closing prices of each interval, there
are a number of inputs, with the first being the take
profit and stop loss levels denoted as take profit and
stop loss. In addition to these inputs, we include the
Returns, std deviation of asset returns (interpreted
as typical volatility(σ)), the Multiplier (a function
of individual risk appetite) and future returns (the
price change between the current closing price and
the closing price of the immediate future interval).
The multipliers are usually determined by the risk ap-
Ensemble of Neural Networks to Forecast Stock Price by Analysis of Three Short Timeframes
815