Time Series Modelling with Application to Tanzania Inflation Data

In this paper, time series modelling is examined with a special application to modelling inflation data in Tanzania. In particular the theory of univariate non linear time series analysis is explored and applied to the inflation data spanning from January 1997 to December 2010. Time series models namely, the autoregressive conditional heteroscedastic (ARCH) (with their extensions to the generalized autoregressive conditional heteroscedasticity ARCH (GARCH)) models are fitted to the data. The stages in the model building namely, identification, estimation and checking have been explored and applied to the data. The best fitting model is selected based on how well the model captures the stochastic variation in the data (goodness of fit). The goodness of fit is assessed through the Akaike Information Criteria (AIC), Bayesian Information Criteria (BIC) and minimum standard error (MSE). Based on minimum AIC and BIC values, the best fit GARCH models tend to be GARCH(1,1) and GARCH(1,2). After estimation of the parameters of selected models, a series of diagnostic and forecast accuracy test are performed. Having satisfied with all the model assumptions, GARCH(1,1) model is found to be the best model for forecasting. Based on the selected model, twelve months inflation rates of Tanzania are forecasted in sample period (that is from January 2010 to December 2010). From the results, it is observed that the forecasted series are close to the actual data series.


Introduction
The concept of time series is based on the historical observations.It involves explaining past observations in or-der to try to predict those in the future [1].A time series is a collection of observations measured sequentially through time.These measurements may be made continuously through time or be taken at a discrete set of time points [2].
Inflation as described by [3] is the persistent increase in the level of consumer prices or persistent decline in the purchasing power of money.Inflation can also be expressed as a situation where the demand for goods and services exceeds their supply in the economy [4].In reality inflation means that your money can not buy as much as what it could have bought yesterday.
In recent years, inflation has become one of the major economic challenges facing most countries in the world especially those in Africa including Tanzania.Inflation is a major focus of economic policy worldwide as described by [5].Inflation dynamics and evolution can be studied using a stochastic modelling approach that captures the time dependent structure embedded in the time series inflation data.The autoregressive conditional heteroscedasticity (ARCH) models, with its extension to generalized autoregressive conditional heteroscedasticity (GARCH) models as introduced by [6] and [7] respectively accommodate the dynamics of conditional heteroscedasticity (the changing variance nature of the data).Heteroscedasticity affects the accuracy of forecast confidence limits and thus has to be handled properly by constructing appropriate non-constant variance models [8].
The most common way of measuring inflation is the consumer price index (CPI) over monthly, quarterly or yearly.The inflation rate t I at time t is calculated as Within time series modelling, there are two approaches available for forecasting: the univariate and multivariate.In particular this paper will forecast future values of inflation time series data using the univariate forecasting approach, in which forecasts depend only on present and past values of a single series being forecasted.

Conditional Heteroscedasticity: Arch-Garch Models
Let { } t r be the mean-corrected return or rate of inflation, t ε be the Gaussian white noise with zero mean and unit variance and t H be the information set at time t given by { } , , , . Then according to Engle [6], the process { } t r is ARCH ( ) where σ is the standard deviation and ( ) and the error term t ε is such that ( ) ( ) with non-negativity condition that 0 0 α ≥ and The ARCH (1) model is a particular case of the general ARCH ( ) with non-negativity condition that 0 0 α ≥ and 1 0 α ≥ .0 α and 1 α are unknown parameters.

Forecasting with the ARCH Model
The ARCH models provide good estimates of the series before it is realized.Let 1 2 3 , , , , t r r r r  be an observed time series.Then the l-step ahead forecast, for 1, 2, , l =  at the origin t , denoted by ( ) t r l , is taken to be the minimum mean squared error prediction, that is ( ) where ( ) f r is a function of the observations.Then according to [9], ( ) The forecasts for the t r series do not provide helpful information.It is therefore more useful to consider the squared returns The obvious possible problem in using the ARCH formulation is that the approach can lead to a highly parametric model if the lagq is large.This necessitates the use of the GARCH model as an extension to the ARCH model.

The GARCH Model
where ( ) The GARCH ( ) , p q model does not show autocorrelation in the return series { } t r .However the squared returns show autocorrelation even though the returns are not correlated.Writing 2 r r in terms of where 0 i α = for i q > and 0 j β = for i p > .Thus the equation of 2 t r has an autoregressive moving av- erage ARMA ( ) , m p representation.
In order to find the GARCH ( ) , p q process, we consider solving for 0 α in Equation ( 8) and let the variance of t r be 2 ε σ , getting Substituting Equation ( 12) into the Equation ( 11) one gets ( )( ) Multiplying both sides of Equation ( 14) by ( ) .
and since t v is a martingale difference, also Thus the autocovariance of the squared returns for the GARCH ( ) Dividing both sides of Equation ( 15) by ( ) gives the autocorrelation function at lagk as ( ) Letting mm φ to denote the th m partial autocorrelation for 2 t r , Equation ( 16) can be written as By Equation (17), mm φ cuts off after lagq for an ARCH ( ) q process such that 0 mm φ ≠ for k q ≤ and 0 mm φ = for k q > .This is identical to the partial ACF (PACF) for an AR ( ) q process and decays exponen- tially [11].

Forecasting with GARCH(p,q) Models
The l-step ahead forecast of the conditional variance in a GARCH ( ) where ( ) for i l < is given recursively by ( ) ( )

Data Analysis
This section is dedicated to fitting the GARCH family of models to the Tanzania inflation rate data which we obtained from the Tanzania National Bureau of Statistics.The original data set consist of 168 monthly observations of the Tanzania inflation rates spanning from January 1997 to December 2010 as shown in Table 1.

Pre-Estimation Analysis
To avoid the difficulties of possible premature convergence we perform a pre-fit analysis.This will lead to selecting the appropriate model that adequately describes the data.In this pre-estimation or pre-fit analysis, data are loaded in the form of a price series, and then converted to a return series (stabilized series).The pre-fit analysis checks the return series for correlation and then quantifies the correlation.Because GARCH modelling assumes a return series, we need to convert inflation data (raw data) to returns.Figure 1 below displays raw data of inflation rate and Figure 2 displays the return series converted from the raw.
The returns appear to be quite stable over time and the transformations from Inflation rate data to returns has produced a stationary time series.The GARCH model assumes that return series is a stationary process.This may seem limiting, but the inflation data to return transformation is common and generally guarantees a stable data set for GARCH modelling.
According to [6] any autocorrelations in the series have to be removed before a GARCH model is constructed.This done by regressing the squares of the series t r on its past squared values 2 2     , , t t r r −  with the number of lags determined by the form of the ACF and PACF.The figures below display the sample autocorrelation function (ACF) of the returns based on the assumption that all autocorrelations are zero beyond lag zero.
In Figure 3 and Figure 4, the ACF and PACF provide no indication of the correlation characteristics of the returns.The ACF of squared returns in Figure 5 shows significant correlation and die out slowly.These results indicate that the variance of returns series is conditional on its past history and may change over time.
Statistical test for heteroscedasticity is carried out in order to establish the presence of ARCH effects in the data.This is shown in Table 2, Table 3        From Table 2 it can be seen that there is no significant correlation in the raw returns at the 5% level of significance since H = 0.However, there is significant serial correlation in the squared returns in Table 3 when tested with the same inputs.
Table 4 is the Engle's test for return series which shows that there is a significant correlation in the series, indicating presence of ARCH effects that is heteroscedasticity.Each of these tests extracts the sample mean from the actual inflation series.

Model Selection
The strategy used in selecting the appropriate model from competing models is based on the Akaike information criterion ( ) AIC , the Bayesian information criterion ( ) BIC and standard error ( ) MSE and on the signific- ance tests.
MATLAB software is used to perform trial and error evaluations to determine the best fitting model.The idea is to have a parsimonious model that captures as much variation in the data as possible.Usually the simple GARCH model captures most of the variability in most stabilized series.Small lags for p and q are common in applications.Typically GARCH ( ) 1,1 , GARCH ( ) 2,1 or GARCH ( ) 1, 2 models are adequate for modelling vo- latilities even over long sample periods [7].
From the derived models, using the method of maximum likelihood the estimated parameters of GARCH ( )

= + +
The standard errors are used to assess the accuracy of the estimates, the smaller the better.The model fit statistics used to assess how well the model fit the data are the AIC and BIC.The corresponding values are: AIC = 474.8and BIC = 487.3with the log likelihood function of 233.4.The standard errors are quiet small suggesting precise estimates.Based on 95% confidence level, the coefficients of the GARCH ( ) 1,1 model are significantly different from zero and the estimated values satisfy the stability condition, that is 1 α β + < .Table 6 below summarizes fit statistics for the other GARCH models which were considered.
In conclusion, it can be established that, amongst all the identified models, the GARCH ( ) 1,1 proves the best fit model.

Diagnostic Checking of the GARCH(1,1) Model
One of the assumptions of GARCH models is that, for a good model, the residuals must follow a white noise process.Figure 6 inspects the relationship between the innovations (residuals) derived from the fitted model, the corresponding conditional standard deviations and the observed returns.
It can be observed that both innovations and returns exhibit volatility clustering.However if we plot the, standardized innovations (the innovations divided by their conditional standard deviation), they appear generally stable with little clustering as seen in Figure 7.
The time plot of the residuals given in Figure 7 is used to check whether the residuals are random.The normality check is also done by analyzing the histogram of residuals and normal probability plot.Figure 8 gives Table 5. Parameter estimates for GARCH (1,1).skewness is expected since the residuals may also come from student's t distribution.The negative skewness tendency is also supported by negative large residuals in Figure 7.
Figure 9 gives the plot of the ACF of the squared standardized innovations.The plot shows no correlation left.Table 7 and Table 8 compare the results of the -test Q and the ARCH test with the results of these same tests in the pre-estimation analysis in Table 2 and Table 3 respectively.In the pre-estimation analysis, both the -test Q and the ARCH test indicated rejection ( 1 H = with p value 0 = ) of their respective null hypothesis showing significant evidence in support of GARCH effects.In the post estimation analysis using standardized innovations based on the estimated model, these same tests indicate acceptance ( 0 H = with highly significant p -values) of their respective null hypothesis and confirm the explanatory power of GARCH ( ) 1,1 .The tests showed that no any ARCH effects left (no heteroscedasticity).

Forecasting with the GARCH(1,1) Model
Table 7 shows the various measures of forecasting errors, namely the mean absolute error (MAE), the root mean squared error (RMSE), and Thiele's U test for two models seemed to be adequately suitable to fit the data.The first two forecast error statistics depend on the scale of the dependent variable.These are used as relative measure to compare forecasts for the same series across different models.The smaller the error, the better the fore-  casting ability of that model.The remaining two statistics are scale invariant.The Theil inequality coefficient always lies between zero and one, where zero indicates a perfect fit.
From Table 7, it can be seen that the accuracy test favour GARCH ( ) 1,1 model.Also the Thiele's statistics is less than one ( 0.8528 ) which indicates that, the forecasts are fairly accurate.Table 8 below shows the forecast of Inflation by GARCH(1,1) for a period of one year from January 2010 to December 2010.
The Figure 9 displays the actual inflation rate and the predicted inflation rate by the GARCH ( ) It can be observed from the Figure 9 that the forecasted inflation is closer to the actual inflation.

Discussion and Conclusion
In this paper, time series modelling was examined with a special application to modelling inflation data in Tanzania.In particular, the theory of univariate nonlinear time series analysis was explored and applied to the inflation data spanning from January 1997 to December 2010.The best fitting model was selected based on how well the model captures the stochastic variation in the data.Based on minimum Akaike Information Criteria (AIC) and Bayesian Information Criteria (BIC) values, it was observed that the best fit GARCH models were GARCH(1,1) and GARCH(1,2).However, after estimation of the parameters of selected models, a series of diagnostic and forecast accuracy test were performed and GARCH(1,1) model was found to be the best.Based on the selected model, twelve months inflation rates of Tanzania were forecasted in sample period (from January 2010 to December 2010).From the results, it is observed that the forecasted series are close to the actual data series.

P
is the current average price level of an economic basket of goods and services; 1 t P − is the average price level of the basket a year ago.
order to have the conditional variance remaining positive.Equation (8) can be expressed as

Figure 1 .Figure 2 .
Figure 1.Time plot of monthly inflation in Tanzania.

Figure 3 .
Figure 3. ACF with bounds for raw return series.

Figure 4 .
Figure 4. PACF with bounds for the raw returns series.
PACF with Bounds for Raw Return Series

Figure 5 .
Figure 5. ACF of the squared returns.

Figure 8 .
Figure 8. Histogram of residuals from GARCH (1, 1). the histogram of the residuals from the GARCH(1,1) model.The histogram shows almost a symmetric bellshaped distribution which is indicative of the residuals following a normal distribution.The slight negative

Figure 9 .
Figure 9.Time plot of inflation rate and one year forecasts by GARCH(1,1).

1, 1
model.The figure also displays how the forecasted values behave.

Table 4 .
and This is done using Ljung-Box-Pierce -test Q

Table 1 .
Summary for statistics for Tanzania's monthly inflation.

Table 6 .
Comparison of suggested GARCH models.

Table 7 .
Forecast Accuracy Test on the most likely suggested GARCH models.

Table 8 .
Inflation forecast by GARCH(1,1) model for period of January 2010 to December 2010.