# An Advanced Deep Learning Model for Short-Term
Forecasting U.S. Natural Gas Price and Movement

Ioannis E. Livieris, Emmanuel Pintelas, Niki Kiriakidou, Stavros Stavroyiannis

► To cite this version:

Ioannis E. Livieris, Emmanuel Pintelas, Niki Kiriakidou, Stavros Stavroyiannis. An Advanced Deep Learning Model for Short-Term Forecasting U.S. Natural Gas Price and Movement. 16th IFIP International Conference on Artificial Intelligence Applications and Innovations (AIAI), Jun 2020, Greece. pp.165-176, 10.1007/978-3-030-49190-1_15. hal-03677622

HAL Id: hal-03677622

https://inria.hal.science/hal-03677622

Submitted on 24 May 2022

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# An advanced deep learning model for short-term forecasting U.S. natural gas price and movement

Ioannis E. Livieris<fnref n="1" />, Emmanuel Pintelas<fnref n="1" />, Niki Kiriakidou<fnref n="2" />, and Stavros Stavroyiannis<fnref n="3" />

**Abstract.** Natural gas constitutes one of the most actively traded energy commodity with a significant impact on many financial activities of the world. The accurate natural gas price prediction and the direction of price changes are considered essential since these forecasts are utilized in energy sustainability planning, commodity trading and decision making, covering both the supply and demand side of natural gas market. In this research, a new deep learning prediction model is proposed for short-term forecasting natural gas price and movement. The proposed forecasting model exploits the ability of convolutional layers for providing a deep insight in natural gas data and the efficiency of LSTM layers for learning short-term and long-term dependencies. Additionally, a significant advantage of the proposed model is its abilities to predict the price of natural gas on the following day (regression) and also to predict if the price on the next day will increase, decrease or stay stable (classification) with respect to today's price. The conducted series of experiments demonstrated that the proposed model considerably outperforms state-of-the-art deep learning and machine learning models.

**Keywords:** Deep learning· convolutional layers· LSTM· natural gas prediction· time series.

## 1 Introduction

Crude oil and natural gas play strategic roles in socio-economic development around the world and global demand for energy is continuously rising because developed countries consume large amounts of energy, while demand in developing countries is increasing. They constitute the major energy sources for the global economy and price forecasting is significant for a variety of reasons including energy investment, policy decisions, portfolio diversification and hedging capabilities. Benchmarks for the crude oil include the Brent crude oil from four different fields in the North Sea, the Forties Blend, the Oseberg and Ekofisk, the Western Texas Intermediate extracted from U.S. wells and sent via pipeline to

<footnote n="1">¹ Department of Mathematics, University of Patras, Greece.
livieris@upatras.gr, e.pintelas@math.upatras.gr</footnote>

<footnote n="2">² Department of Statistics and Insurance Science, University of Pireaus, Greece.
kiriakidou@unipi.gr</footnote>

<footnote n="3">³ Department of Accounting & Finance, University of Peloponesse, Greece.
computmath@gmail.com</footnote>
Oklahoma and the Dubai/Oman which consists a “basket” product from Middle East. Natural gas benchmark prices are the U.S. Henry hub natural gas, the Russian natural gas border price in Germany and the Indonesian Liquefied natural gas price in Japan.

Governments tighten up environmental regulations, seeking alternative energy sources to meet energy demand via reduction of the dependency on oil, with natural gas representing an economically viable alternative solution. While the three natural gas benchmarks exhibited a co-movement, there was a deviation (decoupling effect) of the U.S. natural gas [3, 9, 11], hereinafter referred as natural gas, after the Global Financial Crisis. The rapidly increasing demand for energy by emerging markets, along with the production decrease by the Organization of Petroleum Exporting Countries (OPEC) in Middle East, resulted in high oil and natural gas prices for three years. In U.S., the hydraulic fracturing (fracking) technique used to recover gas and oil from shale rocks reduced the overall production costs and therefore the natural gas price. This was reinforced by the locality of the market since unlike oil, natural gas is difficult to transport without a pipeline, unless it is liquefied which is costly. As a result, the prediction of natural gas price can potentially assist governments and financial investors for making their investment policies, gain significant profits and decrease their risks. Nevertheless, the accurate natural gas forecasting is generally considered, due to its chaotic nature, a complex and significantly challenging task.

During the last decade, significant deep learning techniques have been successfully applied in a variety of time-series forecasting problems [8, 13, 17]. These advanced techniques are probably the appropriate methods to extract knowledge from the noisy and chaotic nature of time-series data. Convolutional Neural Networks (CNNs) and LSTM networks constitute the most popular and widely utilized deep learning techniques. CNNs are based on convolutional layers which extract more valuable features by filtering out the noise of the input data while LSTM models are based on LSTM layers which capture sequence pattern information due to their distinct architecture. Nevertheless, classical CNNs are well suited to deal with spatial autocorrelation data, they are not usually adapted to correctly identify complex and temporal dependencies [1] while LSTM networks although they are dedicated to cope with temporal correlations, they manage only the features in the training set. Thus, a time-series prediction model which adopts the benefits of both techniques may significantly improve the forecasting performance.

In this work, we propose a new prediction model for short-term forecasting natural gas price which is based on the idea of exploiting the advantages of deep learning techniques. The proposed forecasting model exploits the capability of convolutional layers for learning the internal representation of the natural gas data and extracting useful patterns as well as the efficiency of LSTM layers for identifying short and long term dependencies. Additionally, the proposed prediction model has also ability of predicting the natural gas movement direction (increase, decrease or stay stable) of the next day with respect to today's price. Our conducted numerical experiments illustrate that the proposed model consid-
erably outperforms state-of-the-art deep learning and machine learning models
for the prediction of the natural gas daily price and movement.

The remainder of this paper is organized as follows: Section 2 presents a sur-
vey of recent studies, regarding the application of machine learning techniques
in natural gas forecasting. Section 3 presents a detailed description of the pro-
posed advanced deep learning model. Section 4 presents the data collection and
Section 5 presentes a series of numerical experiments. Section 6 discusses the
findings of this research and presents our conclusions.

## 2 Natural gas forecasting: State of the art

The recent developments of data mining and deep learning drew the attention of scientific community, attempting to gain significant insights on forecasting principal resources prices such as natural gas. During the last years, the problem of predicting the next day's price of natural gas arises frequently, due to its significance as a profitable commodity. This led to the requirement and development of new innovative forecasting models. In the sequel, we report the findings and outcomes from some rewarding studies regarding forecasting methodologies for natural gas price and movement.

Yu and Xu [16] proposed an improved back-propagation neural network model based on a combinational approach for short-term gas load forecasting. The proposed model was optimized by the real-coded genetic algorithm. They performed several modifications including an improved momentum factor and a self-adaptive learning rate as well as the determination of the initial weights and thresholds of the network by the genetic algorithm to avoid being trapped in local minimum. Such improvements exerted maximum performance of the neural network by accelerating the convergence speed and facilitating the forecasting efficiency. The data used in their research were recorded from Nov-2005 to Oct-2008 regarding natural gas load for Shanghai. Based on their preliminary numerical experiments, the authors stated that the proposed model was ideal for natural gas short-term load forecasting, presenting satisfactory prediction accuracy with a relatively small computation time.

Čeperić et al. [5] conducted a performance evaluation of traditional time-
series models: Naive, AR and ARIMA as well as of the machine learning mod-
els: neural networks and strategic seasonality-adjusted support vector regression
machines for short-term forecasting of Henry Hub spot natural gas prices. Addi-
tionally, they investigated the benefits of utilizing a feature selection technique
as a pre-processing step. To evaluate the successfulness of the compated models
in the short term forecasting of natural gas prices, they conducted a variety of
numerical experiments ranging of different input variables and transformations,
combinations of periods and window lengths. Their detailed experiemental anal-
ysis illustrated the forecasting efficiency of machine learning models as well as
the usefulness of feature selection techniques.

Merkel et al. [14] applied deep neural network methodologies for predict-
ing natural gas short-term load. The authors utilized historical data from 62
operating areas from U.S. local distribution companies, covering a wide area of different geographical regions hence, represent a variety of climates. Their proposed model was evaluated against the traditional models: linear regression and artificial neural network. Their numerical experiments presented that the proposed deep learning model exhibited better short-term load forecasts on average. Moreover, they stated that even the much simpler linear regression model outperformed the proposed model, in some test cases. Finally, they concluded that although the deep learning techniques are a dominant option which usually outperforms simpler forecasting methods, it may not constitute the proper methodology for every operating area.

Nevertheless, none of the mentioned studies considered the adoption and combination of advanced deep learning techniques for natural gas price prediction and movement. Our contribution aims on imposing convolutional layers for learning the internal representation of the natural gas data and LSTM layers for efficiently identifying short-term and long-term dependencies. Moreover, in contrast to previous research studies, we provide performance evaluation of various deep learning and machine learning models for both regression and classification problems.

## 3 CNN-LSTM model for short-term forecasting natural gas

The main contribution of this research is the development of a forecasting model, named CNN-LSTM, utilizing advanced deep learning techniques for the short-term prediction of natural gas price and movement. The proposed model is based on of two main components.

The first component consists of 2 convolutional layers of 32 and 64 filters of size (2, ), using same padding. Convolutional layers are specially designed data pre-processing layers which filter the input data for learning their internal representation. More specifically, the convolution kernel, called filter, can be considered as a tiny window which “slides” through each input instance and applies complex mathematical operations (convolutions) on each sub-region which this specified window “meets”. The application of several convolution kernels on the input data, results in the development of new convolved features which are usually more useful than the original ones.

The second component consists of a LSTM layer of 70 units and a dense layer of 16 neurons. LSTM layers process the generated features in order to identify short-term and long-term dependencies in the times series and provide an accurate prediction. Memory blocks and adaptive gate units constitute the major novelty of a LSTM layer. The former contain memory cells with self-connections for memorizing the temporal state while the latter control the information flow in the memory block. With the treatment of the hidden layer as a memory unit, LSTM can cope the correlation within time-series in both short and long term.

An overview of the proposed CNN-LSTM forecasting model architecture is depicted in Figure 1.
<figure><img src="image_2.png" /><figcaption>Fig. 1. CNN-LSTM forecasting model architecture</figcaption></figure>

## 4 Data

The data utilized in this research concern the daily natural gas prices in USD from Jan-2015 to Dec-2019 which were obtained from U.S. Energy Information Administration (www.eia.gov). Table 1 summarizes the descriptive statistics including the measures: Minimum, Mean, Maximum, Median, Standard Deviation (Std. Dev.), Skewness and Kurtosis.

<table><caption>Table 1. Descriptive statistics for natural gas daily prices</caption><thead><tr><td>Minimum</td><td>Mean</td><td>Maximum</td><td>Median</td><td>Std. Dev.</td><td>Skewness</td><td>Kurtosis</td></tr></thead><tbody><tr><td>1.49</td><td>2.75</td><td>6.24</td><td>2.78</td><td>0.37</td><td>0.98</td><td>5.25</td></tr></tbody></table>

The data were divided into training set and testing set. The training set consists of natural gas daily prices from 01-Jan-2015 to 31-Dec-2018 (1129 days) which ensures an adequate range of long and short-term trends. The testing set consists of daily prices from 01-Jan-2018 to 31-Dec-2019 (146 days) which ensures a substantial amount of unseen "out-of-sample" data for evaluating the compared forecasting models.

At this point, it is worth mentioning that in any attempt to increase the training dataset utilizing prices from past years, lead to the reduction of the performance of all evaluated forecasting models.

## 5 Experimental methodology

In this section, we evaluate the performance of the proposed forecasting model against LSTM forecasting models and the state-of-the-art machine learning mod-
<figure><img src="image_3.png" /><figcaption>Fig. 2. Daily natural gas prices trend from January 2015 to December 2019</figcaption></figure>

els: Support Vector Regression (SVR) [7], Artificial Neural Network (ANN) [6] and Decision Tree Regression (DTR) [2]. For fairness and for performing an objective comparison, the hyper-parameters of all algorithms were selected in order to maximize their experimental performance. A brief description of the specification of each prediction model and its hyper-parameters is presented in Table 2.

The implementation code was written in Python 3.4 on a PC (Intel(R) Core(TM) i7-6700HQ CPU 2.6GHz, 16 Gbyte RAM) while the deep learning and machine learning models were implemented using Keras library [10] and Scikit-learn library [15], respectively. Notice that all LSTM models, the ANN as well as the proposed CNN-LSTM model were trained utilizing Adaptive Moment Estimation (ADAM) algorithm for 100 epochs with a batch size equal to 128 and a mean-squared loss function which reported the best overall results.

The regression performance of all forecasting models was measured using the performance metrics: Root Mean Square Error (RMSE) and the Mean Absolute Error (MAE). Furthermore, regarding the classification problem of predicting whether the natural gas price on the next day would increase (*Up*), decrease (*Down*) or stay stable (–) with respect to today’s price, the performance of each model was evaluated using the performance metrics: Accuracy (Acc), Area Under Curve (AUC) and $F_1$-score ($F_1$). In this research, we utilized three different prices for the forecasting horizon, namely 4, 6 and 12. The forecasting horizon *F* stands for the number of natural gas daily prices which are taken into consideration by each model for predicting the daily price on the following day. Its price is critical for the efficiency of an intelligent forecasting model [12].

Tables 3, 4 and 5 present the performance of the proposed CNN-LSTM forecasting model against the state-of-the-art prediction models, relative to forecasting horizon 4, 6 and 12, respectively. It is worth mentioning that for each performance metric the best performance was highlighted in bold. Regarding the natural gas price prediction problem, CNN-LSTM and SVR highlighted the lowest RMSE and MAE score, followed by ANN and LSTM models which exhibited similar regression performance. Regarding the classification problem of
<table><caption>**Table 2.** Parameter specification of state-of-art machine learning and deep learning forecasting models</caption><thead><tr><th>Model</th><th>Description</th></tr></thead><tbody><tr><td>SVR</td><td>Kernel = RBF, C = 1.0, gamma = 10<sup>-1</sup>.</td></tr><tr><td>ANN</td><td>1 hidden layer with 20 neurons and an output layer of 1 neuron.</td></tr><tr><td>DTR</td><td>Criterion = 'mse', max depth = unlimited, min samples split = 2.</td></tr><tr><td>LSTM<sub>1</sub></td><td>LSTM layer with 70 units.<br>Output layer with 1 neuron.</td></tr><tr><td>LSTM<sub>2</sub></td><td>LSTM layer with 70 units.<br>Dense layer with 8 neurons.<br>Output layer with 1 neuron.</td></tr><tr><td>LSTM<sub>3</sub></td><td>LSTM layer with 70 units.<br>LSTM layer with 30 units.<br>Output layer with 1 neuron.</td></tr><tr><td>LSTM<sub>4</sub></td><td>LSTM layer with 50 units.<br>LSTM layer with 20 units.<br>Dense layer with 8 neurons.<br>Output layer with 1 neuron.</td></tr></tbody></table>

predicting if the price will increase, decrease or stay stable on the following day, CNN-LSTM exhibited the best performance considerably outperforming all other state-of-the-art models. More specifically, CNN-LSTM reported 55.25%, 55.03% and 53.97% accuracy for forecasting horizon equal to 4, 6 and 12, respectively, followed by LSTM₂ which reported 50.69%, 50.69% and 49.44%, in the same situations. Moreover, CNN-LSTM exhibited the best (highest) AUC for all prices of forecasting horizon and the best F₁-score for F = 6 and F = 12.

Next, we demonstrate a deeper insight about the classification efficiency of the proposed forecasting model CNN-LSTM by presenting the confusion matrix regarding all forecasting horizons and compare it with that of the LSTM₂ model which presented the best performance among state-of-the-art models. The confusion matrix can be considered as a complete evaluation methodology for describing and depicting in a compact way, valuable and useful information, regarding to a model's forecasting performance.

Tables 6 and 7 present the confusion matrices of LSTM₂ and CNN-LSTM, respectively. Notice that each row and each column of all confusion matrices represent the instances in an actual and in a predicted class, respectively. Firstly, based on the presented confusion matrices we can easily conclude that the exclusive prediction accuracy of the “Stable” class is very high for both compared prediction model. Additionally, the CNN-LSTM model managed to exhibit the best distribution of correctly identified instances per class for every forecasting horizon. This probably means that this model managed to keep a balance on learning the patterns which describe every class, consisting in total a more re-
liable and robust prediction model. In contrast, the LSTM<sub>2</sub> model seems to be significantly biased since it misclassified most “Down” instances as “Up”. This implies that it ignored most data patterns and information which describe and separate “Up” and “Down” classes.

<table><caption>**Table 3.** Performance comparison of the CNN-LSTM model against traditional regression models for $F = 4$</caption><thead><tr><th>Model</th><th>RMSE</th><th>MAE</th><th>Acc</th><th>AUC</th><th>F<sub>1</sub></th></tr></thead><tbody><tr><td>ANN</td><td>0.113</td><td>0.087</td><td>51.53%</td><td>0.651</td><td>0.584</td></tr><tr><td>SVR</td><td><strong>0.093</strong></td><td><strong>0.067</strong></td><td>50.69%</td><td>0.638</td><td>0.565</td></tr><tr><td>DTR</td><td>0.125</td><td>0.100</td><td>47.22%</td><td>0.578</td><td>0.473</td></tr><tr><td>LSTM<sub>1</sub></td><td>0.109</td><td>0.083</td><td>49.44%</td><td>0.632</td><td>0.557</td></tr><tr><td>LSTM<sub>2</sub></td><td>0.112</td><td>0.086</td><td>50.69%</td><td>0.656</td><td><strong>0.638</strong></td></tr><tr><td>LSTM<sub>3</sub></td><td>0.110</td><td>0.084</td><td>49.44%</td><td>0.618</td><td>0.532</td></tr><tr><td>LSTM<sub>4</sub></td><td>0.111</td><td>0.084</td><td>50.07%</td><td>0.605</td><td>0.508</td></tr><tr><td>CNN-LSTM</td><td><strong>0.093</strong></td><td><strong>0.067</strong></td><td><strong>55.25%</strong></td><td><strong>0.680</strong></td><td>0.571</td></tr></tbody></table>

<table><caption>**Table 4.** Performance comparison of the CNN-LSTM model against traditional regression models for $F = 6$</caption><thead><tr><th>Model</th><th>RMSE</th><th>MAE</th><th>Acc</th><th>AUC</th><th>F<sub>1</sub></th></tr></thead><tbody><tr><td>ANN</td><td>0.106</td><td>0.081</td><td>50.14%</td><td>0.651</td><td>0.579</td></tr><tr><td>SVR</td><td><strong>0.092</strong></td><td><strong>0.067</strong></td><td>48.61%</td><td>0.633</td><td>0.566</td></tr><tr><td>DTR</td><td>0.125</td><td>0.099</td><td>47.64%</td><td>0.578</td><td>0.472</td></tr><tr><td>LSTM<sub>1</sub></td><td>0.107</td><td>0.082</td><td>51.36%</td><td>0.643</td><td>0.566</td></tr><tr><td>LSTM<sub>2</sub></td><td>0.102</td><td>0.077</td><td>50.69%</td><td>0.631</td><td>0.553</td></tr><tr><td>LSTM<sub>3</sub></td><td>0.106</td><td>0.080</td><td>49.86%</td><td>0.634</td><td>0.561</td></tr><tr><td>LSTM<sub>4</sub></td><td>0.114</td><td>0.087</td><td>50.83%</td><td>0.618</td><td>0.527</td></tr><tr><td>CNN-LSTM</td><td>0.093</td><td><strong>0.067</strong></td><td><strong>55.03%</strong></td><td><strong>0.674</strong></td><td><strong>0.589</strong></td></tr></tbody></table>

<table><caption>**Table 5.** Performance comparison of the CNN-LSTM model against traditional regression models for $F = 12$</caption><thead><tr><th>Model</th><th>RMSE</th><th>MAE</th><th>Acc</th><th>AUC</th><th>F<sub>1</sub></th></tr></thead><tbody><tr><td>ANN</td><td>0.119</td><td>0.092</td><td>49.86%</td><td>0.629</td><td>0.550</td></tr><tr><td>SVR</td><td><strong>0.094</strong></td><td><strong>0.069</strong></td><td>48.39%</td><td>0.635</td><td>0.558</td></tr><tr><td>DTR</td><td>0.128</td><td>0.099</td><td>50.97%</td><td>0.592</td><td>0.482</td></tr><tr><td>LSTM<sub>1</sub></td><td>0.111</td><td>0.086</td><td>48.33%</td><td>0.632</td><td>0.563</td></tr><tr><td>LSTM<sub>2</sub></td><td>0.109</td><td>0.084</td><td>49.44%</td><td>0.628</td><td>0.551</td></tr><tr><td>LSTM<sub>3</sub></td><td>0.104</td><td>0.079</td><td>51.67%</td><td>0.649</td><td>0.579</td></tr><tr><td>LSTM<sub>4</sub></td><td>0.127</td><td>0.100</td><td>49.31%</td><td>0.624</td><td>0.545</td></tr><tr><td>CNN-LSTM</td><td>0.104</td><td>0.078</td><td><strong>53.97%</strong></td><td><strong>0.670</strong></td><td><strong>0.620</strong></td></tr></tbody></table>
<table><caption>**Table 6.** Confusion matrices of LSTM<sub>2</sub> model for forecasting horizon 4, 6 and 12</caption><thead><tr><th></th><th colspan="3">Down - Up</th><th colspan="3">Down - Up</th><th colspan="3">Down - Up</th></tr></thead><tbody><tr><th>Down</th><td>14</td><td>0</td><td>55</td><th>Down</th><td>22</td><td>0</td><td>47</td><th>Down</th><td>40</td><td>0</td><td>29</td></tr><tr><th>-</th><td>2</td><td>15</td><td>0</td><th>-</th><td>5</td><td>12</td><td>0</td><th>-</th><td>10</td><td>7</td><td>0</td></tr><tr><th>Up</th><td>9</td><td>0</td><td>49</td><th>Up</th><td>16</td><td>0</td><td>42</td><th>Up</th><td>31</td><td>0</td><td>27</td></tr></tbody><tfoot><tr><td colspan="3"></td><td>F = 4</td><td colspan="3"></td><td colspan="3">F = 6</td></tr><tr><td colspan="3"></td><td></td><td colspan="3"></td><td colspan="3">F = 12</td></tr></tfoot></table>

<table><caption>**Table 7.** Confusion matrices of CNN-LSTM model for forecasting horizon 4, 6 and 12</caption><thead><tr><th></th><th colspan="3">Down - Up</th><th colspan="3">Down - Up</th><th colspan="3">Down - Up</th></tr></thead><tbody><tr><th>Down</th><td>28</td><td>0</td><td>41</td><th>Down</th><td>31</td><td>0</td><td>28</td><th>Down</th><td>35</td><td>0</td><td>34</td></tr><tr><th>-</th><td>5</td><td>12</td><td>0</td><th>-</th><td>5</td><td>12</td><td>0</td><th>-</th><td>9</td><td>8</td><td>0</td></tr><tr><th>Up</th><td>20</td><td>0</td><td>38</td><th>Up</th><td>20</td><td>0</td><td>38</td><th>Up</th><td>27</td><td>0</td><td>31</td></tr></tbody><tfoot><tr><td colspan="3"></td><td>F = 4</td><td colspan="3"></td><td colspan="3">F = 6</td></tr><tr><td colspan="3"></td><td></td><td colspan="3"></td><td colspan="3">F = 12</td></tr></tfoot></table>

Summarizing, it is worth mentioning that the interpretation of Tables 3-7 highlight that CNN-LSTM model is generally preferable for forecasting natural gas price and movement, considerably outperforming traditional state-of-the-art models in both regression and classification tasks.

In the sequel, we evaluate the forecasting reliability of the proposed model CNN-LSTM models, by performing a test of autocorrelation in the residuals [4]. This test examines the presence of autocorrelation between the residuals (differences between predicted and actual prices) which in case it exists, implies that the forecasting model may be inefficient, since it did not manage to capture all the possible information contained in the training set. Two significant tools for testing the autocorrelation of the residuals are the Auto-Correlation Function (ACF) plot and the Ljung-Box Q-test. The ACF [4] is obtained from the linear correlation of each residual to the others in different lags and illustrates the intensity of the temporal auto-correlation. The portmanteau Ljung-Box Q-test [4] assesses the null hypothesis ($H_0$) that “a series of residuals exhibits no autocorrelation for a fixed number of lags”.

Figures 3, 4 and 5 present the Auto-Correlation Function (ACF) plot of LSTM<sub>2</sub> and CNN-LSTM, for forecasting horizon equal to 4, 6 and 12, respectively. Notice that the confident limits (blue line) are constructed assuming that the residuals follow a Gaussian probability distribution. The ACF plot of CNN-LSTM are within 95% percent confidence interval for all lags regarding $F = 6$, which verifies that the residuals have no auto-correlation while for $F = 4$ and $F = 12$ the ACF plots present a small spike at lag 5, which reveal that there exists some negligibly autocorrelation in the residuals. In contrast, the ACF plots of LSTM<sub>2</sub> indicated that the assumption of no auto-correlation in the errors is violated which suggests that the model's forecasts may be inefficient, relative to all utilized prices of the forecasting horizon.

Table 8 reports the statistical analysis, performed by Ljung-Box Q-test for 10 lags with significance level $\alpha = 5\%$. The portmanteau test suggests that the CNN-LSTM model does not violate the assumption of no autocorrelation in the errors for $F = 4$ and $F = 6$ which implies that its forecasts may be efficient; while
for the LSTM₂ model, it suggests that there exists significant autocorrelation in
the residuals at the 5% level.

<figure><img src="image_4.png" /><figcaption>**Fig. 3.** ACF plots on the residuals of LSTM₂ and CNN-LSTM for *F* = 4</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>**Fig. 4.** ACF plots on the residuals of LSTM₂ and CNN-LSTM for *F* = 6</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>**Fig. 5.** ACF plots on the residuals of LSTM₂ and CNN-LSTM for *F* = 12</figcaption></figure>

# 6 Discussion and conclusions

In this section, we perform a discussion regarding the numerical performance of
our proposed CNN-LSTM model for forecasting natural gas price and movement
as well as the main findings and the limitations of this research.
<table><caption>**Table 8.** Ljung-Box Q-test for 10 lags with significance level α = 5%</caption><thead><tr><th rowspan="2">Model</th><th colspan="2">F = 4</th><th colspan="2">F = 6</th><th colspan="2">F = 12</th></tr><tr><th>p-value</th><th>H₀</th><th>p-value</th><th>H₀</th><th>p-value</th><th>H₀</th></tr></thead><tbody><tr><td>LSTM₂</td><td>0.0001</td><td>Rejected</td><td>0.0270</td><td>Rejected</td><td>0</td><td>Rejected</td></tr><tr><td>CNN-LSTM</td><td>0.0974</td><td>Accepted</td><td>0.1072</td><td>Accepted</td><td>0.0207</td><td>Rejected</td></tr></tbody></table>

The main contribution of this work is the development of a new forecasting model for the short-term prediction of natural gas price and movement. The proposed forecasting model exploits the capability of convolutional layers for learning the internal representation of the natural gas data and the efficiency of LSTM layers for identifying short-term and long-term dependencies. A significant advantage of the model is that it has the ability to predict the price of natural gas on the next day (regression) and also predicts if the price on the next day will increase, decrease or stay stable (classification) with respect to today's price. The presented numerical experiments highlighted that although LSTM models constitute a wide and efficient choice for addressing time-series problems, their use along with convolutional layers could provide a significant boost in increasing the forecasting performance.

The problem of forecasting natural gas price and movement can be considered to belong on chaotic time series problems. This means that accurate and reliable predictions are almost impossible since these problems are close to random walk processes, while the identification of possible existing patterns and their proper distinction among a large pool of noisy instances, seems to be a significantly challenging task.

The proposed forecasting model managed to achieve a noticeable performance increase in terms of accuracy, compared to traditional state-of-the-art prediction models, although the RMSE and MAE scores were slightly better. One possible reason is that the feature preprocessing stage, provided by the convolutional layers, managed to restrict the noise of each input sequence instance, extracting valuable and meaningful feature maps which assisted the LSTM model on its final prediction task.

It is worth mentioning that in real world applications such as the decision support for investment tasks regarding to natural gas stocks, a prediction model which achieves high classification accuracy would be considered much more efficient and valuable, compared to a model with better regression performance but lower accuracy score, since these investment decisions follow a "buy, hold, sell" strategy based on the price movement predictions "Up, Stable, Down". Therefore, the proposed model has a potential to assist trading and investment decisions forming up a reliable natural gas price movement predictor.

Finally, a limitation of the prediction model that it is unable to efficiently identify and report possible input sequences which can actually lead to more accurate predictions. This ability could be crucial and significant in real world applications, since investment and trading decisions would be performed just
only when the model identified reliable and accurate patterns, while noisy and uncertain input signals would be totally ignored, leading to safer decisions and probably higher returns. This constitutes an interesting and promising idea, which we intend to pursue in our future research.

## References

1. Bengio, Y., Courville, A., Vincent, P.: Representation learning: A review and new perspectives. IEEE Transactions on Pattern Analysis and Machine Intelligence 35(8), 1798-1828 (2013)

2. Breiman, L.: Classification and regression trees. Routledge (2017)

3. Brigida, M.: The switching relationship between natural gas and crude oil prices. Energy Economics 43, 48-55 (2014)

4. Brockwell, P.J., Davis, R.A.: Introduction to time series and forecasting. Springer (2016)

5. Čeperić, E., Žiković, S., Čeperić, V.: Short-term forecasting of natural gas prices using machine learning and feature selection algorithms. Energy 140, 893-900 (2017)

6. Daniel, G.: Principles of artificial neural networks, vol. 7. World Scientific (2013)

7. Deng, N., Tian, Y., Zhang, C.: Support vector machines: optimization based theory, algorithms, and extensions. Chapman and Hall/CRC (2012)

8. Fawaz, H., Forestier, G., Weber, J., Idoumghar, L., Muller, P.: Deep learning for time series classification: A review. Data Mining and Knowledge Discovery 33(4), 917-963 (2019)

9. Gatfaoui, H.: Linking the gas and oil markets with the stock market: Investigating the US relationship. Energy Economics 53, 5-16 (2016)

10. Gulli, A., Pal, S.: Deep Learning with Keras. Packt Publishing Ltd (2017)

11. Lin, B., Li, J.: The spillover effects across natural gas and oil markets: Based on the VEC-MGARCH framework. Applied Energy 155, 229-241 (2015)

12. Livieris, I.E., Pintelas, E., Kotsilieris, T., Stavroyiannis, S., Pintelas, P.: Weight-constrained neural networks in forecasting tourist volumes: A case study. Electronics 8(9), 1005 (2019)

13. Livieris, I.E., Pintelas, E., Pintelas, P.: A CNN-LSTM model for gold price time series forecasting. Neural Computing with Applications (2020) (to appear)

14. Merkel, G.D., Povinelli, R.J., Brown, R.H.: Short-term load forecasting of natural gas with deep neural network regression. Energies 11(8) (2018)

15. Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V.: Scikit-learn: Machine learning in Python. Journal of Machine Learning Research 12, 2825-2830 (2011)

16. Yu, F., Xu, X.: A short-term load forecasting model of natural gas based on optimized genetic algorithm and improved BP neural network. Applied Energy 134, 102-113 (2014)

17. Zhao, B., Lu, H., Chen, S., Liu, J., Wu, D.: Convolutional neural networks for time series classification. Journal of Systems Engineering and Electronics 28(1), 162-169 (2017)