Nonlinearity in forecasting energy commodity prices: Evidence from a focused time-delayed neural network

This paper aims to develop an artificial neural network – based forecasting model employing a nonlinear focused time-delayed neural network (FTDNN) for energy commodity market forecasts. To validate the proposed model, crude oil and natural gas prices are used for the period 2007 – 2020, including the Covid-19 period. Empirical findings show that the FTDNN model outperforms existing baselines and artificial neural network – based models in forecasting West Texas Intermediate and Brent crude oil prices and National Balancing Point and Henry Hub natural gas prices. As a result, we demonstrate the predictability of energy commodity prices during the volatile crisis period, which is attributed to the flexibility of the model parameters, implying that our study can facilitate a better understanding of the dynamics of commodity prices in the energy market.


Introduction
It is widely acknowledged that fluctuations in energy commodity markets have a major effect on the global economy, particularly with respect to geopolitical risks (Sharif et al., 2020;Huang et al., 2021), stock markets (Enwereuzoh et al., 2021), currency markets (Baghestani et al., 2019;Chkir et al., 2020) and the housing market (Kilian and Zhou, 2022).Given the global economic importance of energy commodities, accurate price forecasts are important to a wide range of players in the energy industry and beyond (Chu et al., 2022).Predicting the price of energy proved particularly important during crises because there are considerable fluctuations in global energy demand (Wei et al., 2019), and the energy price reacts negatively to uncertainty (Lin and Bai, 2021;Narayan, 2022;Salisu et al., 2020).Furthermore, the energy sector has been found to be a prominent transmitter of volatility shocks to other economic sectors (Laborda and Olmo, 2021;Mensi et al., 2022).
The development of international capital and currency markets has profoundly affected the energy commodity markets, which have experienced structural changes.This further affected the energy commodity pricing mechanism, which is increasingly dynamic and complex (Lin and Bai, 2021).In general, energy commodity prices are distinguished by non-stationarity, dynamics, and uncertainty (Wang et al., 2019), and several time-series models have been developed to capture the relationships between commodity prices and their determinants, such as the threshold autoregressive model (TAR) (de Albuquerquemello et al., 2018), the heterogeneous autoregressive model (HAR) (Chen et al., 2020), vector autoregressive (VAR) model (Chatziantoniou et al., 2021), univariate regression model (Lv and Wu, 2022), the generalized autoregressive conditional heteroskedastic model (GARCH) (Marchese et al., 2020;Lin et al., 2020) and the autoregressive integrated moving average model (ARIMA) (Wang et al., 2018).
The abundance of studies devoted to energy commodity forecasting illustrates the critical relevance of solid forecasts for policymaking, accounting for economic fluctuations, and for managing risk in companies involved in the production and sale of energy commodities (Conlon et al., 2022).Investors can also exploit an accurate forecast of energy commodity prices to pursue high-return (risk adjusted) trading strategies (Dbouk and Jamali, 2018).Despite the importance and impact of fluctuations in energy commodity prices on the global economy, forecasting energy prices remains problematic.The main limitation of existing models is their tendency to account for the process of time series by means of a linear relationship between the forecasted commodity prices and their determinants under the assumption of stationary data sets.On the contrary, artificial neural networks (ANNs) do not necessitate any prior assumption about the relationship.ANNs are entirely self-adaptive, data-driven systems, able to approximate any nonlinear function with reasonable accuracy (Abedin et al., 2019;Ramyar and Kianfar, 2019).Perhaps the most popular forecasting model in financial and commodity markets is the multilayer perceptron (MLP) due to its ability to map nonlinear relationships between inputs and outputs (Balkin and Ord, 2000).However, MLPs do not effectively model the dynamic properties of the time series of energy commodity prices.This is only possible using recurrent neural network structures.Recurrent ANNs have been used to forecast oil prices, including the random Elman recurrent ANN (Wang and Wang, 2016), long short-term memory ANN (Verma, 2021), nonlinear autoregressive ANN (Cheng et al., 2019), Elman recurrent ANN model with variational learning rate (Wang and Wang, 2020a), hybrid models integrating the Elman recurrent ANN with random inheritance (Wang and Wang, 2020b) and transfer entropy-based approach (Dhifqaui et al., 2022).
A focused time-delayed neural network (FTDNN) was used in related electric load forecasting due to its capacity to model to considerable variations caused by fluctuations in energy demand (Kelo and Dudul, 2011).This recurrent ANN-based model not only increased the predictive accuracy but also improved the stability of the convergence due to its dynamic properties.Augmented with short-term memory, the FTDNN model is reactive to the temporal structure of time-series information.Furthermore, FTDNNs were effective in forecasting the term structure of future curves when modeling continuous contracts of crude oil.
This study contributes to the existing literature in several distinct ways.First, this study explores the nonlinear dynamic FTDNN model in forecasting energy commodity price illustrating that the model can perform better than existing ANN-based energy commodity price forecasting methods.Although some of the recurrent ANN models have already been used in the previous literature, this study is the first to utilize the FTDNN-based nonlinear dynamic model to forecast oil and natural gas prices.
Second, while most previous studies focus on Brent oil price prediction, this study provides price forecasts for four different energy commodities, which provides an opportunity to compare the dynamic properties of their time series.Motivated by the pursuit of capturing the dynamic properties of energy commodity prices, the study investigates the predictability of the FTDNN model to predict Brent and West Texas Intermediate (WTI) crude oil spot prices and National Balancing Point (NBP) and Henry Hub (HH) natural gas spot prices.The daily prices used in this study are more volatile and subject to noise compared to the commonly used monthly prices of energy commodities, making them more difficult to predict (Dbouk and Jamali, 2018).
Finally, to empirically validate the proposed model, data were collected from 2008 to 2020, a span that includes the period of relevant uncertainty of the Covid-19 crisis.Indeed, world energy demand is expected to have dropped by 4.5% and the oil demand is estimated to decline by an historically unprecedented 9.3 % in 2020. 1 To shed new light on the price dynamics of energy commodities during the underlying period, we also investigated the statistical properties of their time series.Here, for the first time, a nonlinear dynamic forecasting model is validated for the period of the Covid-19 pandemic, which is characterized by increased uncertainty in the energy market.Hence, the present study is expected to contribute to our understanding of the predictability of energy commodity prices during a crisis period with high levels of uncertainty and price fluctuations.
By examining the statistical properties of energy commodity time series, we find that energy price extremes are more likely to occur in the future, as indicated by observations of heavier tails of the price distributions.This uncertainty not only has important implications for investors and policymakers, but also makes it difficult to predict energy commodity prices, as evidenced by the results for traditional statistical and neural networkbased forecasting models.In contrast, we highlight the predictability of energy commodity prices using the nonlinear dynamic FTDNN-based model, even in periods affected by various financial shocks.We find that the FTDNN model equipped with a short memory allows us to better predict fluctuations in energy commodity prices, substantially outperforming state-of-the-art Elman recurrent neural networks and other baseline models.
The remainder of this paper is organized as follows.Section 2 provides a theoretical background on the characteristics of oil and gas prices.Section 3 presents the data used.Section 4 describes the nonlinear modeling methodology used in the study.Section 5 presents the empirical results and discusses them for both the natural gas and oil markets, and Section 6 concludes the paper.

Theoretical background
Oil remains one of the most important commodities because it is still a critical factor in production of most countries.Crude oil developments have an impact on industrial and financial markets, and government decisions by influencing economic indicators (Conrad et al., 2014).The importance of crude oil has increased in the last few years due to high price fluctuations.For example, after reaching an all-time high in July 2008, the price of Brent crude oil fell to $43 per barrel as of February 2009.Various researchers have shown the effect of oil volatility on the macroeconomy (Chen and Chen, 2007).Cevik et al. (2020) utilized the GARCH model to uncover the leverage effect on the volatility of the return of the stock market and showed that oil prices had significant effect on the stock market returns.There is also extensive research on the effect that oil prices have on gross domestic product and interest rates (Mensi et al., 2020).A large number of financial instruments are built on these elements, including swap and option contracts, and futures.Oberndorfer (2009) analyzed the stock returns of energy companies in the Eurozone, showing that changes in oil prices and volatility in oil prices affected the share price of the companies.
One of the major differences between the gas and oil market is that the former is segmented as opposed to the globally interconnected oil market.There are three main regions of the gas market that differ in their characteristics, namely Europe, Pacific Asia, and North America.
The European market is the world's leading market, with Norway and Russia as its main gas suppliers.Just a small portion of the trade is in the form of LNG (liquefied natural gas) (which represents 28% of the total trade in pipelines) (European Commission, 2020).Continental natural gas is traded on the basis of long-term contracts linking oil prices to gas prices.The competition between gas companies through European trading hubs, which characterizes the European market, has resulted in the convergence of gas prices across European countries (Bastianin et al., 2019).However, it has also become a tool by which traders can arbitrage gas prices.This has linked gas prices indirectly to oil prices and led to price convergence in both markets (Zhang and Ji, 2018).
The Asia-Pacific region is characterized by a high LNG use relative to other world regions; the percentage is 60-70 % of global LNG consumption (Zhang et al., 2018).The main supplying countries are the Middle East, Malaysia, Indonesia, and Australia, and the main importers are South Korea, Japan, and China.Typically, LNG supplies in long-term contracts are connected with the oil price through the JCC index (Japan Customs Cleared) as a reference price.This explains why LNG prices are now integrated with oil prices in the Asia-Pacific region.Siliverstovs et al. (2005) confirmed this for Brent crude oil prices and European gas prices, whereas no integration was found for U.S. gas prices.Importantly, in both the Asia-Pacific and European regions, gas prices are associated with oil prices due to their stable price (Zhang and Ji, 2018).In long-term contracts, both parties have an interest in being linked to the oil price if the oil price becomes too high.By trading LNG on a net basis, together with the reduction in LNG transportation and liquefaction costs, the gas price can become decoupled from the oil price and could promote an EU and Asia-Pacific oil-independent gas market (Zhang and Ji, 2018).
The North American market has several distinct qualities.Exports are interregional and are traded almost exclusively by pipeline.Extraregional imports are traded as LNG and represent only 14.5 % of total imports.LNG imports come mainly from Trinidad and Tobago, Peru and Qatar, while Canada represents the main pipeline supplier.Gas and oil prices are not clearly linked as for the abovementioned regions, but there has been a significant convergence in North American gas markets since the 1985 network access opening.The reference price for crude oil is WTI and for natural gas, HH.Although there exist periods in which natural gas and oil prices have diverged in the short run, the relationship between natural gas and crude oil is fairly stable.Serletis and Herbert (1999) demonstrated that natural gas prices in the US and heating oil prices in the US are cointegrated.However, a more recent study by Zhang and Ji (2018) showed a strong decoupling trend after 2009.The oversupply of shale gas in the US market lowered US natural gas prices and resulted in US prices being lower than those in the EU.

Data
In this study, we used WTI and Brent crude oil spot prices and NBP and HH natural gas spot prices.Brent crude oil serves as the international reference price and WTI is the major reference price on the US oil market.NBP is the most widely traded LNG trading hub in the EU, and HH is the major natural gas trading hub in the US.Unlike HH, NBP is a virtual trading venue.The dataset consists of daily average energy commodity prices for the period September 2007 to September 2020.Data were obtained from the Bloomberg terminal.
For crude oil, the total number of observations was 3311 for Brent and 3293 for WTI.We proceeded to the logarithmic transformation of prices in order to analyze price series and logarithmic series.Table 1 (Panel A) shows the basic descriptive statistics of both the WTI and Brent oil price series.Panel B presents the descriptive statistics of the logtransformed series.The results show that both the level and log-transformed oil prices do not have normal distributions.The negative values of skewness suggest that the left tail is longer than the right tail.For the price series, kurtosis was much lower than 3, and the result of the Jarque-Bera test was significant (with the value of 6.302 at the 5 % significance level).
We used several unit root tests to examine the stationarity of the price series: the Phillips-Perron (PP) test, the Kwiatkowski-Phillips-Schmidt-Shin (KPSS), and the Augmented Dickey-Fuller (ADF) test.Table 2 shows the results of the three unit root tests.The tests were applied to each series in terms of untransformed and log-transformed prices.The stationarity hypothesis was rejected at the levels.We ran the tests on the differenced series to test for multiple unit roots, showing that oil prices are first-order integrated.The results of the PP and ADF tests did not indicate the existence of a unit root at I(1), and the KPSS test did not reject the stationarity hypothesis.
For natural gas, the total number of observations was 3289 for HH and 3336 for NBP.Fig. 2 shows the price dynamics from September 2007 to September 2020.We can notice the high volatility that occurred in a few short periods.For example, in 2008, market 'turbulence' drove the average of the price from $6 or $8 in the previous year to $13 on July 2 to close at $5.63 in December.
Table 3 (Panel A) reports the main statistics on the prices of HH and NBP, and Panel B reports the statistics on the log series.A positive skewness is caused mainly by the presence of short periods of strong volatility.The median value was lower than the mean value and the kurtosis was 2.364 for NBP and 9.276 for HH, exceeding the normal value of 3. The JB statistic was 24.899 and 8306.519 for NBP and HH, respectively, which was much higher than the critical value of 18.228 at the 0.1 % significance level.The results of Panel B indicate that even the log-normal distributions of prices are not normal.Although the JB test has a significantly lower value, it still exceeds the critical value of 9.689 at the 1 % significance level.Although the JB test combines skewness and kurtosis to compare the tested distribution with the normal distribution, the results in Table 3 suggest that the deviation from the normal distribution is due to the kurtosis of the distribution.More precisely, the observed heavier tails suggest that extreme values of energy prices are more likely to occur in the future.This has important implications for investors in energy commodity markets, indicating a high level of risk.
Table 4 reports the results for the unit root tests.The results of the PP and ADF tests do not indicate a unit root at the level, whereas the KPSS rejects the stationarity hypothesis at levels without trend, both for the energy price series and for the logarithmic series.Based on these considerations, we consider the non-stationarity of both the HH and NBP series at levels.
Unit root tests were performed on the differenced series to see if the series contain multiple unit roots.The results in Table 4 suggest that differencing was necessary to make the series stationary.Therefore, to account for their non-stationarity, the first differences were used in the experiments.This is considered important if the results of neural network models are evaluated in terms of the level of explained variance (Dunis and Jalilov, 2002).In addition, the use of the first-differenced series allowed a fair comparison with the traditional ARIMA model.

Structure and learning parameters of ANNs
In the first step, we decided to use an MLP neural network.The network usually consists of three layers because previous studies have shown that one hidden layer in a feedforward neural network is sufficient for solving any complex forecasting problem (Zhang et al., 1998).
Another fundamental problem in defining the MLP structure is to set the number of hidden nodes.Generally, a small number of nodes is preferred to achieve good generalization, but not enough of them may provide insufficient performance for modeling and learning data (Zhang et al., 1998).The larger the number of hidden nodes, the greater the capacity of the network for memorization Note: Panel A shows the descriptive statistics of the original Brent and WTI oil price series, and Panel B shows the descriptive statistics of the logtransformed series.
rather than generalization (HamzaCebi et al., 2009).The most common method is trial-and-error, starting with a few nodes and then increasing until the performance criterion is maximized.Therefore, in our model, in line with Zhang et al. (1998), we initially began by setting the number of hidden nodes to match the number of input variables.We incrementally increased the number of hidden nodes until there was a significant increase in performance.In the particular case of time series forecasting, we can define the functional relationship between inputs and output as follows: where y t+1 is the observation at time t + 1 (output) and the past values represent the input vector.The problem is to determine the number of lagged observations that are to be used.Numerous studies have attempted to come with some rules to determine the correct number of time delays.The number of autoregressive (AR) terms is such a simple solution, but Zhang et al. (1998) argue that AR cannot be used for this purpose because zero values are obtained for moving average processes.Furthermore, conflicting views can be found in the literature regarding the fixed time-frequencyrelated delay.Therefore, a widely adopted approach is to apply a heuristic and trial and error approach (HamzaCebi et al., 2009).The number of nodes depends on the complexity of the forecasting problem, and the procedure consists of trying different structures of ANNs.In this paper, we have used this usual approach.
As in the case of Box-Jenkins model, this prediction works for short-term forecasts but is less accurate for longer forecast periods.The ANN can use n past time-series values as inputs to forecast values k steps ahead; that is, the ANN has k outputs, which can be defined as: where ŷ values represent the estimated values, y are the actual values, and f 1 , f 2 , …, f k are ANN functions.This approach exploits the advantages of iterative Box-Jenkins methods while overcoming the limitation of correlation linearity between lagged data.
Once the network architecture is specified, some parameters need to be chosen.To find out how the ANNs perform, we need to specify performance measures.A typical performance measure is the mean square error: There are several other performance functions for measuring forecasts, all of which have advantages and limitations.After MSE, the most widely used measures are the root mean square error (RMSE), the mean absolute error (MAE), and the sum of squared error (SSE): The use of nonlinear transfer functions in hidden layers allows the ANN to learn a nonlinear and linear relationship, while the linear function in the output layer is enough to produce accurate forecasts.For our purpose, this kind of function sequence will be used in  Note: Panel A shows the descriptive statistics of the original HH and NBP oil price series, and Panel B shows the descriptive statistics of the logtransformed series.
accordance with the main studies and practices in forecasting (Zhang et al., 1998;HamzaCebi et al., 2009).
Once the performance criterion E is selected, the weight vectors ω i,t are adjusted during the training period.The basic backpropagation algorithm is the gradient descent method, which is defined as: where k denotes the iteration, and η k is the learning rate.The main limitations of the backpropagation algorithm are inefficiency, slow convergence ability and insufficient robustness.To overcome these issues, a momentum term ϕ was introduced: The momentum term causes the method to converge fast and minimizes oscillations in the weight space.Although most research adopts the standard back-propagation algorithm, it is often too slow for practical problems.Various versions of this algorithm have been developed to speed up its convergence.In this paper, we first compare different training algorithms and then select the bestperforming algorithm.In general, the Levenberg-Marquardt algorithm is fast for training but requires more memory in terms of software computation compared to the others.
Before training the input data, preprocessing methods are usually performed to obtain more suitable data for the network.The process of non-stationarity, trendiness and seasonality is often found in financial time-series data.It has been shown that the presence of trend in time-series data deteriorate the performance of ANNs because the nonlinear transfer functions restrict the model to the value of the input range (Abedin et al., 2021).Seasonal features might have similar effects.For this reason, Tseng et al. (2002) called for detrending and deseasonalizing the data.Differencing or logarithmization of the data are widely used approaches.To eliminate multiscale problems, data normalization is a common practice.The nonlinear activation functions are then designed to restrict the output of the network, for example, to a limit of (0,1) or (-1,1).In the literature and in practice, the most commonly used linear scaling approach is as follows: This formula allows for the transformation of the value of x into the range (a,b), where x min and x max are the minimum and maximum values of the time-series data, a is the minimum value and b the maximum value of the range.Targets are usually also normalized as input data.In the current study, all energy commodity prices were scaled to the range [ -1,1] before using them in the ANN.Then the ANN output can be rescaled.

Types of ANNs used for forecasting
The absence of recurrent connections characterizes a static ANN.In dynamic ANNs, filters represent a memory that allows the ANN to estimate the output value from the previous ANN values.When the filters refer to temporal data, it is called a TDNN.In an RNN, feedback connections allow the weights to indirectly affect the network output.The indirect effect is caused by the previous change in the weights, which is also a function of the weights in the recurrent network.In the RNN, the network output is represented as: where p(t) is the input at time t, and a(t) and a(t − 1) are the estimated values at time t and t-1, respectively.
A dynamic FTDNN model is equipped with a tapped delay line (TDL) filter.This filter is added after the input vector in the FTDNN network so that all input signals enter the network with a delay of (N − 1) units.The hidden layer in FTDNN typically uses hyperbolic tangent or logistic functions to allow for the nonlinearity of the network, while a linear transfer function is used in the output layer.
The Elman neural network is a typical RNN model, consisting of two layers with feedback that allows the RNN to model patterns that vary in time.In the training process, the recurrent unit remembers the initialized weights from the first layer for reinsertion into the RNN in the next step.The output of this network can be obtained as follows: where p j are the inputs, ω ij ,ω ii ,ω hi are the synapse weights connecting the input and hidden layer, the feedback and hidden units, and the hidden and output units, respectively, with S 1 and S 2 representing the number of units in the first and second layer, respectively, and a i (t − 1) denotes the feedback; b i and b h are the biases, and f h ()and f i () are the transfer functions of the hidden and output units.

Experimental results
To investigate how ANNs work with our time-series data, we performed all experiments using the Neural Network Toolbox in MATLAB.The purpose of the experiments was to understand how ANNs work with non-stationary time-series data of energy commodities.
In the current study, we chose to use a dynamic FTDNN model equipped with a single TDL filter.We applied a logarithmic transformation to the cost as suggested by Balkin and Ord (2000).We performed the experiments using three main training algorithms: gradient descent with momentum, Levenberg-Marquardt algorithm and conjugate gradient.Data were partitioned so that one part was used for training, validation and testing, and the other part was used for the analysis of prediction, which was conducted for the last 360 days.The first part of the data was divided into time-ordered data blocks as follows: 70 % for FTDNN training, 15 % for validation and 15 % for testing.All data were transformed using the linear scaling method in the range (-1, 1) before applying the ANN (Lin et al., 2021).The objective function was the MSE.The training process had 150 iterations and it was repeated 30 times.To reduce the overfitting problem, the training was stopped when the MSE for the validation data increased 6 iterations in a row.The Nguyen-Widrow function was used for the network initialization, and the best-performing network was selected for the prediction analysis.
Table 5 shows the average results of the test portions for all four energy commodity series.The average performance of the 30 test sections for different numbers of input nodes and hidden nodes are reported.It can be seen that the best prediction performance for the prices of gas was achieved with five input nodes.Two input nodes worked best for WTI, and 2 and 10 nodes were the best settings for Brent time series.Furthermore, difference testing was performed for more than 10 input nodes but no improvement was achieved.Regarding the number of hidden nodes, no substantial difference was observed from 40 neurons.Table 5 also shows the results provided by the training algorithms used.The Levenberg-Marquardt algorithm performed best results for all four energy commodities.The conjugate gradient provided good results only for the NBP and WTI.The gradient descent algorithm with momentum gave a performance that was sub-standard in comparison to the other two training algorithms.
Appendix A presents the linear regression plots of the test data, confirming that the output values tracked the target values quite well and showing that all the R 2 values were approximately 0.9.
For the experimental validation, we chose the following network structures: (1) 2 input and 5 hidden nodes for WTI, (2) 5 input and 20 hidden nodes for Brent, (3) 5 input and 20 hidden nodes for HH, and (4) 5 input and 5 hidden nodes for NBP.
So far, we have been using an open-loop network, in which the inputs come directly and FTDNN conducts a one-step-ahead forecasting.A closed-loop FTDNN model can be seen in Fig. 3.
As we can see, after the loop was closed, the network became an RNN with a TDL filter.Unlike the Elman model that was presented in the Dynamic Network section, the recursive element forms the output layer, rather than the hidden layer.For WTI, Brent, and NBP, the prediction model performed well.The results for the HH series were worse than those from the previous test.From Figs. 4 and 5, we can see how the FTDNN forecast works.We can see how well the curve follows the actual prices.The predicted price differs from the actual price by a maximum of $2. Since the predicted price usually does not fluctuate by more than 2 % of the actual price, we can hypothesize that the predicted price follows the course of the actual price well on all days, even with respect to periods of rapidly rising and falling prices.The figures show that the model is able to understand the general pattern of volatility in the forecasting process and appears to be able to capture both periods of low and high volatility with satisfactory accuracy over the 2019-2020 testing sample period.The process appears to distinguish between periods of high and low-price fluctuations and accurately estimates jumps in periods of high turbulence for both oil and gas markets.This is probably because data representing several periods of elevated energy commodity price fluctuations were used to train the model.Overall, the oil market was more volatile than the gas market, and hence more fluctuations were observed in the training period.Therefore, in the early months of 2020, when the economic impact of the In addition, the output of the FTDNN model is used as its input.The closed-loop network uses its own values as input but corrects its past output values using actual past values.
Covid-19 pandemic was at its peak, it was particularly difficult to predict fluctuations in HH and NBP prices.
Table 6 shows the MSE, the root mean square error (RMSE), and directional accuracy (DA) values for the testing period.In terms of all the three metrics, FTDNN performed best for Brent, achieving low errors while maintaining high DA.Overall, it is possible to conclude that the forecasting model performed well for all the energy commodity prices.Table 7.
To validate the effectiveness of the FTDNN model, we compared the results with several baselines and approaches used to forecast energy commodity prices, namely ARIMA (Wang et al., 2018), Elman RNN (Wang and Wang, 2016), and ANN with one and two hidden layers (Panella et al., 2012).As with the dynamic FTDNN model, we experimented with the structure of the compared neural networks.For the ARIMA model, the Akaike information criterion (AIC) was utilized to find the most appropriate model, which was (2,2) for The results show that the FTDNN model achieved a higher prediction accuracy (lower RMSE) for both natural gas and crude oil prices.Notably, compared to the Elman RNN, there was a relative reduction in RMSE of 14.8% on average for crude oil prices and 6.3% for natural gas prices.

Conclusion
This paper has demonstrated the predictability of four energy commodity prices using the nonlinear dynamic FTDNN-based model.Specifically, this study investigated the forecasting of Brent and WTI crude oil prices and HH and NBP natural gas prices which exhibited nonlinear, dynamic and non-stationary properties.In this context, it is appropriate to use ANN-based forecasting models.
The results of this study indicate that the FTDNN model is effective to predict energy commodity prices.We find that the TDL filter, which provides the FTDNN model with a short memory, allows us to better detect price fluctuations by training past daily data.These results are particularly striking for the recent Covid-19 period, having successfully captured the considerable fluctuations in energy commodity prices in 2020.Overall, our findings underline the relevance of exploring nonlinear dynamic patterns in the time series of energy commodity prices.The findings also add to our understanding of the predictability of prices in the context of the global crisis.
The findings of the current study have several noteworthy implications for policymakers and investors.Firstly, the statistical properties of energy commodity prices suggest that investors can expect a considerable increase in price volatility and thus face higher risk, as confirmed by recent developments in energy commodity markets.Secondly, policy makers should assess and adopt stronger policies to prevent extreme changes in energy commodity prices to a greater extent than before.Our results also suggest that nonstationarity, nonlinearity and dynamic behavior should be considered when modeling the daily time series of energy commodity prices.The findings demonstrate that the FTDNN-based forecasting model is more appropriate than using traditional statistical and neural network-based models.Given that energy commodity markets will continue to be shaken by disturbing events, investors could apply our model to assess price risks across different energy commodities, allowing them to hedge risks more effectively and diversify their portfolios.
Finally, several limitations of the current study should be considered.First, it could be observed that for new fluctuations occurring outside the range of past values, the forecasting model was not capable of responding well to the new target data.Despite this limitation, the FTDNN-based model can be used in oil and gas forecasting and extended not only to the next period but also to other commodity markets that have characteristics similar to those of energy commodities.It might be particularly interesting to validate the proposed model on new Covid-19 and post-Covid-19 data, as it was found that the return of WTI oil was negative in the Covid-19 period but positive in the pre-Covid-19 period (Akhtaruzzaman et al., 2021a), and that the outbreak of the Covid-19 epidemic appears to be mitigating exposure to the risk of oil price (Akhtaruzzaman et al., 2021b).The current work was also limited to univariate energy commodity time series which did not permit the examination of the effects of other determinants of energy commodity prices, including interactions with stock markets (BenSaïda et al., 2018).However, the proposed model can be extended to a multivariate forecasting model, which is recommended as another avenue for future research.

Table 6
Results of 1-day-ahead forecasting of energy commodity prices using the FTDNN model.The forecasting performance is evaluated using the mean square error (MSE), the root mean square error (RMSE), and directional accuracy (DA).Note: DA is directional accuracy

Table 7
Comparison of 1-day-ahead forecasting performance of the FTDNN model with baseline and existing neural network models in terms of RMSE.The ARIMA models were as follows: (2,2) for Brent, (4,1) for WTI, (3,3) for HH, and (2,0) for NBP.The same learning parameters were used for the compared neural networks as for the FTDNN model.Note: the best performance is in bold.

Fig. 1 .
Fig. 1.Brent and WTI oil price (in US dollars) dynamics from September 2007 to September 2020.

Fig. 2 .
Fig. 2. HH and NBP price dynamics from September 2007 to September 2020.Prices are expressed in US dollars per million Btu (British thermal units).

Fig. 3 .
Fig. 3.The structure of the closed-loop FTDNN model.Previous prices at time ((t − 1), (t − 2), …, (t − N) ) are used to predict the price value at time t.In addition, the output of the FTDNN model is used as its input.The closed-loop network uses its own values as input but corrects its past output values using actual past values.

Fig. 4 .
Fig. 4. Daily FTDNN forecasts of crude oil (Brent, WTI) prices.The prediction was made in the last 360 days of Brent and WTI time series.The results are presented using the logarithmic transformation of crude oil prices.

Fig. 5 .
Fig. 5. Daily FTDNN forecasts of natural gas (HH, NBP) prices for the period.The prediction was made in the last 360 days of HH and NBP time series.The results are presented using the logarithmic transformation of natural gas prices.

Table 1
Statistical properties of Brent and WTI oil prices.

Table 2
Results of ADF, PP and KPSS unit root tests for crude oil prices.
Note:The table shows the PP (Phillips-Perron) and ADF (Augmented Dickey-Fuller) unit root tests and the KPSS (Kwiatkowski-Phillips-Schmidt-Shin) stationary test.The Akaike information criterion (AIC) was used to select lags in the ADF test, while the PP and KPSS tests used the automatic selection of Newey-West bandwidth with Bartlett kernel estimation.For the coefficients, the value of the t-statistic for the ADF and PP tests is reported, and the LM-statistic is presented for the KPSS test.The p-value is given in parentheses.The levels are shown at the top of the table.The bottom of the table shows the results at the level of the first differences.

Table 3
Statistical properties of HH and NBP prices.

Table 4
Results of ADF, PP and KPSS unit root tests for natural gas prices.
Note:The table shows the PP (Phillips-Perron) and ADF (Augmented Dickey-Fuller) unit root tests and the KPSS (Kwiatkowski-Phillips-Schmidt-Shin) stationary test.The Akaike information criterion (AIC) was used to select lags in the ADF test, while the PP and KPSS tests used the automatic selection of Newey-West bandwidth with Bartlett kernel estimation.For the coefficients, the value of the t-statistic for the ADF and PP tests is reported, and the LM-statistic is presented for the KPSS test.The p-value is given in parentheses.The levels areA.Bouteska et al.

Table 5
Results of different FTDNN training algorithms in terms of MSE.