ANN-Time Varying GARCH Model: Simulations and Application in Modelling Temperature for Weather Derivatives

Abstract

In economics and finance, minimising errors while building an abstract representation of financial assets plays a critical role due to its application in areas such as risk management, decision making and option pricing. Despite the many methods developed to handle this problem, modelling processes with fixed and random periodicity still remains a major challenge. Such methods include Artificial Neural networks (ANN), Fuzzy Inference system (FIS), GARCH models and their hybrids. This study seeks to extend literature of hybrid ANN-Time Varying GARCH model through simulations and application in modelling weather derivatives. The study models daily temperature of Kenya using ANN-Time Varying GARCH (1, 1), Time Lagged Feedforward neural network (TLNN) and periodic GARCH family models. Mean square error (MSE) and coefficient of determination R2 were used to determine performance of the models under study. Results obtained show that the ANN-Time Varying GARCH model gives the best results.

Share and Cite:

Karuiru, E. , Kihoro, J. , Mageto, T. and Waititu, A. (2022) ANN-Time Varying GARCH Model: Simulations and Application in Modelling Temperature for Weather Derivatives. Open Journal of Statistics, 12, 433-441. doi: 10.4236/ojs.2022.123027.

1. Introduction

Weather influences many economic activities and livelihood of people. Some of the sectors mainly affected by weather include energy production and consumption and production of agricultural commodities among others. In the recent times, people have established a weather derivative which is a new type of security to help in hedging risks against weather driven poor performance in business activities. The payoffs of these instruments may be linked to various weather related variables, including heating degree days, cooling degree days, maximum temperature, minimum temperature, humidity, sunshine and precipitation [1]. Weather forecasting is getting more and more crucial to guiding people’s activities and even to government, like setting disaster prevention budget such as hunger prevention cost [2].

Weather derivative differs from financial derivative due to some interesting considerations. First, weather is not traded in spot market. Second, weather derivatives are critical in quantity hedging but not necessarily hedging price as in financial derivative. That is, weather derivative products provide protection against weather-related changes in quantities, complementing extensive commodity price risk management tools already available through futures [1]. Third, weather is naturally a location specific and nonstandardised commodity. Further, weather forecasting is crucial to both the demand and the supply sides of the weather derivatives market. In this study, we take a nonstructural time series approach to temperature modeling and forecasting.

Modelling daily average temperature has attracted many people who as well have developed many methods. Autoregressive Moving Average (ARMA) model and its various forms are the oldest commonly used method despite its shortcomings. Autoregressive Conditional Heteroskedasticity (ARCH) model and its family are also another commonly used modeling volatility in time series. ARCH is a stationary non linear model. An ARCH (q) first models the stationary process by an AR (q) model, and takes the variance of the residual term as a q-th autoregressive polynomial relating to the history squared residuals back to lag q. The model was first proposed by Engle in 1982 and latter generalised by Bollerslev and Taylor in 1986 and termed as Generalised Autoregressive Conditional Heteroskedasticity (GARCH) model.

These models have improved the application range to the real world problems in time series. However, in periodic phenomena, randomness and periodicity estimation is still considered separately. The GARCH model for example fits a periodic function to the seasonal trend and adds it to the ARMA type process of the residuals linearly. This is hence seen as a limitation of the model.

Recently, time series modelling and forecasting have attracted the use of ANNs. ANNs do not assume any statistical distribution and they exhibit excellent attributes in non linear modelling [3]. They develop the appropriate model on the given data adaptively. They are hence considered to be data driven and self adaptive. Literature has been developed over the past decades towards the ANN application in time series forecasting. Zhang et al. (1998) presented a very comprehensive discussion on ANN application in time series forecasting. Multi-Layer Perceptions (MLPs) are the most popular models of ANNs. Hamzacebi (2008) developed SANN model for forecasting seasonal time series. This model has been proved to be quite successful when applied in forecasting seasonal time series [4]. The model does not require data pre-processing and it learns the data patterns adaptively without removing them as opposed to other traditional approaches discussed earlier.

This study uses ANN-Time Varying GARCH (1, 1) model for processes with fixed and random periodicity proposed by [5] in modelling daily average temperature of Kenya from 1991 to 2016. The performance of ANN-Time Varying GARCH (1, 1) model is compared with that of four other models using MSE and R2. The models include; Periodic-ARMA, Periodic-ARCH, Periodic-GARCH and Time Lagged Feedforward Neural Network models.

2. Methodology

2.1. ARMA Model

The process X ( t ) , t = 0 , ± 1 , ± 2 , is said to be an ARMA (p, q) process if X ( t ) is stationary and for each t,

X ( t ) ϕ 1 X ( t 1 ) ϕ p X ( t p ) = Z ( t ) + θ 1 Z ( t 1 ) + + θ q Z ( t q ) (1)

where Z ( t ) ~ W N ( 0, σ 2 ) .

Conveniently, ARMA (p, q) can also be written using the lag operator B as follows

ϕ ( B ) X ( t ) = θ ( B ) Z ( t ) (2)

where ϕ ( . ) and θ ( . ) are the pth and qth degree polynomials.

A unique stationary solution of ARMA ( p , q ) model exists if

ϕ ( c ) = 1 ϕ 1 c ϕ p c p 0 (3)

for all | c | = 1 .

An ARMA (p, q) model is invertible if

ϕ ( c ) = 1 + ϕ 1 c + + ϕ p c p 0 (4)

for all | c | 1 .

2.2. Periodic Autoregressive Moving Average Model

The periodic autoregressive moving average process X ( t ) of order p and q denoted as PARMA (p, q) with period s has representation

X ( t ) i = 1 p ϕ i l X ( t i ) = i = 0 q θ i l Z ( t i ) (5)

where Z ( t ) ~ W N ( 0, σ 2 ) and the parameter ϕ i l and θ i l for l = 1 , 2 , 3 , , s are the autoregressive and moving average parameters respectively.

2.3. ARCH Model

A stochastic model X t is said to be an ARCH (p) if

X t = σ t Z t , (6)

where

σ t = ω + i = 1 p ϕ i X t i 2 (7)

is the conditional standard deviation of X t given the past values of this process and Z t is a Gaussian white noise with unit variance.

The properties of ARCH (p) model include:

1) E [ X ( t ) | F t 1 ] = 0 .

2) V a r [ X ( t ) | F t 1 ] = σ t 2 .

ARCH models are used to describe a changing, possibly volatile variance. The estimation of ARCH (p) parameters is done using maximum likelihood estimation method. The generalization of ARCH (p) model by extension with autoregressive terms of the volatility gives rise to the GARCH model.

2.4. GARCH Model

A stochastic model X t is said to be an GARCH (p, q) if

X t = σ t Z t , (8)

where

σ t = ω + i = 1 p ϕ i X t i 2 + i = 1 q θ i σ t i 2 (9)

is the conditional standard deviation of X t given the past values of this process and Z t is a Gaussian white noise with unit variance. The properties of GARCH (p, q) model include:

1) E [ X ( t ) | F t 1 ] = 0 .

2) V a r [ X ( t ) | F t 1 ] = σ t 2 .

Because past values of the σ t process are fed back into the present value, the conditional standard deviation can exhibit more persistent periods of high or low volatility than seen in an ARCH process.

2.5. Periodic GARCH (p, q) Model

The periodic-GARCH process X ( t ) of order p and q denoted as P-GARCH (p, q) with period s has representation

X t = σ t Z t , (10)

where

σ t = ω l + i = 1 p ϕ i l X t i 2 + j = 1 q θ j l σ t j 2 (11)

is the conditional standard deviation of X t given the past values of this process and Z t is a Gaussian white noise with unit variance. The parameters ω l , ϕ i l and θ j l for l = 1 , 2 , , s vary with period s.

2.6. Time Lagged Neural Networks (TLNN)

TLNN is one of the artificial neural networks models applied in time series modelling and forecasting. The model takes the lagged values upto to lag s as the input values where s is the period of the time series. The forecasted value therefore only depends on the past s values. In order to avoid the need of adding a bias term, a constant input term which may be taken to be 1 is connected to every neuron in hidden and output layer [4]. For a TLNN with one hidden layer, the general prediction equation for computing a forecast may be written as [6]:

X t = Φ 0 { W c 0 + j W j 0 Φ j { W c j + i W i j X t i } } + Z t (12)

where, X t i are input terms, W c j are the weights for the connections between the constant input and hidden neurons and W c 0 is the weight of the direct connection between the constant input and the output. Also W i j and W j 0 denote the weights for other connections between the input and hidden neurons and between the hidden and output neurons respectively. Φ j and Φ 0 are the hidden and output layer activation functions respectively.

2.7. ANN-Time Varying GARCH Model

Define the process with fixed periodicity s and random periodicity τ as Y ( t ) to be an ANN-Time Varying GARCH process, if for each t,

Y t = μ t + R t , (13)

where

μ t = α 0 + j = 1 m α j f { V j + i = 1 d V i j Y t i s } , (14)

R t = σ t Z t , (15)

such that

σ t = w ( t ) + i = 1 p ϕ i ( t ) R t i 2 + i = 1 q θ i ( t ) σ t i 2 (16)

and Z t is an i.i.d white noise. Therefore, the model is an ANN model with Time Varying GARCH disturbances. Where,

1) α j ( j = 1 , 2 , , m ) and V i j ( j = 1 , 2 , , m and i = 1 , 2 , , d ) are the hidden and input connection weights respectively.

2) α 0 and V j ( j = 1 , 2 , , m ) are the output and hidden layers connection bias respectively.

3) d is the number of nodes in the input layer.

4) m is the number of nodes in the hidden layer.

5) f is the hidden layer transfer function.

6) R t is a random periodic process.

7) w ( . ) , ϕ ( . ) and θ ( . ) are non negative functions of time t.

Hence, the ANN model of (14) in fact performs a nonlinear functional mapping from the past observations Y t s , Y t 2 s , Y t 3 s , to the future value Y t therefore making connection weights of the model vary with period s.

Equation (15) is a Time Varying GARCH (p, q) process with time varying parameters w ( t ) , ϕ i ( t ) and θ i ( t ) .

The estimation of parameters for the model is done through non parametric techniques as discussed by [5].

Simulation Study of ANN-Time Varying GARCH Model

We carried out a simulation study to judge the performance of ANN-Time Varying Garch model and the estimation procedure proposed in [5]. For computational simplicity, we used ANN-Tv GARCH (1, 1) model in our simulations. A sample of size n = 1000 was generated from the following model:

Y t = μ t + R t , (17)

where

μ t = α 0 + j = 1 10 α j f { V j + i = 1 20 V i j Y t i 20 } , (18)

R t = σ t Z t , (19)

such that

σ t = w ( t n ) + ϕ ( t n ) R t 1 2 + θ ( t n ) σ t 1 2 (20)

and Z t is an i.i.d white noise, t = 1 , 2 , , 1000 , w ( u ) = 2 u ( 1 u 2 ) + 0.1 , ϕ ( u ) = 0.2 cos ( 2 π u ) + 0.25 , θ ( u ) = 2 u ( 1 u ) + 0.2 u 3 and 0 < u 1 . The number of input nodes in the input layer was fixed at 20 while the number of neurons in the hidden layer is fixed at 10. The hyperbolic tangent activation functionf was adopted and applied. The Quasi Newton training method also known as BFGS algorithm was adopted in the training the artificial neural network. Gaussian kernel was used in local polynomial estimation of the parameter functions. Cross validation method is used in selecting the bandwidth. A plot of the simulated model is shown in Figure 1 below.

Figure 1. Simulated data from ANN time varying GARCH (1, 1) model.

The parameters were estimated using the local polynomial techniques as proposed in [5]. Plots of the estimated parameters are as shown in Figure 2 below.

Figure 2. Plots of actual (Red) and estimated (Green) parameters.

From the simulation, it is evident that parameters estimation techniques as proposed in [5] are workable and gives consistent estimates.

3. Data and Analysis

3.1. Data

The data set used in this case is the daily maximum temperature of Kenya obtained from Meteorological department. Plot of the data set is as shown in Figure 3 and its descriptive statistics is as shown in Table 1 below.

Figure 3. Central Kenya monthly temperature.

Table 1. Descriptive statistics of temperature data set.

Sample: Jan 1991 to Jan 2016

Testing for periodicity in the data set using the Fisher’s g test statistic gives a p-value of 2.091002e−56 indicating that the time series is highly periodic. After deseasoning the time series and repeating the Fisher’s g test it gives a p-value of 1.911331e−11 indicating that the de-seasoned time series is still periodic. Therefore, we conclude that the daily average temperature time series have fixed and random periodicity.

3.2. Data Analysis

The P-ARMA, P-ARCH, P-GARCH, TLNN and ANN-TvGARCH models were fitted to the temperature data set and the fitted values plotted against the actual temperature values for comparison. Figure 4 below shows the plot of actual temperature values as compared to the fitted values.

Figure 4. Plot of Actual (black) Temperature against P-ARCH (blue), P-GARCH (red), TLNN (Yellow) and ANN-TvGARCH (Green) fitted temperature.

Mean square error (MSE) which is the average of the square of the errors was used to compare the performance of the models. The larger the number the larger the error. Error in this case means the difference between the observed temperature values and the fitted temperature values from every model.

MSE = ( 1 n ) i = 1 n ( Y i Y ^ i ) 2 (21)

The coefficient of determination R2 is a measure that provides information about the goodness of fit of a model. In the context of time series it is a statistical measure of how well the fitted model approximates the actual data. Generally, a higher R2 indicates a better fit for the model.

R 2 = 1 ( i = 1 n ( Y i Y ^ i ) 2 i = 1 n ( Y i Y ¯ i ) 2 ) (22)

It is evident that ANN-Time Varying GARCH model outperforms all the other models in terms of lowest MSE and highest R2. Table 2 below shows the value of MSE and R2 as calculated from all the models.

Table 2. Comparison of models MSE and R2.

The model performance results show that the ANN-TvGARCH (1, 1) model out performs the P-ARMA, P-ARCH (1), P-GARCH (1) and TLNN models in modelling daily average temperature since it has the smallest MSE and the largest R2.

4. Conclusion

This study simulates ANN-TvGARCH (1, 1) model and models daily average temperature of Kenya using ANN-TvGARCH (1, 1), P-ARMA, P-ARCH (1), P-GARCH (1, 1) and TLNN models. The ANN-TvGARCH (1, 1) simulations prove that its parameters estimation techniques proposed by [5] are workable. The performance of models in modelling daily average temperature in Kenya is determined using MSE and R2 measures. Results obtained indicate that ANN-TvGARCH (1, 1) models give the best estimates. The ANN-TvGARCH model therefore proves to be a superior model in modelling processes with fixed and random periodicity like weather derivatives. Finally, further work can be done on the construction of confidence intervals for the ANN-TvGARCH (p,q) parameters estimators as well as integrating new methods in artificial neural networks.

Acknowledgements

This research work was funded by the African union commission. The authors would like to thank the African Union commission for the support.

Conflicts of Interest

The authors declare no conflicts of interest.

References

[1] Campbell, S.D. and Diebold, F.X. (2005) Weather Forecasting for Weather Derivatives. Journal of the American Statistical Association, 100, 6-16.
https://doi.org/10.1198/016214504000001051
[2] Liu, Y.J. (2019) ARMA Model for Random Periodic Processes. Loughborough University, Loughborough.
[3] Kihoro, J., Otieno, R. and Wafula, C. (2004) Seasonal Time Series Forecasting: A Comparative Study of ARIMA and ANN Models. African Journal of Science and Technology, 5, 41-49.
[4] Adhikari, R. and Agrawal, R. (2013) An Introductory Study on Time Series Modeling and Forecasting. arXiv:1302.6613.
[5] Karuiru, E.K., Kihoro, J.M., Mageto, T. and Waititu, A.G. (2021) ANN-Time Varying GARCH Model for Processes with Fixed and Random Periodicity. Open Journal of Statistics, 11, 673-689.
https://doi.org/10.4236/ojs.2021.115040
[6] Faraway, J. and Chatfield, C. (1998) Time Series Forecasting with Neural Networks: A Comparative Study Using the Air Line Data. Journal of the Royal Statistical Society: Series C (Applied Statistics), 47, 231-250.
https://doi.org/10.1111/1467-9876.00109

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.