=Paper= {{Paper |id=Vol-2393/paper_294 |storemode=property |title=The Relationship between Oil and Gas Prices, Dow Jones and US Dollar Indexes: A Wavelet Co-movement Estimation and Neural Network Forecasting |pdfUrl=https://ceur-ws.org/Vol-2393/paper_294.pdf |volume=Vol-2393 |authors=Olena Liashenko,Tetyana Kravets |dblpUrl=https://dblp.org/rec/conf/icteri/LiashenkoK19 }} ==The Relationship between Oil and Gas Prices, Dow Jones and US Dollar Indexes: A Wavelet Co-movement Estimation and Neural Network Forecasting== https://ceur-ws.org/Vol-2393/paper_294.pdf
The Relationship between Oil and Gas Prices, Dow Jones
   and US Dollar Indexes: A Wavelet Co-movement
     Estimation and Neural Network Forecasting

                             Olena Liashenko1, Tetyana Kravets1
                       1
                           Taras Shevchenko National University of Kyiv

         lyashenko@univ.kiev.ua, tankravets@univ.kiev.ua



       Abstract. In this study, we consider the relationship between oil and gas prices,
       the Dow Jones index, the US dollar index and their volatility indicators.
       Application of wavelet analysis allows to reveal regularities of dynamics of
       selected time series at different periods. The Wavelet approach makes it
       possible to determine how these variables interact at different frequencies, and
       how this interaction evolves over time on different frequency scales. Common
       revenue movements of the studied time series characterize the behavior of the
       relevant markets. The levels of high volatility at similar intervals explain that
       there is a link between the changes in these markets, and the global economy is
       vulnerable to oil and gas prices, the value of the dollar index and the Dow Jones
       index. At the next stage of the research, a comparison of the predictive
       capabilities of Long Short Term Memory and Wavelet based Back Propagation
       neural networks for co-movement leaders is made.

       Keywords: wavelet analysis, wavelet coherence, wavelet multiple correlation
       and cross correlation, neural networks, volatility.


1      Introduction

The global financial system combines various assets traded in markets. These markets
have characteristics that lead to different types of volatility. Asset prices react to each
other in many respects. Market participants operate at different time scales, depending
on their requirements, and, therefore, the true dynamic structure of the relationship
between variables can vary at different time scales. Looking at this phenomenon in
terms of portfolio diversification, one can say that market participants with short-term
investment horizons are active at higher frequencies, and those with long-term
investment horizons operate on a longer scale. Therefore, it is necessary to analyze
co-movements in the markets on several scales. Wavelet methods provide a large-
scale data analysis naturally [1].
   The growing interest in wavelet analysis among economic researchers and its
applicability in such areas as time decomposition, forecasting and density estimation
led to the emergence of various wavelet techniques for analyzing nonstationary
financial time series [2]. The wavelet approach is ideally suited for studying high-
frequency data generated by financial markets, providing valuable information for
decision-making, as an analyst can focus on a certain amount of time when trade
patterns are considered important. Thus, wavelet technique has enormous potential in
economics and finances, since the relationships between different variables can be
analyzed in time-frequency space. It allows to research the interconnections between
variables at different frequencies and the corresponding information on the evolution
of a variable in time simultaneously.
    Continuous wavelet transform is a promising method for analyzing the joint
movement of stock prices in different countries, since this technique can illustrate the
value of the share price ratio between two different markets in time-frequency space.
It follows that the trend in the stock returns co-movement can be divided into short,
medium and long-term horizons, which serve as an important benchmark for investors
to make investment decisions in the short, medium and long term, respectively.
    The purpose of the paper is to study the dynamics of oil and gas prices, Dow Jones
and US dollar indexes, and to identify co-movements in relevant markets in time and
frequency domains. Using wavelet methodologies, pair coherence and multiple
correlation of time series returns were studied in order to determine co-movements
leaders at the appropriate frequency and time scales. For these leaders, the prognostic
capabilities of the Long Short Term Memory (LSTM) and Wavelet based Back
Propagation (WBP) neural networks were compared.


2      Analysis of Recent Research

Over the past decades, many studies have examined the interconnection between
different economic variables in different markets. Rua and Nunes [3] suggested using
a continuous wavelet analysis to evaluate the co-movement of stock prices on
international stock markets. Following the methodology of Rua and Nunes, the co-
movement of various economic variables on different stock markets has been studied
in many studies [4-6]. Distribution of profits in various energy markets was
considered in [7]; the relationship between oil prices and the exchange rate was
studied in [8]; the ratio between the price of oil and the price of shares was
investigated in [9].
   It is worth noting that there are also many works that use discrete wavelet analysis
to detect the interconnections between different economic variables in different
countries. The discrete wavelet analysis was first proposed by Ramsey and Lampast
[10] to study the relationship between income and other macroeconomic variables.
This technique has become very popular in applied economics since Gencay, Selcuk,
Whitcher [11] and Percival, Walden [12] presented details of the discrete wavelet
method for analyzing time series [13]. According to this methodology, the
relationship between different economic variables, such as the co-movement of profits
in different stock markets [14, 15], the co-movement of long-term interest rates
between European countries [16] was investigated. The global relationship between
the Dow Jones Industrial Average and the US industrial index is analyzed by
Gallegati [17] using wavelet correlation and cross-correlation methods.
    In [18], using a wavelet approach, the relationship between four basic assets
simultaneously (oil, gold, currency and stocks), between the four fear indices (OVX,
GVZ, EVZ and VIX) and the link between all assets for detection of co-movement in
the world financial markets. In [19] authors state that oil is now the most important
source of energy. Any sharp drop in its prices will have beneficial effects on the US
dollar and mainly for the economic competitiveness of countries that are not large oil
producers, and vice versa.
   As companies operating in oil, gold and forex markets sell their stocks on the stock
market, one can expect stocks to represent the most important of these four assets.
They are the key factors in asset allocation and, therefore, are most sensitive to global
shocks [20-22].
    All of the above studies are an example of the relationship between underlying
assets and total volatility indices in the time domain. However, what promises the
simultaneous region and area frequency (wavelet analysis) in this area of research,
you can make the analysis of the co-movement more complex and useful to investors.
It is expected that oil and US dollar prices will be more prone to external shocks due
to the specific features of their markets, which are heavily dependent on policy
interference through energy and monetary policy, to which extent these markets react
to each other and the feedback between gold and stocks are even complex and fuzzy
[23-24].
    Unpredictable stock market factors make stock futures forecasting more
complicated. Although the efforts in an effective prediction method developing have a
long history, recent advances in the field of artificial intelligence and the use of
artificial neural networks have increased success in a nonlinear approximation. In
[25], it is suggested to use a combination of a futures forecasting model based on a
stock index using neural networks of deep learning (an automatic encoder and a
limited Boltzmann machine).


3         Research Methods

Wavelet technics based on discrete wavelet transform (DWT) and continuous wavelet
transform (CWT) are used to study interconnections and interactions between time
series. CWT is used to determine the wavelet power spectrum of a signal and wavelet
coherence of two signals. DWT is used to compute the multiple wavelet correlation
and multiple cross-wavelet correlation of time series.
   The wavelet function   t  is a local function, both in time and in frequency, and it
is defined as:
                     1     t  
      ,t  t                , s ,   R, s  0 ,
                     s     s 
where s – scale factor that controls the width of the wavelet,  – time interval. The
wavelet function must satisfy the admissibility conditions [12, 26-27].
                                                                                        
                                                                                                      t  
    CWT for time series x  t  is defined as: Wx  , s  
                                                                                    1
                                                                                       x  t   s  dt .
                                                                                                 *

                                                                                    s   

   The Wavelet Power Spectrum (WPS) provides information about the local variance
of time series at each frequency. WPS describes how the time series x  t  varies over
the selected scale and at the selected time point. WPS is defined as the square of the
absolute value of CWT:
     WPSx  , s   Wx  , s  .
                                          2



   Wavelet Coherence (WC) is a powerful tool for describing the interaction between
two time series and studying their co-movements in common time and frequency
domains. The first step in removing the WC is the cross-wavelet transform (CRWT)
calculation. CRWT of two time series x  t  and y  t  is defined as follows:
     Wxy  , s   Wx  , s  Wy*  , s  ,
where Wx and Wy – CWT of time series x  t  and y  t  respectively, and the symbol
*
    denotes complex conjugation.
    In this case, the cross-wavelet power (CWP) is determined as follows:
     CWPxy  Wxy  , s  .
    By defining CRWT and CWP, one can enter square wavelet coherence (SWC):
                                     S  s 1 Wxy  , s  
                                                               2

        2
              , s  
                                                                         
    R   xy                                                                      ,
                          S s 1 Wx  , s        S s 1 Wy  , s 
                                               2                        2



where S - smoothing operator.
   The wavelet coherence coefficient varies between 0 and 1, and it can be considered
as the square of the local correlation coefficient between two time series. A greater
value of this coefficient indicates a stronger relationship between the time series [11,
13, 24].
   SWC is not able to distinguish between positive and negative correlations and to
determine the relationship between two time series. For this reason, the wavelet-
coherence phase difference was introduced [15]:
                                                                   
                                                     S  s 1 Wxy  , s   
                            xy  , s   tang 1                            ,
                                                                                             
                                                                xy
                                                     S  s 1 W  , s   
                                                                                            
where  and  are imaginary and valid operators, respectively.
   Arrows on the wavelet coherence figures represent the phase difference. Following
the trigonometric convention the direction of arrows shows the relative phasing of
time series and can be interpreted as indicating a lead/lag relationship. If the arrows
point to the right (left), the time series are in-phase (anti-phase), i.e. they are
positively or negatively correlated, respectively. If the arrows point up and right (left),
this indicates that the study series are in-phase (anti-phase) and the first (second) time
series leads the second (first) one. A zero phase indicates that two series move
together [13].
   In contrast to the two-dimensional analysis, the multiple wavelet correlation
(WMC), developed by Fernandez and Macho [14], allows us to determine the general
correlation that can exist at different time scales within a multivariable set of
variables. WMC is defined as a single set of multivalued correlations calculated from
a multivariate stochastic process X t   x1t , x2t ,                    , xnt  . The wavelet coefficients of j
level  W  and scaling coefficients  V  will be obtained for the maximum
             j ,t                                                j ,t

overlap DWT (MODWT) method. In each scale  , WMC     is calculated as
                                                                           j            X   j

the square root of the regression determination coefficient in such a linear
combination of wavelet coefficients Wjt   w1 jt , w2 jt , , wnjt  for which the
determination coefficient is the maximum.
   The WMC coefficient can be expressed as wavelet dispersion and covariance:
                                                  Cov  wijt , wijt 
    X   j   Corr  wijt , wijt                                      ,
                                             Var  wijt  Var  wijt 
where wijt is chosen for maximum increase  X   j  , and wijt denotes fitted values in
the regression of wijt on the rest of the wavelet coefficients on the scale  j .
   Similarly, allowing a lag between observed and fitted values at each scale  j , the
WMCC is defined as follows:
                                                      Cov  wijt , wijt  k 
    X , k   j   Corr  wijt , wijt  k                                       ,
                                                    Var  wijt  Var  wijt  k 
where k is a lag between observed and fitted values of the variable selected as the
criterion variable at each scale  j .
   The consistent estimator for the wavelet multiple correlation (denoted by  X   j  )
and consistent wavelet multiple cross correlation estimator (denoted by  X , k   j  ) can
be constructed in the same way by substituting  X   j  for  X   j  and  X , k   j  for
 X , k   j  [14, 28].
   The idea of recurrent neural networks (RNN) is to use sequential information. In
the traditional neural network, we assume that all inputs are independent of each
other. But for many tasks, this is not an optimal idea. RNN are called recursive
because they perform the same task for each sequence element, with initial data
dependent on previous calculations. Recurrent neural networks have a "memory" that
captures information about what was calculated by this time [29-31].
   The Long Short Term Memory (LSTM) networks are a special type of RNN that
can study long-term dependencies. All RNN have the form of a chain of repetitive
neural network modules. In a standard RNN, this repeating module has a simple
structure of one layer. LSTM also has such a chain structure, but the repeating module
has four layers. A RNN can be considered as multiple copies of one network, each of
which sends a message to the next one.
   The back propagation (BP) neural network is an artificial intelligence algorithm
widely used in prediction, in particular for advanced multiple regression analysis. It
better generates complex and non-linear responses than a standard regression analysis
[32]. A BP network uses the gradient method, and the learning and inertial factors are
determined by experience. This affects the convergence in a BP network.
   The Wavelet-based BP method uses both a wavelet-based multi-resolution analysis
and multi-layer artificial neural networks. The DWT allows decomposing sequences
of past data in subsequences (named coefficients) according to different frequency
domains, while preserving their temporal characteristics [33].
   To assess the accuracy of forecasting, two criteria are used: mean square error
(RMSE), average absolute percentage error (MAPE).
              N

              y  y 
                             2
                     t   t
    RMSE     t 1
                         ,
                  N
where yt and yt - the actual value and the predicted value at time t, respectively, N -
the size of the data set. RMSE expresses the standard deviation of the difference
between predicted and actual values.
   MAPE, also known as the average absolute deviation percentage (MAPD),
expresses accuracy in percentages:
             1 N y  yt
   MAPE   t             .
            N t 1 yt
   MAPE measures the average absolute relative error of forecasting. RMSE and
MAPE are widely used to estimate predictive accuracy. The accuracy of the model is
higher when the value of RMSE and MAPE are lower.


4      Research results

To study the relationship that causes correlations between the oil and gas market, the
Dow Jones index and the US dollar index, we used Brent crude oil prices, Henry Hub
gas prices, and the Dow Jones index and the US dollar index respectively. The data
set consists of daily figures for the period from September 2007 to January 22, 2019.
This interval was chosen based on the fact that it covers the main fluctuations in
selected markets. Fig. 1 shows the dynamics of prices and indices. We can see that,
for some times, series tend to have the same trend, and in other periods, they are
different. For example, from 2007 to 2008, unlike the oil and gas market, where this
period was characterized by rising prices, we see a decline in the US dollar index and
the relative stability of the Dow Jones index. Between 2008 and 2009 there was a
sharp fall in prices on oil and gas markets and a drop in the Dow Jones index. At the
same time, the US dollar index was stable for the first half of the year and then
increased. In 2014-2015, the US dollar index was growing fast, the Dow Jones index
was slower of it but also growing, unlike oil and gas prices that were falling. Only the
Dow Jones Index from 2009 to 2018 had a pronounced rising trend, other series were
more volatile.
                                                                                Oil
                              Основной US dollar per barrels
                              Основной
                              Основной
                              Основной
                              Основной


                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy

                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                              Gas
             US dollar per mill. BTU




                                       15


                                       10


                                            5


                                            0
                                                               yyyy




                                                               yyyy
                                                               yyyy
                                                               yyyy
                                                               yyyy
                                                               yyyy
                                                               yyyy
                                                               yyyy
                                                               yyyy

                                                               yyyy
                                                               yyyy
                                                               yyyy
                                                               yyyy
                                                               yyyy
                                                               yyyy
                                                               yyyy
                                                               yyyy
                                                               yyyy

                                                               yyyy
                                                               yyyy
                                                               yyyy
                                                               yyyy
                                                               yyyy

                                                                                DJI
                                            30 000
                                            25 000
                           Points




                                            20 000
                                            15 000
                                            10 000
                                             5 000
                                                 0
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy




                                                                         Dollar Index
                                           150

                                           100
                       Points




                                                      50

                                                               0
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy

                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy
                                                                   yyyy




                                                                   Fig. 1. Dynamics of time series

   Descriptive statistics of time series logarithmic returns are given in Table 1. The
available average standard deviation ranges from 0.5% to 4.2%, the most volatile time
series is gas price, and the US dollar index is the least volatile. In addition, the
statistics of Pearson categorically rejects the null hypothesis, which assumes that the
distribution of returns is normal.

                     Table 1. Descriptive statistics of time series returns
                                                                Dow Jones     US dollar
                           Oil                  Gas
                                                                  index        index
Average value           2.65E-06             -2.44E-04           2.33E-04     4.89E-05
Standard
                          0.022                0.042               0.012       0.005
deviation
Skewness                  0.131                0.688              -0.136       -0.009
Kurtosis                  5.554               26.077              10.066       2.156
Pearson's
                        687.930              1871.100            2313.800     5786.500
statistics

   In order to study the interconnections between markets, wavelet analysis is further
used. The calculations were carried out in the RStudio program environment. Morlet's
mother wavelet with six levels of decomposition was used. Fig. 2 shows a wavelet
power spectrum for the oil market at different time scales. Three cycles were chosen
to construct the wavelet power spectrum. The first and second cycles on the middle
scales are 16-32 days (monthly scale) and 32-64 days (from monthly to quarterly
scale). The third cycle on a scale of 64-128 days (from a quarterly to annual scale)
refers to a long-term analysis. These periods are deferred on the vertical axis of the
graph, the time is indicated on the horizontal axis. The wavelet power is indicated by
the color ranging from red to blue, which corresponds to regions of high and low
power respectively. White contours indicate a 5% significance level. "Cone of
influence", where boundary effects become important, is shown with a lighter shade.
Black lines indicate power peaks. There are two distinct regions with high volatility
with white circles at medium scales (16-32 days) in the end of 2008 and the beginning
of 2016. The available peaks of power are due to the global crisis and the sharp drop
in prices on the world market, respectively. One can also observe the high power
region at the beginning of 2015 at medium scale (32-64 days). It can be explained by
the long fall in oil prices when they have reached its historic minimum.
   The spectrums of gas prices, the Dow Jones index and the US dollar index have
regions of high power at medium scales (16-32 days, 32-64 days) in the end of 2008.
Also, periods with high volatility of gas prices are observed at the same scales in
2016-2017. For the Dow Jones and US Dollar index, similar regions are in 2011,
2015, and the end of 2018.
   The next stage of the study is the calculation of wavelet coherence for the
logarithmic returns of time series. Graphs of spectra are constructed in the same way:
time and period are marked on the axes. In this case, more periods were included,
namely: 2-4 days (intraweek scale), 4-8 days (weekly scale), 8-16 days (two-week
scale), 16-32 days (monthly scale), 32-64 days (from monthly to quarterly scale), 64-
128 days (from quarterly to two-quarter scale), 128-256 days (from two to three
quarterly scale) and 256-512 days (annual scale). The arrows indicate the phase
difference between the two time series.




                       Fig. 2. Wavelet power spectrum of oil market

   Figs. 3-5 shows the degree of similarity and phase relationships between the
logarithmic returns of oil and gas prices, oil prices and the US dollar index, oil prices,
and the Dow Jones index respectively.
   The coherence between the returns of oil and gas prices (Fig. 3) is strong at high
scales (128-256 days, 256-512 days). Several "islands" of high coherence can be
identified at medium scales in 2008, 2012 and 2015-2017. At the same time, in most
cases, the direction of the arrows indicates that changes in oil prices lead to changes
in the gas market, that is, the oil prices are leading.
   Fig. 4 shows the wavelet coherence between the returns of oil and the US dollar
index. One can see the similar picture, but in this case, the series are in the antiphase.
That is, the volatility of the US dollar index causes changes in the oil market. At low
scales, the correlation is weak, strong correlation periods are observed in 2008 and
over the period 2015-2017 at medium and high scales.
   Analyzing the coherence between the returns of the oil prices and the Dow Jones
index (Fig. 5), we can say that fluctuations in oil prices affect the volatility of the
Dow Jones index, that is, the series correlate positively. Three high-coherence periods
can be distinguished: 2008, mid-2011 and 2016 at medium and high scales. At low
scales, the correlation is small.
   Interaction of the time series of gas prices and the US dollar index is weak at low
and medium scales, but significant at high one. There is a period of high coherence in
the period 2008-2009. In this case, the arrows are mainly directed upwards and to the
left. It indicates the two series are in antiphase. The US dollar index is a leading
series, its volatility affects the gas market.
   The correlation between returns of gas prices and the Dow Jones index is similar: it
is negligible or absent at all low scales, but strong at medium and high. There is a
marked area of high coherence at high scales in 2008. It is interesting, the gas market
is leading at medium scales, and the Dow Jones index is leading at high ones.




                Fig. 3. Wavelet coherence between returns of oil and gas prices




         Fig. 4. Wavelet coherence between returns of oil price and the US dollar index
        Fig. 5. Wavelet coherence between returns of oil price and the Dow Jones index

   At medium and high scales, the returns of the US dollar index and the Dow Jones
index are both in antiphase (the arrows are mostly directed to the left). It means that
the second series is the lead. There is a pronounced period of high coherence at
medium and high scales in 2008. At low scales, the correlation is small or absent.
   So, comparing the obtained results, we can say that high coherence is observed in
both crisis and non-crisis periods. The highest coherence of the series returns is
marked at medium and high scales during 2008. In most cases, at these scales, oil
prices and the US dollar index, gas prices and the US dollar index, as well as the US
dollar and Dow Jones indexes, move in the antiphase. However, there are periods
with a bidirectional relationship between the series at the medium and high scales. At
the same time, the oil market leads the gas market. The US dollar index influences (is
leading) the formation of oil and gas prices. In turn, oil prices affect the value of the
Dow Jones index.
   The wavelet multiple correlation was obtained for the diferent groups of time
series. Fig. 6 presents the wavelet multiple correlation for all four markets together.
On a horizontal axis, the 8 decomposition levels by the Daubechies(4) wavelet are
plotted. On the vertical axis, the wavelet multiple correlation coefficient is marked.
The blue lines show the upper and lower limits of the 95% confidence interval. The
black line connects the value of the multiple correlation between the given time series
at a certain scale. Below there is indicated what market is leading for a certain period.
At medium scales (32-64 days, 64-128 days) the US dollar index is ahead, at high
scales (128-256 days, 256-512 days) the oil market is leading. At high scales, co-
movement is almost linear; the multiple correlation reaches a value of about 0.9. We
can conclude that the combination of financial (gas and oil market) and stock markets
(the Dow Jones Index and the US dollar index) makes them more integrated.




                 Fig. 6. Wavelet multiple correlation for all time series returns

    The multiple wavelet correlation of the oil market, the US dollar index and the
Dow Jones index are small at low scales (2-4 days, 4-8 days, 8-16 days) and medium
scales (16-32, 32-64 days) with a value of about 0.2 and at medium scales (64 -128
days) with a value of about 0.3. In this case, the multiple correlation values increase at
high scales (128-256 days, 256-512 days), starting from the value of 0.4 and reaching
a maximum value of 0.8. The leading market is the oil one. Consequently, at high
scales, the existence of a linear relationship between markets cannot be ruled out.
    The wavelet multiple correlation of the gas market, the US dollar index and the
Dow Jones index at low and medium scales is small, only on a high scale it reaches a
maximum of 0.5. The leading is the US dollar index. The multiple correlations of the
gas, oil and the Dow Jones index, as well as the multiple correlation of the gas, oil
and the US dollar index, share common features. Namely, there is a small correlation
at low and medium scales and a gradual increase of a correlation at high scales. In the
first case, the oil market is steadily leading. In the second case, the US dollar index
and oil price are leaders at scales (128-256 days) and (256-512 days) respectively.
    The wavelet multiple cross-correlations for all time series returns at different levels
of wavelet decomposition with lags up to one month are shown in Fig. 7. In the upper
left corner of each graph a variable that maximizes the multiple correlation with the
linear combination of the remaining variables is represented. Thus, it is identifyted a
potential leader or follower for the entire system. The red lines correspond to the
upper and lower limits of the 95% confidence interval. At levels 1-3, the oil market
maximizes multiple correlations against a linear combination of other markets at all
levels of the wavelet decomposition. At levels 4-5, the Dow Jones index has the
potential to lead or lag the other markets, at level 6 the maximizing variable is the US
dollar index. All variables are positively correlated on all scales, and they tend to co-
movement. It is also noticeable that the correlation weakens with increasing lag.
Accordingly, oil prices can be viewed as a leading barometer of global mood; changes
in this market affect the volatility of gas prices, the US dollar and the Dow Jones
indexes.
   At the next stage, a comparison of the predictive capabilities of various neural
networks is made. The Long Short Term Memory (LSTM) and Wavelet Based Back
Propagation (WBP) neural networks are considered. Brent oil prices and the US dollar
index, as leaders of co-movement, daily from March 1, 2007 to January 22, 2019 are
used. The LSTM neural network was modeled in the RStudio software environment
with Keras and TensorFlow packages.




              Fig. 7. Wavelet multiple cross-correlation for all time series returns

   Before the beginning of the simulation process, it is necessary to prepare the input
data. First of all, it is necessary to convert data to the stationary ones by finding the
difference of the first order. The next step is to create an additional first-order lag
variable, since LSTM involves learning a neural network with a teacher. All time
series are divided into training and test parts. It was decided that 90% of the data was
used to train the network, and, accordingly, 10% - for testing.
   Pre-processing data also includes operations of normalization and data recovery.
The network architecture consists of an input layer, one hidden layer, and an output
layer. The hidden layer contains memory cells and corresponding device blocks that
are characteristic of the recurrent neural network.
   The WBP modeling was performed in the Alyuda NeuroIntelligence environment.
The neural network architecture consisted of an input layer, one hidden layer, and an
output layer. Fig. 8 shows the 30-day forecasting result for oil prices test data. Table 2
presents the RMSE and MAPE errors which were calculated for both series and for
considered forecasting methods.
              Fig. 8. Real data and forecasts of oil prices by WBP and LSTM methods

                                   Table 2. Forecasting errors
                                LSTM                                 WBP
                       RMSE             MAPE              RMSE                MAPE
      Brent             1.70            0.0236             1.11               0.0162
       DI               0.37            0.0032             0.27               0.0023

   In general, empirical analysis shows that “deep learning” neural network gives
possibility to build qualitative models with high forecasting accuracy. Due to the fact
that with each iteration new nonlinear interconnections are constructed, we can
achieve rather small values of errors. However, the comparison of forecasting errors
suggests that the WBP method on short horizons gives better results.


5      Conclusion

The use of wavelet techniques for studing the dynamics of the time series of oil and
gas prices, the Dow Jones index and the US dollar index allowed to establish some
correlation relationships between volatility in the relevant markets. By means of
discrete wavelet transform and continuous wavelet transform, the wavelet power
spectrum of each series was constructed, wavelet coherence for time series pairs was
investigated, and wavelet multiple correlation was determined.
   In general, four global markets show a similar picture in terms of the wavelet
power spectrum, which is confirmed by the high level of volatility at the medium
scales. The levels of high volatility at the same intervals explain that there is a link
between the changes in these markets, and the global economy is vulnerable to oil and
gas prices, the value of the dollar index and the Dow Jones index.
   High coherence of the series is observed both in crisis and in non-crisis periods.
The largest correlation is marked at medium and hight scales during 2008. With the
interaction of oil and gas markets, the oil market is leading. The US dollar index
influences (is leading) the formation of oil and gas prices. There are periods with a
bidirectional relationship between the oil and gas markets, the Dow Jones index and
the US dollar index at the medium and high scales.
   Wavelet multiple correlations between the four markets are positive at all scales
and become stronger with increasing horizons of time. The combination of financial
markets (gas and oil market) and stock markets (the Dow Jones Index and the US
dollar index) makes them increasingly integrated.
   The wavelet multiple cross-correlations for all time series returns at different levels
of wavelet decomposition with leads and lags up to one month were computed.
According to the research results, oil prices can be considered as a leading barometer
of world sentiment, changes in this market affect the volatility of gas prices, the US
dollar and the Dow Jones indexes.
   For series-leaders, forecasting models based on neural network of deep learning
and Wavelet based Back Propagation were built. Comparison of the forcasting errors
suggests that the application of both methods on short horizons gives good modeling
results.


References
 1. Shah, A., Deo, M.: Integration of the Indian Stock Market: at the angle of Time-
    Frequency.      Journal    of    Economic    Integration,    31(1),    183-205       (2016).
    http://dx.doi.org/10.11130/jei.2016.31.1.183
 2. Crowley, P.: An Intuitive Guide to Wavelets for Economists. Working Paper, Bank of
    Finland (2005).
 3. Rua, A., Nunes, L.: International comovement of stock market returns: a wavelet analysis.
    Journal of Empirical Finance, 16, 632-639 (2009).
 4. Alou, C., Hkiri, B.: Co-movements of GCC emerging stock markets: new evidence from
    wavelet coherence analysis. Economic Modelling, 36, 421-431 (2014).
 5. Loh, L.: Co-movement of Asia-Pacific with European and US stock market returns: A
    cross-time-frequency analysis. Research in International Business and Finance, 29, 1-13
    (2013).
 6. Madaleno, M., Pinho, C.: International stock market indices comovements: a new look.
    International Journal of Finance and Economics, 17, 89-102 (2012).
 7. Vacha, L., Barunik, J.: Co-movement of energy commodities revisited: Evidence from
    wavelet coherence analysis. Energy Economics, 34(1), 241-247 (2012).
 8. Tiwari, A., Mutascu, M., Albulescu, C.: The influence of the international oil prices on the
    real effective exchange rate in Romania in a wavelet transform framework. Energy
    Economics, 40, 714-733 (2013).
 9. Akoum, I., Graham, M., Kivihaho, J., Nikkinen, J., Omran, M.: Co-movement of oil and
    stock prices in the GCC region: a wavelet analysis. Quarterly Review of Economics and
    Finance, 52, 385-394 (2012).
10. Ramsey, J., Lampart, C.: Decomposition of economic relationships by timescale using
    wavelet. Macroeconomic Dynamics, 2, 49-71 (1998).
11. Gençay, R., Selçuk, F., Whitcher, B.: An Introduction To Wavelets and Other Filtering
    Methods in Finance and Economics. Academic Press, San Diego, CA (2002).
12. Percival, D., Walden, A.: Wavelet Methods for Time Series Analysis. Cambridge
    University Press (2000).
13. Gallegati, M., Semmler, W.: Wavelet application in economics and finance. NY: Springer
    (2014).
14. Fernández-Macho, J.: Wavelet multiple correlation and cross-correlation: A multiscale
    analysis of euro zone stock markets. Physica A, 391(4), 1097-1104 (2012).
15. Dajcman, S., Kavkler, A.: Wavelet analysis of stock return energy decomposition and
    return comovement- a case of some central European and developed European stock
    markets. E a M: Ekonomie a Management, 17(1), 104-120 (2014).
16. Dar, A., Bhanja, N., Samantaraya, A., Tiwari, A.: Export led growth or growth led export
    hypothesis in India: evidence based on time-frequency approach. Asian Economic and
    Financial Review, 3(7), 869-880 (2013).
17. Gallegati, M.: Wavelet analysis of stock returns and aggregate economic activity.
    Computational Statistics & Data Analysis, 52, 3061-3074 (2008).
18. Abid, F., Kaffel, B.: Time–frequency wavelet analysis of the interrelationship between the
    global macro assets and the fear indexes. Physica A, 490, 1028–1045 (2018).
19. Husain, A., Arezki, R., Breuer, P., Haksar, V.: Global Implications of Lower Oil Prices.
    International Monetary Fund (2015).
20. Gadanecz, B., Jayaram, K.: Measures of financial stability – a review. Bank of
    International Settlements. IFC Bulletin, 31, 365-382 (2009).
21. Azar, A.: The relation of the US dollar with oil prices, gold prices, and the US stock
    market. Research in World Economy, 6(1), 159-171 (2015).
22. Malliaris, G., Malliaris, M.: Are oil, gold and the euro inter-related? time series and neural
    network analysis. Review of Quantitative Finance and Accounting, 40(1), 1-14 (2013).
23. Yoshino, N., Taghizade-Hesary, F.: Monetary policy and oil price fluctuations following
    the subprime crisis. International Journal Monetary Economics and Finance, 7(3), 157-174
    (2014).
24. Aguiar-Conraria, L., Soares, J.: The continuous wavelet transform: Moving beyond uni
    and bivariate analysis. J. Econ. Surv., 28(2), 344-375 (2014).
25. Chen, L., Qiao, Z., Wang, M., Wang, C., Du, R., Stanley, H.: Which artificial intelligence
    algorithm better predicts the Chinese stock market? IEEEAccess, 6, 48625-48633 (2018).
26. Daubechies, I.: Ten Lectures on Wavelets. SIAM: Society for Industrial and Applied
    Mathematics (1992).
27. Torrence, C., Compo, G.: A practical guide to wavelet analysis. Bulletin of the American
    Meteorological Society, 79(1), 61-78 (1998).
28. Fernández-Macho, J.: Time-Localized Wavelet Multiple Regression and Correlation.
    Physica A, 490, 1126-1236 (2017). DOI: 10.1016/j.physa.2017.11.050.
29. Jerome, T., Douglas, R., Atlas, L.: Recurrent neural networks and robust time series
    prediction. IEEE transactions on neural networks, 5(2), 240-254 (1994).
30. LeCun, Y., Bengio, Y., Hinton, G.: Deep learning. Nature, 521, 436-444 (2015).
31. Chong, E., Han, C., Park, F.: Deep learning networks for stock market analysis and
    prediction: Methodology, data representations, and case studies. Expert Syst. Appl., 83,
    187-205 (2017).
32. Jin, W., Li, Z., Wei, L., Zhen, H.: The improvements of BP neural network learning
    algorithm. In Proc. WCCC ICSP, 1647-1649 (2000).
33. Eynard, J., Grieu, S., Polit, M.: Wavelet-based multi-resolution analysis and artificial
    neural networks for forecasting temperature and thermal power consumption. Engineering
    Applications of Artificial Intelligence, Elsevier, 24(3), 501-516 (2011).