Research Article  Open Access
Samuel Asante Gyamerah, Philip Ngare, Dennis Ikpe, "RegimeSwitching Temperature Dynamics Model for Weather Derivatives", International Journal of Stochastic Analysis, vol. 2018, Article ID 8534131, 15 pages, 2018. https://doi.org/10.1155/2018/8534131
RegimeSwitching Temperature Dynamics Model for Weather Derivatives
Abstract
Weather is a key production factor in agricultural crop production and at the same time the most significant and least controllable source of peril in agriculture. These effects of weather on agricultural crop production have triggered a widespread support for weather derivatives as a means of mitigating the risk associated with climate change on agriculture. However, these products are faced with basis risk as a result of poor design and modelling of the underlying weather variable (temperature). In order to circumvent these problems, a novel timevarying meanreversion Lévy regimeswitching model is used to model the dynamics of the deseasonalized temperature dynamics. Using plots and test statistics, it is observed that the residuals of the deseasonalized temperature data are not normally distributed. To model the nonnormality in the residuals, we propose using the hyperbolic distribution to capture the semiheavy tails and skewness in the empirical distributions of the residuals for the shifted regime. The proposed regimeswitching model has a meanreverting heteroskedastic process in the base regime and a Lévy process in the shifted regime. By using the ExpectationMaximization algorithm, the parameters of the proposed model are estimated. The proposed model is flexible as it modelled the deseasonalized temperature data accurately.
1. Introduction
From tilling of the farmland to selling of the output of the crop yield, farmers around the world make countless decisions that affect their performance. Yet, there is one very important factor that they cannot control, climate. The world’s climate keeps on changing and this change will persist at rates that are projected to be out of the ordinary for some centuries [1]. Africa is no exception of these extreme climate changes across the world. Extreme climate events cause strain on food security, water resources, and human health in Africa. Ordinarily, it is the cause of limited economic growth and obstructs poverty reduction efforts for most countries in Africa [2]. With agriculture being the major contributing factor of the gross domestic product (GDP) growth of most countries in Africa [3] and climate conditions having extensive and causal correlation with the production variables [4], there should be an effective management technique to hedge against agricultural production risk. Most agricultural producers have encountered crop failures because of extreme weather conditions due to changes in climate. As a result, most farmers in Africa have developed their own traditional ways to improve the effect of extreme weather changes.
As an institutional response to weather changes, the Chicago Mercantile Exchange (CME) introduced the weather derivative (WD). WD has been in existence in most developed countries (Canada, Europe, USA, and Japan). However, most farmers in Africa have rarely heard about this effective hedging tool. WD, if introduced in Africa, will be more viable, reliable, and efficient to the agricultural industry and can hedge against the increasing weather changes that affect agriculture since it is devoid of factors like loss adjustments, moral hazards, adverse selections, high premiums, and complex information requirements. To avoid basis risk associated with WD, there should be an efficient model for the underlying weather variable used in pricing WD. The weather variable considered in this study is temperature. Temperature controls and influences other elements of weather like clouds, humidity, air pressure, and precipitation that affect crops during and after crop production (https://en.wikibooks.org/wiki/Basic Geography/Climate/Climate Elements, accessed on 26/01/2018.)
In the last decade, there has been empirical literatures on modelling the dynamics of temperature. Dischel [5] was the first to propose a continuous stochastic model for temperature. He modelled temperature as a meanreverting process by adapting directly the HullWhite model. The noise process in his model was driven by two Wiener processes corresponding to the distribution of the temperature and the distribution of the changes in temperature. Thereafter, McIntyre and Doherty [6] proposed a meanreverting SDE with a constant volatility daily average temperature at Heathrow airport in the United Kingdom (UK). Dornier and Queruel [7] disagreed with the direct use of the HullWhite model adopted by Dischel. They rather used a conventional Autoregressive Moving Average model rather than the AR model proposed by Dischel. By replacing Brownian motion with fractional Brownian motion, Brody et al. [8] modelled the evolution of temperature that allowed the integration of a long memory effect. Other researchers [9–11] used different kinds of meanreverting OU model driven by Brownian motion. In contrast to other researchers using Brownian motion to capture the residuals, Benth and ŠaltytBenth [12] proposed an OU model that incorporate seasonal volatility and mean. In the model of Benth and ŠaltytBenth, the residuals were driven by the generalized hyperbolic Lévy process rather than Brownian motion. The process they employed was an adjustable class of Lévy process that captured the skewness and semiheavy tails properties of the residuals.
Clearly, it can be observed that most of these researchers assumed no changes in state of the dynamics of temperature and hence modelled temperature dynamics as a single regime. The above methods of modelling temperature may lead to intractable pricing techniques for temperature derivatives. As noted by Brockett et al. [13], temperature timeseries data shows sudden changes due to artificial and natural factors. By employing regimeswitching models, the researcher can capture such sudden and discrete shifts in the temperature dynamics. Regimeswitching models do capture most of the stylized facts of temperature accurately more than the single stochastic differential equation model, hence the need for different stochastic model for each switching state.
With a meanreverting process as their base regime and a Brownian motion with mean different from zero as their shifted regime, Elias et al. [14] presented a constant volatility twostate MRS model for temperature dynamics at the city of Toronto, Canada. The model of Elias et al. (from hence we will call the model developed by Elias et al. as Elias’ Model) failed to capture the fact that volatility of temperature varies with varying temperature as it goes through discrete changes between the states of the regime process. Evarest et al. [15] improved on Elias’ model by capturing the fact that volatility of temperature varies as temperature goes through discrete changes between the states of the regime. They priced weather derivatives contracts based on the daily temperature dynamics. They used their model to calculate the future contract of HDD, CDD, and CAT indices. The introduction of the local volatility in the base regime helped in capturing well the dynamics of the underlying process. This led to a better pricing process as compared to Elias’ model. However, they failed to capture the extreme and fat tail characteristics of temperature data in their model. In his seminal thesis, Cui [16] modelled and priced temperature derivative. He modelled the dynamics of temperature by a standard meanreverting OrnsteinUhlenbeck process with a general Lévy process as the driving noise. He extended his model by proposing a continuoustime autoregressive (CAR) model driven by a general Lévy process which he calibrated to the Canadian data. The two models he proposed were used in deriving futures price on HDD, CDD, and CAT. He later developed a twostate MRS model with a “normal” regime and a “jump” regime. The “normal” regime depended on a standard OU process. For the “jump” regime, he used different noise process (Brownian motion with more extreme drift and volatility) to drive the abnormal positive or negative “jumps” in the temperature dynamics. However, he failed to capture the changes in volatility of temperature during the MRS model but rather assumed a constant volatility in both regimes.
Several models have been formulated over time to capture the stylized facts of temperature; however these models proposed in literature have failed to capture well the stylized features of temperature, thus affecting the pricing models of WD. Inaccurate representation of the dynamics of temperature affects the pricing of WD. WD also relies on accurate extensive longterm timeseries data [17]. However, there is lack of accessible, accurate, complete, and usable weather data in most African countries. Calibrating the MRS model is not trivial because the regimes are not clearly observable but latent. To outwit these problems, we use ExpectationMaximization (EM) algorithm to estimate the parameters in the model.
From the above literatures presented, Brownian motion has been replaced with a fractional Brownian motion and subsequently by a generalized hyperbolic Lévy processes. Nevertheless, it will be interesting to explore both Brownian motion and Lévy processes in a MRS model that incorporates “normal” temperatures and “extremes” in temperature. The contribution of this paper is twofold; firstly we developed a mathematically tractable temperature dynamics model for the African farmer by using regimeswitching model and secondly we showed that Gaussian distribution cannot capture the dynamics of reallife temperature. To the best of our knowledge, the twostate regimeswitching model developed is the first kind of model that can be used to price futures and options on futures.
2. Daily Temperature Dynamics
The most widely used temperature indices in most industries (energy consumers, energy industry, travel, transportation, agriculture, government, retailing, and construction) are the cumulative average temperature (CAT), cooling degree days (CDD), and heating degree days (HDD). Nevertheless, in this research, we use the CAT and growing degree days (GDD) since they are the dominant indices that affect agriculture in Africa [18, 19]. GDD is the measure of the suitability for a crop to grow in relation to the standard temperature.
Definition 1. For a given single temperature weather station, let and represent the daily maximum and minimum temperature (the temperatures used in this research are measured in degrees Celsius) recorded at day , respectively. We define the daily average temperature at day as
Definition 2. Assume the daily average temperature (DAT) at time , and then the and generated at a specific location over a specific measurement period are defined as
2.1. Stylized Facts of Temperature
Temperature has clear characteristics which differs largely from commodities and other financial assets. The most palpable characteristics of temperature are the following.
(i) Seasonality Feature. Temperature exhibits annual (365 days) seasonal movements. The DAT at time is defined as the sum of the deseasonalized temperature and deterministic seasonal component given asTo model the variations of temperature without the deterministic seasonality, the seasonal component in (4) will be removed to obtain the deseasonalized temperature . The deterministic seasonal model at time , , is defined aswhere and represent the constant and coefficient in the linear seasonal trend of the raw data, respectively, captures the amplitude of the variation, and is the phase angle.
(ii) MeanReverting Feature. It is practically impossible for daily temperature to deviate from the mean temperature over a long period. Daily temperature reverts toward the mean, a feature that is common to other commodities. As observed by Alaton et al. [9], longterm changes may be as a result different factors which includes but are not limited to global warming, greenhouse effects, and urbanization.
(iii) Extreme Feature. Temperature data have extremal data points. These extremal data points are “abnormal” movement caused by abrupt changes in temperature. In contrast to stocks which usually exhibit jumps in their price movements, daily temperature can show some signs of spikes which are normally shortlived and of very extreme size.
(iv) Locality Feature. Temperature has a strongly localized response in temperature modelling and as such requires caution in making generalization, hence the need for different models to capture these different characteristics at different locations.
(v) Volatility. In their twostate regime switching model formulation, Elias et al. [14] considered a constant volatility in either sate of his model. But this assumption might not be a reality since a shift in temperature residuals from one state to the other causes a change in the volatility from one state to the other. Extremal data points in temperature residues have greater volatility effects than is the case when there are no spikes or sudden increase in temperature. This is ascertained in the Engle test performed to check for heteroscedasticity in the temperature residuals (see Table 2). In model (9), the volatility is assumed to be dependent on the current deseasonalized temperature . More precisely, the higher the deseasonalized temperature level, the larger the changes in the deseasonalized daily average temperature. Hence, in this study we will propose a model whose volatility differ with each regime and underlying process.
3. Markov RegimeSwitching (MRS) Model
The Markov switching model developed by Hamilton [20] and Hamilton [21] inferred that the distribution of a variable is known, conditional on the occurrence of a specific regime/state. The switching process between the regimes is Markovian and is determined by an unobserved random variable. The underlying regimes, however, do not necessarily have to be Markovian but should be independent. The daily temperatures do change from day to day and these changes are not directly observable but latent. Therefore, statistical inference with regard to the likelihood of occurrence of each of the regimes at any time should be drawn.
MRS has been used effectively in modelling the behaviour of the stock market and spot price of electricity [22–25]. Chevallier and Goutte [26] used sixteen international stock markets to compare the performance of regimeswitching Lévy models. Chevallier and Goutte [27] developed an estimation methodology that provided a better fit for electricity and market prices by using meanreverting Lévy jump processes.
In temperature modelling, it is typical to assume that there are different regimes that can capture distinct principal weather condition or the localized weather behaviour. In our study, the daily temperature is assumed to be latent with two possible regimes, either in the base regime (“normal or meanreverting regime” ) or in the shifted regime (“extreme” regime ). Suppose that each regime in the regimeswitching model undergoes discrete shifts between the regimes of the process, and then follows a firstorder Markov process with the transition matrix:The transition probabilities of our temperature process in (6) is given asDue to the Markov property of the states at any given time , the future state of the underlying process (temperature) is independent of the past state of the underlying process given the present state of the underlying process.
3.1. Modelling Daily Temperature Dynamics
To efficiently model the dynamics of temperature, it is assumed that the deseasonalized temperature is either under base regime or shifted regime and each regime is independent and parallel to the other regimes. The deseasonalized temperature is assumed to be driven by two sources of randomness: a Markov process and Lévy process. We assume a constant meanreversion rate in the base regime. Based on the stylized facts of temperature, a regimeswitching stochastic model that describes the dynamics of temperature is formulated. This model can be used to price weather derivatives. The base regime model is assumed to follow a meanreverting stochastic process with a timevarying volatility. The residuals of the base regime are assumed to be generated by a Brownian process.
To effectively capture the nonnormality of the temperature residuals (see Figures 3, 5, 6, and 7 and Table 5), the residuals of the shifted regime are captured by a Lévy process. By comparing the generalized hyperbolic distribution to its subclasses (normalinverse Gaussian, Hyperbolic, and VarianceGamma), we were able to find the best distribution that can model the asymmetry and heavy tails of the residuals data. As our first regimeswitching model, we call it timevarying meanreversion Lévy (TML) regimeswitching model. This proposed model is distinctly appropriate to capture the dynamics of temperature. In sequel, the propose TML model for the deseasonalized temperature dynamics is given aswhere is deseasonalized daily volatility of the base through time and is the volatility of the shifted regimes and is the meanreversion rate of the deseasonalized temperature in the base regime which reverses the deseasonalized temperature to the longterm equilibrium level after the deseasonalized temperature has drifted from this equilibrium. is the standard Brownian motion. is a Lévy process which is cádlág, adapted, realvalued general Lévy process with independent, stationary increments and stochastically continuous, and is the deseasonalized temperature at time .
Proposition 3. If the deseasonalized daily average temperature follows model (9), then the explicit solution is given by
Proof. Determining the stochastic integral of the base regime process demands a variation of parameters approach to spell out a new function . By Itô’s lemma, the derivative of the new function can be found. For the shifted regime
4. Analysis of Temperature Data
The daily maximum and minimum surface temperature data were taken from the weather measurement stations at Bole and Tamale. Bole and Tamale are located in the Northern region (the hottest region in Ghana) of Ghana. Bole and Tamale are the district capital of Bole and Tamale, respectively. In Ghana, the main source of weather data is from the Ghana Meteorological Agency. The sample period expands from 01/01/1987 to 31/08/2012 and consists of a total of 9375 observations. The average of the daily maximum and minimum temperature is calculated according to Definition 1. The raw data is checked for missing data to avoid gaps in the historical data. Depending on the size of the missing data (the proportion of the missing data should not be more than 10%), the missing data is filled using the method of combined average. The combined average is calculated using two distinct averages: the average of 7 days (d) after and before the missing day,and the average of that missing day across previous years,The missing values in the dataset are filled by averaging the calculated value in (13) and (14).
In Table 1, the descriptive statistics for the daily average temperature of the two measurement stations (Bole and Tamale) are presented. The values of the median, mean, maximum, and minimum temperature for both towns are consistent and this can be attributed to the fact that the geographical locations of these two measurement stations are not distant apart. The amount of variation (std) is relatively small but vary between two measurement stations. With a skewness value of 0.41 and 0.31 for Bole and Tamale, respectively, the empirical distribution of these two towns are asymmetrical. With a negative excess kurtosis for both towns, it can be explained that the distribution of the DAT data is more outlierprone than the normal distribution. We present the values statistics of Pearson’s criteria of goodnessoffit with its P values of the DAT timeseries data (see Table 1). From the values of the goodnessoffit test and at a level of significance, the null hypothesis (DAT data is normally distributed) can be rejected. With a Hurst exponent (H) greater than 0.5 for the two towns, there is a strong trend in the DAT data. However, the trend in Bole DAT data is more predictable than that of Tamale.


4.1. Seasonal Component
Generally, temperature follows a seasonal pattern. These seasonal patterns can be decomposed into a seasonal trend and linear trend depending on the region where the data was taken and the number of years of temperature data used. The seasonal component in the DAT timeseries data is captured in model (5). In order to calibrate the DAT timeseries data to the proposed model (9), the DAT time series will be deseasonalized. Figure 2 shows the deseasonalized data of the daily average temperature for Bole and Tamale.
From Figure 1, there is a strong seasonality in the DAT timeseries data. Temperature exhibits a seasonal trend in Africa; higher temperatures during the dry seasons; and lower temperatures during the rainy seasons. The seasonal trend is captured in model (5). The seasonal component of model (5) is given as . The DAT data is calibrated to the model and, using the least square method of estimation, the parameters are estimated.
(a) Bole deseasonalized DAT
(b) Tamale deseasonalized DAT
(a) Bole deseasonalized DAT
(b) Tamale deseasonalized DAT
(a) Histogram of Bole final residuals
(b) Histogram of Tamale final residuals
Even though the linear trend in the data is weak, a close observation (see Figure 1) shows an increasing trend in the DAT timeseries data. The linear trend in our data may be as a result of the longer period of years taken. Also, as observed by Alaton et al. [9], this increasing trend of DAT over some decades at this location is as a result of many factors which include but are not limited to global warming, greenhouse effect, and urbanization. The linear component of model (5) is given as .
4.2. Residuals
Figure 4 shows the squared residual plot of the deseasonalized daily average temperature data of Bole and Tamale. There is evidence of continuous variation in the variance of noise, an indication of seasonal heteroscedasticity. This shows that volatility of the deseasonalized DAT residuals is not constant as assumed by Elias et al. [14]. To further validate this result, we use the Engle test of residual heteroscedasticity to test for conditional heteroscedasticity. From Table 2, we can reject the null hypothesis of no conditional heteroscedasticity and conclude that there are significant heteroscedasticity effects in the residual series of both towns. With a p value of and at a level of significance for both towns, there is a strong evidence to reject the null hypothesis of no conditional heteroscedasticity effects.
(a) Bole squared residuals
(b) Tamale squared residuals
4.2.1. Normality Test of Temperature Data Residuals
In this section, statistical and graphical methods are applied to the DAT residuals timeseries data to test for the normality of the residuals.
Most conventional literatures [9, 14, 15] assumed that the residuals are independent and identically and normally distributed. It should however be noted that inaccurate choice of the distribution of this residuals can cause model error and mispricing when pricing weather derivatives. To model the residuals of the DAT data, it is important to test the residuals for normality using different goodnessoffit test.
Table 3 shows the normal distribution statistics of the residuals. The values of for Bole and Tamale are significant at confidence level implying that the residuals of Bole and Tamale are not normally distributed. The descriptive statistics of the residuals of Bole and Tamale are presented in Table 4. From the Hurst exponent in Table 4, the residuals of Bole and Tamale DAT have strong trend and are more predictable. The skewness and kurtosis in Table 4 further show that the residuals are not normally distributed. These results are congruous to the QQ plot for normal distribution (Figure 5) and the normal fit plot (Figure 6). Figure 7 shows that there are cases of outliers in the residuals of the daily average temperature of Bole and Tamale.


(a) JacqueBera Test  
 
(b) AndersonDarling test  

Additionally, using the JacqueBera (JB) goodnessoffit test and the AndersonDarling (AD) test for normality (see Table 5), we can reject the null hypothesis that the residuals are normally distributed at a confidence level. From the test statistics (Table 5) and graphical representations (Figures 5–7), there is enough evidence to state that the deseasonalized DAT residuals of Bole and Tamale do not follow the normal distribution. Thus, it can be concluded that it is not efficient to model the random noise with a Gaussian process.
Due to the inability of the normal distribution to capture well the residuals of the deseasonalized DAT data, we propose using the Lévy process to model the residuals of the shifted regime. We use the generalized hyperbolic (GH) distribution and its subclasses (normalinverse Gaussian (NIG), hyperbolic (HYP), and the variancegamma (VG)) to capture the skewness and semiheavy tails in the residuals data. We test for the best fit for our residuals data using the above named distributions.
4.3. Generalized Hyperbolic (GH) Distribution
We model the residuals of the shifted regime by the generalized hyperbolic (GH) distribution and the subclasses which are relevant for applications.
Definition 4. The onedimensional generalized hyperbolic (GH) distribution was introduced by BarndorffNielsen [28] and its probability density function is defined as where , is the modified Bessel function of the third kind of order , and
Each parameter in distribution has different effect on the shape of the distribution: determines the characterization of subclasses of the GH distribution, controls the steepness around the peak (the larger , the steeper the density), with is the asymmetry parameter (= 0 gives a symmetric distribution around and the skewness of the density increases as increases), is the location of the distribution, and is the scaling. A proper choice of these parameters can help in describing different shapes of the distribution.
Suppose a random variable follows a generalized hyperbolic distribution, and then the characteristics function (moment generating function (MGF) or the cumulant function) is given as The subclasses of the GH distribution include the normalinverse Gaussian (NIG) distribution, the hyperbolic (HYP) distribution, and the variancegamma (VG) distribution.
Definition 5. For in the GH distribution, we obtain the normalinverse Gaussian (NIG). The probability density function (pdf) of a NIG distribution of a random variable is an infinitely divisible distribution which is given aswhere , , and . is the modified Bessel function.
The NIG distribution was introduced in finance literature in 1997 by BarndorffNielsen [29]. NIG distribution has a heavier tail than the normal distribution and can take different kinds of shapes. The MGF of NIG distribution isThe NIG distribution have the following properties:(1)Conditioned that , , and , the NIG distribution will approach the normal distribution .(2)Assuming that , then, and , we have that
Definition 6. The Hyperbolic Distribution (HYP) is a subclass of the GH distribution when . Given a hyperbolic random variable , the pdf is given as where and is t the Bessel function of the third kind with index 1
The hyperbolic distribution can also capture semiheavy tails. The MGF of the hyperbolic distribution isThe hyperbolic distribution is not closed under convolution.
Definition 7. By restricting and , we have the VarianceGamma (VG) distribution with pdf where , and denotes the gammafunction. is the modified Bessel function of the second kind.
The VarianceGamma density was introduced by Madan et al. [30]. The tails of VG distribution decrease slowly than the normal distribution. The class of VG distributions is closed under convolution. The MGF of VG distribution is
4.4. Parameter Estimation
The parameters of the seasonality model and the TML model is estimated. The estimation of these parameters depends on the Bole and Tamale DAT data from to .
4.4.1. Fitting the Deterministic Seasonality Model to Data
The deterministic seasonality process, model (5), can be transformed toTo find the numerical values in model (5), the transformed deterministic seasonality process (model (23)) is fitted to the DAT data. The parameters are estimated using the least square methods.
4.4.2. Estimation of the TML Parameters
Estimating the parameters of TML model is not trivial. The parameters of the model are estimated using the ExpectationMaximization algorithm developed by Dempster et al. [31]. The vector of unknown parameters will be estimated by two steps’ iterative algorithm: an expectation (E) step and a maximization (M) step.
Discretization. Even though temperature is a continuous process, its data is not recorded continuously but rather recorded in discrete time points. Therefore, estimating the parameters in a continuous time will be computationally costly. Before the parameters of the TML model are estimated, they will have to be calibrated to the deseasonalized DAT data and this is possible by transforming the model from its continuous form to a discrete form. The discretized form of model (9) for the base and shifted regimes is given aswhere and are the Weiner residual and Lévy residual, respectively.
From (25), the vector of unknown parameters and for the base and shifted regimes, respectively, will be estimated.
EStep. Assume the length of the DAT historical data is and where represents a specific time that the DAT is recorded and is the computed vector of parameters in the iteration. The conditional distribution of the regimes for time update values of will be calculated. Suppose is a vector of the past historical data of the discretized model, and then .
(i) Filtering. Based on the Bayes rule, the filtered probability of the discretized model can be estimated as where and is the density of the underlying regime process at time conditional that the underlying process was in regime . The conditional probability density function for the base and shifted regimes will be calculated from the CDF.
From (25), the drift and diffusion coefficient of the base regime are and , respectively. Similarly, the drift and diffusion coefficient of the shifted regimes are and , respectively.
(ii) Smoothing. For iterate The probability density functions (pdf) of the base and shifted regimes based on their diffusion and drift coefficient is, respectively, given as
MStep. By maximizing the expected loglikelihood function , the maximum likelihood (ML) estimate for the vector of unknown parameters will be calculated. Also, in this step the transition probabilities of the regimeswitching model will be estimated.
The loglikelihood function from the conditional probability density function of both regimes is, respectively, given asBy maximizing the loglikelihood function presented in (30), the vector of parameters can be estimated.
Proof. The first derivative of (30) with respect to isBy maximizing (34), The derivative of (30) with respect to isBy maximizing (36),
Also, the vector of unknowns of can be estimated by maximizing (31):
Proof. By finding the derivative of (31) with respect to ,Maximizing (40) gives The derivative of (31) with respect to isBy maximizing (42)
The transition probabilities are estimated by making use of the formula proposed by Kim [32]:
5. Discussion and Results
By inserting the estimated parameters into the transformed deterministic seasonality process (model (23)), the deterministic seasonal DAT is obtained for Bole and Tamale. The linear trend in the model is evidently very small. However, the linear trend of Bole DAT is more evident than that of Tamale DAT. Using the parameter estimates values in Table 6, seasonal sine graph is fitted to our Bole and Tamale DAT data (see Figure 8).The estimated parameters of normal, HYP, GH, NIG, and VG distributions are presented in the Table 7.


To test for the goodnessoffit of the distributions, two distance measures are used; the KolmogorovSmirnov (KS) and the AndersonDarling (AD) statistic are used. The KS test statistic and AD test statistic are used to summarize the difference between the fitted cumulative density function (cdf) and the empirical cdf. Comparative to KolmogorovSmirnov, the AD test statistics is more powerful because it incorporates integration over the entire range of data by paying more attention to the tail distances. The lower the value of KS and AD test statistics, the better the fit of that distribution.
Regardless of the test used, the distance between the fitted hyperbolic distribution and its empirical distribution is lower compared to the other distributions and their empirical. This affirms that the hyperbolic distribution does fit well to our Bole and Tamale random noise. A series of random numbers for GH, NIG, HYP, and VG are generated using the parameters estimated in Table 7. The QQ plots of the quantiles of the residuals versus the randomly generated quantiles of the GH, NIG, HYP, and VG distributions are plotted (see Figure 9). The straight line (in red) shows how the residual data would behave if it is perfectly distributed with the GH, NIG, HYP, and VG. From the illustrated figures (Figure 9), it is evident that the hyperbolic distribution fits plausibly well for our Bole and Tamale random components than the normal, GH, NIG, HYP, and VG distributions. This is consistent with the AD and KS goodnessoffit test in Table 9.
The deseasonalized DAT and the conditional probability of being in the extreme regime for the historical deseasonalized DAT are shown in Figure 10. The deseasonalized DAT that are categorize as “extremes,” that is, with , are represented by red dots.
(a) Bole
(b) Tamale
The estimates of the TML model for deseasonalized temperature is presented in Table 8. The speed of the meanreversion is fairly low for both Bole and Tamale. However, the meanreversion rate of Tamale is higher than that of Bole. The Markov probability of the deseasonalized DAT to stay in the “normal” regime of the TML model at Bole and Tamale is higher than the Markov probability of the deseasonalized DAT to stay in the “extreme” regime at Bole and Tamale. We can conclude that the “normal” regime of the TML model at both Bole and Tamale is relatively stable comparative to the “extreme" regime of the TML model. However, it is evident that there are instances that the temperatures of Bole and Tamale are at their extremes since the probability of staying in the “extreme” regime is significant even though it is small comparative to the probability of staying in the “normal” regime.


6. Conclusion
In this research, a novel timevarying meanreversion Lévy regimeswitching (TML) temperature dynamics model which captures the normal variations and extreme variations in temperature is developed to characterize the stochastic dynamics of temperature. The model includes a timevarying volatility and a Lévy process giving rise to the innovations. The parameters of the TML model is estimated by using a robust estimation method called the ExpectationMaximization (EM) algorithm.
A study of the Bole and Tamale historical DAT data showed that the deseasonalized DAT data has the meanreversion property. Using plots and test statistics, it was observed that the residuals of the deseasonalized data are not normally distributed. To model the nonnormality in the residuals, we employed the generalized hyperbolic, normalinverse Gaussian, and hyperbolic distributions to capture the skewness and semiheavy tails in the residuals. The hyperbolic distribution was found to be the best distribution that can capture the semiheavy tails and skewness in the empirical distributions of the residuals in the shifted (“extreme”) regime. The introduction of the generalized hyperbolic and its subclasses led us to use the Lévy process in the shifted regime of the TML model for the deseasonalized temperature. The proposed regimeswitching model is flexible as it modelled the deseasonalized temperature data reasonably well. Also, it was observed that there are instances that the temperature at both measurement stations are at their extremes as stated in the introduction.
From our results, it is evident that, due to the changes in volatility of the daily average temperature dynamics, conventional models that depend on Gaussian distribution will be ineffective when pricing weather derivatives in the derivative market. Our model however can be used to price weather derivative contracts written on temperature indices (CAT and GDD) for farmers in Africa since it incorporates the stylized facts of temperature in the model.
Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.
Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.
Acknowledgments
The authors wishes to thank African Union and Pan African University and Institute for Basic Sciences Technology and Innovation, Kenya, for their financial support for this research.
References
 W. N. Adger, S. Huq, K. Brown, C. Declan, and H. Mike, “Adaptation to climate change in the developing world,” Progress in Development Studies, vol. 3, no. 3, pp. 179–195, 2003. View at: Publisher Site  Google Scholar
 L. Christiaensen and L. Demery, Down to Earth: Agriculture and Poverty Reduction in Africa, World Bank Publications, 2007. View at: Publisher Site
 E. Bryan, T. T. Deressa, G. A. Gbetibouo, and C. Ringler, “Adaptation to climate change in Ethiopia and South Africa: options and constraints,” Environmental Science & Policy, vol. 12, no. 4, pp. 413–426, 2009. View at: Publisher Site  Google Scholar
 J. Ochieng, L. Kirimi, and M. Mathenge, “Effects of climate variability and change on agricultural production: The case of small scale farmers in Kenya,” NJAS  Wageningen Journal of Life Sciences, vol. 77, pp. 71–78, 2016. View at: Publisher Site  Google Scholar
 B. Dischel, “Blackscholes wont do,” Risk, vol. 10, pp. 89, 1999. View at: Google Scholar
 R. McIntyre and S. Doherty, “Weather riskan example from the uk,” Energy and Power Risk Management June, 1999. View at: Google Scholar
 F. Dornier and M. Queruel, “Caution to the wind,” in Energy & Power Risk Management, vol. 13, pp. 30–32, 8 edition, 2000. View at: Google Scholar
 D. C. Brody, J. Syroka, and M. Zervos, “Dynamical pricing of weather derivatives,” Quantitative Finance, vol. 2, no. 3, pp. 189–198, 2002. View at: Publisher Site  Google Scholar  MathSciNet
 P. Alaton, B. Djehiche, and D. Stillberger, “On modelling and pricing weather derivatives,” Applied Mathematical Finance, vol. 9, no. 1, pp. 1–20, 2002. View at: Publisher Site  Google Scholar
 F. E. Benth and J. š. Benth, “The volatility of temperature and pricing of weather derivatives,” Quantitative Finance, vol. 7, no. 5, pp. 553–561, 2007. View at: Google Scholar
 A. Zapranis and A. Alexandridis, “Weather derivatives pricing: modeling the seasonal residual variance of an OrnsteinUhlenbeck temperature process with neural networks,” Neurocomputing, vol. 73, no. 13, pp. 37–48, 2009. View at: Publisher Site  Google Scholar
 F. E. Benth and J. SaltyteBenth, “Stochastic modelling of temperature variations with a view towards weather derivatives,” Applied Mathematical Finance, vol. 12, no. 1, pp. 53–85, 2005. View at: Publisher Site  Google Scholar
 P. L. Brockett, L. L. Golden, M.M. Wen, and C. C. Yang, “Pricing weather derivatives using the indifference pricing approach,” North American Actuarial Journal, vol. 13, no. 3, pp. 303–315, 2009. View at: Publisher Site  Google Scholar  MathSciNet
 R. S. Elias, M. I. Wahab, and L. Fang, “A comparison of regimeswitching temperature modeling approaches for applications in weather derivatives,” European Journal of Operational Research, vol. 232, no. 3, pp. 549–560, 2014. View at: Publisher Site  Google Scholar  MathSciNet
 E. Evarest, F. Berntsson, M. Singull, and W. Charles, Regime switching models on temperature dynamics, 2016.
 K. Cui, Weather Derivatives: Modelling, Pricing and Applications [Ph.D. thesis], University of Calgary, 2014.
 F. d. Nicola, R. V. Hill, M. Carter, R. Choularton, J. Hansen, and D. Osgood, Index Insurance for Managing ClimateRelated Agricultural Risk: Toward A Strategic Research Agenda, 2011.
 R. Gordon and A. Bootsma, “Analyses of growing degreedays for agriculture in Atlantic Canada,” Climate Research, vol. 3, no. 3, pp. 169–176, 1993. View at: Publisher Site  Google Scholar
 J. L. Hatfield and J. H. Prueger, “Temperature extremes: effect on plant growth and development,” Weather and Climate Extremes, vol. 10, pp. 4–10, 2015. View at: Publisher Site  Google Scholar
 J. D. Hamilton, “Rationalexpectations econometric analysis of changes in regime: an investigation of the term structure of interest rates,” Journal of Economic Dynamics & Control, vol. 12, no. 23, pp. 385–423, 1988. View at: Publisher Site  Google Scholar  MathSciNet
 J. D. Hamilton, “A new approach to the economic analysis of nonstationary time series and the business cycle,” Econometrica, vol. 57, no. 2, pp. 357–384, 1989. View at: Publisher Site  Google Scholar  MathSciNet
 J. Chevallier and S. Goutte, “Detecting jumps and regime switches in international stock markets returns,” Applied Economics Letters, vol. 22, no. 13, pp. 1011–1019, 2015. View at: Publisher Site  Google Scholar
 S. Gyamerah and P. Ngare, “Regimeswitching model on hourly electricity spot price dynamics,” Journal of Mathematical Finance, vol. 8, no. 1, pp. 102–110, 2018. View at: Google Scholar
 H. Schaller and S. Van Norden, “Regime switching in stock market returns,” Applied Financial Economics, vol. 7, no. 2, pp. 177–191, 1997. View at: Publisher Site  Google Scholar
 R. Weron, “Heavytails and regimeswitching in electricity prices,” Mathematical Methods of Operations Research, vol. 69, no. 3, pp. 457–473, 2009. View at: Publisher Site  Google Scholar  MathSciNet
 J. Chevallier and S. Goutte, “Crosscountry performance of Lévy regimeswitching models for stock markets,” Applied Economics, vol. 49, no. 2, pp. 111–137, 2017a. View at: Publisher Site  Google Scholar
 J. Chevallier and S. Goutte, “Estimation of lévydriven ornstein–uhlenbeck processes: application to modeling of and fuelswitching,” Annals of Operations Research, vol. 255, no. 12, pp. 169–197, 2017b. View at: Publisher Site  Google Scholar  MathSciNet
 O. BarndorffNielsen, “Exponentially decreasing distributions for the logarithm of particle size,” International Journal of Stochastic Analysis, vol. 353, no. 1674, pp. 401–419, 1977. View at: Publisher Site  Google Scholar
 O. E. BarndorffNielsen, “Processes of normal inverse Gaussian type,” Finance and Stochastics, vol. 2, no. 1, pp. 41–68, 1998. View at: Publisher Site  Google Scholar  MathSciNet
 D. B. Madan, P. P. Carr, and E. C. Chang, “The variance gamma process and option pricing,” Review of Finance, vol. 2, no. 1, pp. 79–105, 1998. View at: Publisher Site  Google Scholar
 A. P. Dempster, N. M. Laird, and D. B. Rubin, “Maximum likelihood from incomplete data via the EM algorithm,” Journal of the Royal Statistical Society: Series B (Statistical Methodology), vol. 39, no. 1, pp. 1–38, 1977. View at: Google Scholar  MathSciNet
 C.J. Kim, “Dynamic linear models with Markovswitching,” Journal of Econometrics, vol. 60, no. 12, pp. 1–22, 1994. View at: Publisher Site  Google Scholar  MathSciNet
Copyright
Copyright © 2018 Samuel Asante Gyamerah et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.