Financial Time Series Forecasting Using Deep Learning Network
Financial Time Series Forecasting Using Deep Learning Network
Financial Time Series Forecasting Using Deep Learning Network
net/publication/327311623
CITATIONS READS
16 745
4 authors, including:
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Rajni Bala on 19 March 2021.
Abstract. The analysis of financial time series for predicting the future
developments is a challenging problem since past decades. A forecast-
ing technique based upon the machine learning paradigm and deep
learning network namely Extreme Learning Machine with Auto-encoder
(ELM-AE) has been proposed. The efficacy and effectiveness of ELM-AE
has been compared with few existing forecasting methods like Gener-
alized Autoregressive Conditional Heteroskedastcity (GARCH), General
Regression Neural Network (GRNN), Multiple Layer Perceptron (MLP),
Random Forest (RF) and Group Method of Data Handling (GRDH).
Experimental results have been computed on two different time series
data that is Gold Price and Crude Oil Price. The results indicate that
the implemented model outperforms existing models in terms of quali-
tative parameters such as mean square error (MSE).
1 Introduction
Financial time series [3] are inherently noisy and nonstationary. The nonsta-
tionary time series are those where statistical parameters like mean, median,
standard deviation changes over a period of time. These characteristics of time
series will continuously alter the relationship between the input and output vari-
ables. It has been observed in literature that during forecasting recent observa-
tions have more impact rather distant observations. The same approach can be
considered in forecasting nonstationary time series [14].
Literature survey shows that a number of models have been built upon time
series data for forecasting and prediction analysis. The two widely used tech-
niques for time series forecasting are statistical and computational methods. The
statistical methods are used by economists for price forecasting studies. The
popular time series forecasting techniques include exponential smoothing and
autoregressive models like Autoregressive Integrated Moving Average (ARIMA)
[10] and GARCH family models [18]. However, recent trend shows that machine
learning algorithms have outperformed classical statistical techniques [7]. Among
c Springer Nature Singapore Pte Ltd. 2018
G. C. Deka et al. (Eds.): ICACCT 2018, CCIS 899, pp. 23–33, 2018.
https://doi.org/10.1007/978-981-13-2035-4_3
24 Preeti et al.
This section presents an overview about the basics of Extreme Learning Machine
and ELM Auto-encoder.
might not always converge to global minima. Because of these issues in learning
algorithms of feed-forward neural network, they might not lead to better gener-
alized solution. Unlike these traditional learning algorithms, ELM trains SLFN
by chossing input weights and hidden layer biases arbitrarily. So, there will not
be any iterative tuning of parameters. After choosing input weights and hidden
layer biases randomly, SLFN can be considered as a linear system. Then the
output weights of SLFN can be determined through simple generalized inverse
operation of the output matrix obtained from hidden layer.
Given a training set with N number of random samples S = {(xi ,ti ) | xi =
[xi1 , · · · , xin ]T ∈ IRn , ti = [ti1 , · · · , tim ]T ∈ IRm , i = 1, 2, · · · , N }, ELM is
mathematically modeled as [6]
Ñ
Ñ
βi g(xj ) = βi g(wi · xj + bi ) = oj , j = 1, · · · , N (1)
i=1 i=1
where wi = [wi1 , · · · , win ]T is the weight vector which connects input layer and
hidden layer, n is number of features, m is the number of classes, Ñ represents
number of hidden nodes and g(x) is the activation function (infinitely differen-
tiable). In this study, radial basis function (RBF) has been used as the activation
function. The steps used by ELM for training SLFN are as follows:
H(w1 , · · · , wÑ , b1 , · · · , bN , x1 , · · · , xN ) =
⎡ ⎤
g(w1 · x1 + b1 ) · · · g(wÑ · x1 + bÑ )
⎢ .. .. ⎥
⎣ . ··· . ⎦ (2)
g(w1 · xN + b1 ) · · · g(wÑ · xN + bÑ ) N ×Ñ
where, the ith column of H is the output of ith hidden node with respect to
inputs x1 , x2 , · · · , xN .
3. The output weight vector β connecting hidden nodes and output nodes is
calculated using β = H † T where T = [ti1 , · · · , tim ]T and H † is the Moore
Penrose generalized inverse of matrix H [13].
2.2 Auto-Encoder
Artificial neural network with deep architecture has become a powerful tool to
represent the high level abstract features of high dimensional data. Based on the
concept of ELM, the extreme learning machine with auto-encoder (ELM-AE)
[17] is proposed as an unsupervised learning algorithm. The aim of an auto-
encoder is to learn new encoding for set of data using deep learning architecture.
The basic idea of ELM-AE is consist of two stage process. Given a dataset
26 Preeti et al.
X = [xT1 , xT2 , · · · , xTN ] where, N represents the number of samples. In the first
stage, ni number of input features of original data are mapped onto nh number
of hidden neurons. Now, depending upon the size of ni and nh , three different
architectures of ELM-AE are possible: (1) compressed architecture, where ni >
nh (2) equal dimension architecture, ni = nh (3) sparse architecture, ni < nh .
The mapping of input xi with ni number of features to a nh dimensional space
is calculated as follows:
h(xi ) = g(aT xi + b) (3)
where h(xi ) ∈ IRh is the hidden layer output vector with respect to xi , a and
b are input weight matrix and baises of hidden units respectively, and function
g(·) represents an activation function which can be any non differentiable or
piecewise continuous function. Finally, the output vector of auto-encoder can be
calculated using
f (xi ) = h(xi )T β, i = 1, 2, ..., N (4)
In the second stage of ELM-AE, the weight vector of output layer that is β
is computed by minimizing the error loss function. The closed-form solution to
calculate β is as follows:
3 Proposed Methodology
The framework followed to forecast time series data is depicted in Fig. 1. It shows
the several stages followed as a flow chart to predict the forecast value of a time
series.
The step-by-step procedure for forecasting financial time series using the pro-
posed ELM-AE is described as follows. Let Y = (y1 , y2 , · · · , yk , yk+1 , · · · , yN ) be
the set of N observations of a financial series recorded at time t = (1, 2, · · · , k, k+
1, · · · , N ) respectively. Then the output variable that is label can be forecasted
as follows:
2. Normalize the obtained data in Eq. 6 in the range of [0,1]. This transformation
of data is required to avoid differences in the smallest and largest value of a
time series dataset.
3. The normalized dataset is divided into 80/20 partitions of training and test
set respectively. Extreme learning machine algorithm is applied to obtain a
model using training set. While, developing a forecasting model using ELM, a
grid search has been performed to obtain the best set of values for parameters,
i.e. number of hidden neurons and radial function parameter. The grid-search
is performed for number of hidden neurons = {1,3,· · · ,99,101} and activation
function parameter = {2−6 , 2−5 , · · · , 20 , 21 }. The obtained model is tested
on test set.
28 Preeti et al.
4 Experimental Design
In this section, there is a brief description about the various datasets used
for experiments and the performance measures used for evaluation of proposed
model.
The Gold-Price data and Crude-Oil price data used for the study are pre-
processed before using them with proposed model. The two major pre-processing
steps performed are as follows:
Among several performance measures, Mean Squared Error (MSE) is the one
that can be used to evaluate the performance of proposed model on time series
data. It is defined as in Eq. 7
N
i=1 (yt − y˜t )2
M SE = (7)
N
where, N represents the total number of forecasts obtained, yt and y˜t are actual
and forecasted values at time t respectively. The MSE (see Eq. 7) measures the
average of the squares of the errors or deviations from true value. It is basi-
cally the difference between estimator and estimated. MSE is useful to measure
accuracy for a continuous variable. So lesser the mean square error better is the
model.
Table 1. Comparison of results for Gold-Price data using proposed and other models
Table 2. Comparision of results for Crude-Oil Price data using proposed and other
models
models presented in this study are better than other models proposed in related
work in terms of MSE. Since, autoencoder has been applied on crude-oil price
data with different number of hidden neurons to retrieve the enriched set of
features. Also, it shows that the parameter number of hidden neurons used by
autoencoder plays an important role in forecasting.
Figure 5 depicts the actual price value and predicted value for crude-oil series
data. It can be seen in the Fig. 5 that the actual and predicted values of crude-oil
data are very close to each other. This shows that the prediction capability of
proposed ELM-AE method is good.
6 Conclusion
The main aim of this paper was to study the deep learning based technique for
time series prediction. This paper proposed an autoencoder based ELM algo-
rithm, ELM-AE to forecast different time series data. The experiments have
been performed on two different financial time series i.e. Gold-Price (USD) and
Crude-Oil Price (USD). It is observed that the proposed ELM-AE yielded statis-
tically significant results compared to other forecasting models such as GARCH,
MLP, GRNN, GMDH and RF on two time series datasets in terms of MSE.
The spectacular performance of ELM-AE is due to the presence of a deep learn-
ing approach that is autoencoder before ELM algorithm, which yeilded enriched
set of features used for further modeling. The proposed model ELM-AE based
on auto-encoder provides quiet promising results in forecasting. The obtained
results outperform the other methods which indicate its further use in forecast-
ing other financial or non financial time series.
References
1. http://www.quandl.com/LBMA/GOLD-Gold-Price-London-Fixing
2. http://www.quandl.com/data/FRED/DCOILBRENTEU-Crude-Oil-Prices-
Brent-Europe
Financial Time Series Forecasting Using Deep Learning Network 33