Forecasting Real GDP Using ARIMA Model: The Case of The ... · ARIMA as a time series forecasting...
Transcript of Forecasting Real GDP Using ARIMA Model: The Case of The ... · ARIMA as a time series forecasting...
Sering Touray
University of The Gambia
School of Business and Public Administration
Division of Economics
Forecasting For Business and Economics
(ECON 313)
Fall Semester 2010.
Topic: Forecasting Real GDP Using
ARIMA Model: The Case of The
Gambia.
December 2010.
Table of Contents
Abstract ...................................................................................................................................................... 3
Chapter 1: Introduction .......................................................................................................................... 4
Chapter 2: Literature Review ................................................................................................................ 5
Chapter 3: Methodology ......................................................................................................................... 7
3.1: Model Specification ........................................................................................................................ 7
3.2: Model Estimation ............................................................................................................................ 8
3.3: Diagnostic Tests ............................................................................................................................. 8
3.4: Forecasting ...................................................................................................................................... 8
Chapter 4: Data Analysis and Discussion ....................................................................................... 10
4.1: Data Analysis ................................................................................................................................ 10
4.2: Findings and Discussions ........................................................................................................... 11
Chapter 5: Conclusions and Recommendations ........................................................................... 13
5.1: Conclusions ................................................................................................................................... 13
5.2: Recommendations ....................................................................................................................... 13
Chapter 6: Appendix ................................................................................................................................ 15
6.1 List of Tables .................................................................................................................................. 15
References ............................................................................................................................................ 20
Data Source .......................................................................................................................................... 21
Abstract
The ability to accurately forecast economic variables remains to be the determining
factor of the reliability of economic models. The paper attempts to forecast the Real
GDP values of The Gambia for the years 2010 and 2011 using data obtained from the
International Monetary Fund (IMF) over the period 1990 through 2009. The paper uses
the Autoregressive Integrated Moving Average (ARIMA) also called the Box Jenkins
model (BJ model) composed of a certain number of the previous values of the variable
in question, the order it is integrated to attain a state of stationarity and the number of
residuals to be included in the model; thus modeled as (p d q). After careful analysis,
the model adopts an ARIMA composed of (2 1 0). Using a one step forecast, the values
of Real GDP for The Gambia for the years 2010 and 2011 were obtained which showed
continuity in the increasing trend of real GDP. This was followed by a series of
diagnosis of the model ran and the values forecasted.
Key words: Real GDP, ARIMA, one step forecast and International Monetary Fund
Chapter 1: Introduction
The Gambia as in most countries computes her GDP annually. This function is usually
executed by the Ministry of Finance which in partnership with other stakeholders
handles the fiscal policy component of the economic policies of The Gambia. According
the statistical appendix on The Gambia published by IMF, the components of GDP
calculation are: agriculture, manufacturing and trade. (Statistical Appendix, 1997). Of
recent, that combination has changed to compose of: agriculture, manufacturing and
services. (Statistical Appendix, 2006).
GDP also as in many economies serves as the measure of economic growth and
development. In the past couple of years, the Gambia’s economic growth has been
attributed to its GDP growth. This achievement earned her not only recognition but also
other economic benefits such as debt relief, grants and aid etc.
As viewed by most economists, Real GDP provides a better measure of estimating the
output as it takes care of price differences. For this reason, the paper uses the real GDP
values of The Gambia in estimating the model.
The paper employs an ARIMA model on real GDP data obtained from IMF for a 20
years period with the object of forecasting the real GDP values for the years 2010 and
2011 using a one-step forecast. Stata 10.0 is the statistical software used to do the
analysis.
Chapter 2: Literature Review
Gross Domestic Product has attracted the views of many economists all other the world.
As a measure of development, it has attracted a lot of controversies from economists as
well as development specialists on issues relating to its ability to measure development.
Despite this seemingly unending debate between economists and development
specialists, there seems to be no other measure of development than GDP (at least not
a single one that has attained the level of fame reached by GDP). As a time series
variable, several models have been developed to enable the ease of forecasting GDP.
ARIMA being one of them has attracted a lot of fame amidst other forecasting models
which has been attributed to its forecasting accuracy. On many occasions, it is reported
that the forecasted values of certain variables by ARIMA tend to be very close to their
actual.
In the example of the ARIMA model given in his text- ‘Basic Econometrics’, Damodar N.
Gujirati showed how the forecasted value of quarterly GDP for the US was close to the
actual: a forecasted value of $4877 billions for the first quarter of 2008; the actual of
which was $4873.7 billons. (Gujirait, 2004).
The ARIMA model has also registered success in the evaluation of interest rates which
is increasing being one of the most watched financial variable. It has been used to
forecast interest rates in India. However, due the clustering effect on the interest rates,
the GARCH model outperformed the ARIMA. (Radha and Thenmozhi, undated).
A related but different study on exchange returns was also done in Nigeria. The author
used the ARIMA model to forecast stock exchange returns in Nigeria. ((Emenike, 2010))
Not only has the success stories of the ARIMA model restricted to forecasting
macroeconomic variables, but also non-economic variables as well. It has been used in
the modeling and predicting traffic characteristics in the UK. The authors of the paper
used a combination of ARIMA and GARCH models to predict the nature of traffic for use
by congestion control. The estimated model was compared to the an FARIMA model
and was found to be better. (Zhou & Sun, undated).
A paper on the production potentials of Pakistan in the area of wheat has also been
examined using ARIMA. In the paper, the authors using the past trend of wheat
production estimated the production of wheat over the period 2002-2022. (Igbal et al,
2005).
Despite its fame and success, the ease of estimating the parameters in the ARIMA
model is regarded by some as problematic. (Igbal et al, 2005). To other authors, the
Autocorrelation Function (ACF) and the Partial Autocorrelation Function (PACF) and the
Akiake Information Criterion provide good estimation of the parameters of the ARIMA
model. (Emenike, 2010)
The forecasting of GDP continues to receive a lot of attention from econometricians.
Several other models have also been used in forecasting GDP in different parts of the
world. The pseudo-real time forecasting model was used in forecasting short term
values of GDP using large monthly data sets. (Barhoumi, Benk, et al, April 2008).
A similar paper was also written to forecast the monthly values of French GDP using a
revised version of the Opium model. (Barhoumi, Brunhes-Lesage et al, September
2008).
Chapter 3: Methodology
3.1: Model Specification
An advantage of the use of the ARIMA model is the provision of a clear cut algorithm to
be followed through the entire process of model estimation and result generation. The
steps being:
◦ Model Identification, choosing p, d and q
◦ Estimation of parameters of the chosen model
◦ Diagnostic checking
◦ Forecasting (Gujirati, 2004)
However, before employing the ARIMA model, a pre-estimation test on the data was
done. Given the fact that, real GDP is a time series data, a stationarity test had to be
done. The Augmented Dickey Fuller (ADF)- which takes care of autocorrelation
problem, was done on the data to ascertain its stationarity level. It showed that the data
was only stationary after its first difference and thus was an I(1).
ARIMA as a time series forecasting techniques is composed of three components. An
Autoregressive (AR) process-p, an Integrated (I) process-d and a Moving Average (MA)
process-q. On the basis of this, the chosen model for the paper was:
Δdyt =δ+θ1 Δdyt-1+θ2 Δ
dyt-2+----- + θpyt-p+et-lα et-1-α2 et-2 αqe t-2
Where yt represents Real GDP,
θ= coefficients of the AR processes up to p lags,
Α= coefficients of the MA processes up to q lags
Δdyt= the difference of Real GDP d times
3.2: Model Estimation
The identification of the ARIMA parameters of the ARIMA model followed suit. As in
most publications, the Autocorrelation Function (ACF) and Partial Autocorrelation
Function were used to estimate the values of p and q. Since the data was integrated at
order 1, the d in the ARIMA model was estimated to be 1. After due analysis of the
statistical significance of the results obtained from the ACF and PACF, it was concluded
that the Real GDP of The Gambia for the period 1990-2009 obtained from IMF was not
explained by a MA process. On the other hand, it was found that the real GDP values
followed an AR process; i.e real GDP was explained by some of its previous values.
Therefore, the following model was estimated:
Δyt =δ+θ1 Δyt-1+θ2 Δyt-2
The real GDP values obtained which were expressed in millions of Dalasis, were left in
their functional forms (linear) and thus the estimated model did not change.
3.3: Diagnostic Tests
The estimation of the model was followed by a series of diagnostic tests to ascertain
that the estimated model is the better model in forecasting the real GDP values of The
Gambia. The residuals obtained were tested for autocorrelation using the Durbin
Watson (DW) tests, the Augmented Dickey Fuller test and a graphical representation of
the residuals was done to ascertain if they are white noise. In addition to this, several
other combinations of p, d and q were tested but all proved that the chosen model was
the better one.
3.4: Forecasting
The one-step forecasting technique was used to obtain the forecasted values of real
GDP. The one step forecasting technique performs an out of sample forecast for an
additional period (Parlow, 2010). Its also generates forecasted values of all except one
preceding periods. Graphically representing the forecasted values against their actual
values, the goodness of fit of the chosen model could be ascertained.
The forecasted values were also tested for accuracy purposes. This was done using the
Root Mean Square Error (RMSE) which calculates the error between the forecasted
values and their corresponding actuals (Parlow, 2010).
Chapter 4: Data Analysis and Discussion
4.1: Data Analysis
The real GDP values obtained for The Gambia from the International Monetary Fund’s
website over the period 1990 through 2009 showed an increasing trend with structural
breaks at some time. This renders it unfit for time series analysis at its state. The first
difference however, showed a state of stationarity. Refer to Appendix, Tables 1 and 2.
The application of the ARIMA model on the obtained data started with the estimation of
the values of p, d and q using the ACF and PACF (graphically and with a correlogram)
(See Appendix, tables 5, 6, and 7) resulted in the model ARIMA (2 1 0). This conclusion
was reached after the examination of statistical significance of the results such as their
p- values. At a significance level of 5 per cent, it was proved that MA process was not
significant even up to lag 6 leading to the conclusion that the GDP figures were not
explained by the preceding values of their residuals (Refer to Appendix, Table 8), but
were explained by its two previous values (See Appendix, Table 9). Since it was
difference at order 1 to be stationary, the integrated process was one. For the results of
the ARIMA (2 1 0) please refer to the Appendix, Table 10.
Economically, it appears to be significant that real GDP is explained by its two previous
values. Considering the size of The Gambian economy and the nature of its sectors;
service being the biggest contributor to GDP (The Ministry of Finance, 2009), it follows
sense to argue that the values of GDP are affected by its close lags. In addition to this,
the output of the service industry the largest of which comes from the banking sector is
pretty much short term. Its does not take three, four to five years to obtain the output of
such an industry; after all, most of the transactions are monetary in nature.
Agriculture on the other hand employs about 60% of The Gambia’s labour force and
contributes about 20% to GDP. If the arguments of the perfectly competitive markets
given its assumptions are anything to go by, supply is fixed in the short run and thus,
farmers cannot alter their productions within a farming season thus minimizing the effect
of agricultural production in the long run. Even if they do alter their productions in the
succeeding season, the agricultural paradox argues that anticipated effect on income
might not be attained.
Basically, given the size of The Gambian economy and its lack of industries, it holds
water to argue that indeed the finding that GDP is explained by its previous values up to
lag two is justifiable. This will probably be greater if the size of the economy was bigger
and more presence of industries.
In addition to the afore-mentioned propositions, the results of the diagnostics showed
that indeed the estimated model somehow fitted the data. The residuals obtained which
were tested using the ADF showed that they were white noise and no autocorrelation
problem was detected from the Durbin Watson test. Refer to Appendix, Tables 11, 12
and 13.
4.2: Findings and Discussions
Ceteris Paribus, the one-step forecast used to forecast the values of real GDP for the
years 2010 and 2011 revealed that real GDP will continue to increase in both years.
The model predicts a 2.2% increment in real GDP for the year 2010- D21.89 (in
billions), which is a drop from 5.6% in the previous year- D21.42 (in billions). For the
year 2011, the model predicts a further increase in real GDP to D22.38 (in billions) but
with a constant growth rate of 2.2%. See Appendix, Table 14 for a graphical
representation of the results.
The drop in the growth rate of real GDP could be attributed to the now settling down
effects of the financial crisis on remittances and ultimately income of most Gambians. In
addition to this, the 2010 rainy season floods which was declared a state of emergency
due to the devastating nature of the floods on compounds, farms, livestock etc. might
lead to a drop in the values of GDP.
Deviations from the forecasted value should be surprising. Some economic variables (or
at least variables whose economic effects can be calculated) have witnessed some
changes. The introduction of the new tourism logo and efforts made to market the
potentials of The Gambia, the establishment of The Gambia Import- Export Promotion
Agency (GIEPA) which is the reformed version of The Gambia Investment Promotion
Free Zone Agency (GIPFZA), the improvement in the revenue collection abilities of the
Gambia Revenue Authority (GRA), the Gambia Radio and Television Service’s satellite,
the imposition of airport tax etc. could lead to a drama of offsetting of effects. Despite
the fact that some of the afore-mentioned variables have witnessed changes a year or
two ago, their effects might start to show (if not already) and ultimately affect GDP.
On another front, the drive to maintaining the single digit inflation by the Central Bank
and government’s massive construction projects might also contribute affecting GDP.
The estimated model used in this paper, did not cover the scope of the relationship
between inflation and GDP in context of The Gambia.
The Root Mean Square Error (RMSE) which was computed to ascertain the accuracy of
the model reported a value of 0 .46395528 which considering the nature of the data and
the sample size obtained can be contained.
Chapter 5: Conclusions and Recommendations
5.1: Conclusions
The findings of the paper justified by the predictions of the estimated model and the
prevailing economic climate of The Gambia means well for the economy. The
forecasted fall in the growth rate of GDP is an expectation given the financial crisis and
its effects of all economies of all regions of the world. As a matter of fact, the IMF
forecast of real GDP for 2010 differs from the forecasted value from this model by
D0.599 (in billions) which could be attributed to a difference in the forecasting
technique.
It is also worth noting that ARIMA is an atheoretic model and thus predictions might not
follow economic expectations. It is for this reason, that I cited some of the possibilities of
deviations in the preceding chapter.
ARIMA has registered success stories in the studies it has been used. Thus
expectations of not much deviation from its usual trend seem to be statistically
significant.
5.2: Recommendations
Having looked at the findings of the paper, the following recommendations have been
reached.
1. The prediction of a slight increment in GDP could be taken as a good omen for
the economy. However, it would be important if a study on the distribution of the
GDP could be studied. This would unveil non-performing sectors to provide an
opportunity of improving them in a bid to avoiding the occurrence of an 80-20
rule. This is particularly necessary for the Finance Ministry. Having had over the
bulletins of their quest to fight poverty in the coming year, it would be important to
figure out through a study the sectors that need to be adjusted to alleviate
poverty. Without an idea of the components of the economy and their relationship
to the welfare of the people, such innovations as poverty alleviations could be
futile.
2. There is need for the Minister of Finance to control issues such as unplanned
expenditures in the economy. This could lead not only to deviations in the
forecasted values of real GDP but anticipated outcome and policy effects.
Unplanned expenditures must be based on genuine economic reasons and not
just a mere desire to spend.
3. There is the need to centralize data especially on key macroeconomic variables.
One of the limitations of the study has been the unavailability of data from
Gambian sources. Many a times, data obtained from different sources tend to
differ. In some cases, one can only trust the source of the data and not the data.
This leads to disparities in forecast values and ultimately a threat to policy
making. Using international organizations as reservoirs for data on The Gambia
is not only unsecure but also unreliable. For the purpose of reliable forecasts for
efficient policy making, needed data most be provided accurately and readily
available. The absence of this however, has proved to be a deterring factor to
most studies in The Gambia. The government of The Gambia through her
agencies most make efforts to ensure that data unavailability at local levels get to
be a thing of the past.
4. There is the need to conduct a further study using a non- atheoretic model with a
larger sample size to obtain more beneficial forecast values of real GDP. The
literature obtained on ARIMA showed explicitly showed that in most of the
studies done using ARIMA a large sample size has always been obtained.
Chapter 6: Appendix
6.1 List of Tables
Analysis of Real GDP
Table 1: Real GDP at its original level
10
15
20
25
rgdp
1990 1995 2000 2005 2010year
Table 2: First difference of Real GDP
1990
1995
2000
2005
2010
year
-.5 0 .5 1 1.5drgdp
Table 3: Augmented Dickey Fuller Test for stationarity
Test Statistic 1% Critical value
5% Critical value
10% Critical value
Z(t) 1.529 3.750 3.000 2.630
MacKinnon approximate p-value for Z(t) = 0.9976
Table 4: Augmented Dickey Fuller Test for stationarity on first difference
Test Statistic 1% Critical value
5% Critical value
10% Critical value
Z(t) -3.133 -3.750 -3.000 -2.630
MacKinnon approximate p-value for Z(t) = 0.0242
Table 5: Correlogram of ACF and PACF
8 -0.0641 0.3517 42.463 0.0000 7 0.0321 0.5402 42.312 0.0000 6 0.1496 0.1044 42.277 0.0000 5 0.2960 0.2192 41.574 0.0000 4 0.4126 0.1060 39.003 0.0000 3 0.5322 0.4410 34.323 0.0000 2 0.6708 0.1682 26.993 0.0000 1 0.8311 1.0565 15.995 0.0001 LAG AC PAC Q Prob>Q [Autocorrelation] [Partial Autocor] -1 0 1 -1 0 1
Table 6: Autocorrelation Function (ACF)
-0.5
00.0
00.5
0
Auto
corr
ela
tions o
f drg
dp
0 2 4 6 8Lag
Bartlett's formula for MA(q) 95% confidence bands
Table 7: Partial Autocorrelation Function (PACF) -0
.40
-0.2
00.0
00.2
00.4
0
Part
ial auto
corr
ela
tions o
f drg
dp
0 2 4 6 8Lag
95% Confidence bands [se = 1/sqrt(n)]
Table 8: AR processes at lag 6
Log likelihood = -11.62963
Drgdp Coef. OPG Std. Err.
Z P>|z| [95% Conf. Interval]
drgdp _cons
.610351 .0987149 6.18 0.000 .4168734 .8038287
ARMA
Ar
L1. .0222502 .2466456 0.09 0.928 -.4611664 .5056668
L2. -.2380724 .3692183 -0.64 0.519 -.961727 .4855822
L3. .1548211 .4569445 0.34 0.735 -.7407736 1.050416
L4. -.0806445 .5336262 -0.15 0.880 -1.126533 .9652436
L5. -.0806445 .4382332 0.05 0.962 -.8377855 .880057
L6. -.3099892 .5754493 -0.54 0.590 -1.437849 .8178707
/sigma .4374344 .0813722 5.38 0.000 .2779478 .5969211
Table 9: MA processes at lag 6
Log likelihood = -10.70634
Drgdp Coef. OPG Std. Err. z P>z [95% Conf.
drgdp
_cons 0.615313 0.103954 5.92 0 0.411567 0.819058
ARMA ma L1. -0.17597 . . . . .
L2. -0.3514 . . . .
L3. 0.361696 6101.016 0 1 -11957.4 11958.13
L4. 0.023669 130.6556 0 1 -256.057 256.1039
L5. -0.18572 1026.623 0 1 -2012.33 2011.959
L6. -0.67227 3716.236 0 1 -7284.36 7283.016
/sigma 0.362261 1001.361 0 1 -1962.268 1962.993
Table 10: ARIMA (2 1 0)
Drgdp Coef. OPG Std. Err. z P>z [95% Conf.
drgdp
_cons _cons .6052706 0.116684 5.19 0.000 .3765742 0.833967
ARMA Ar
L1. -.008395 0.269368 -0.03 0.975 -.5363465 0.519557
L2. - .2232385 0.356829 -0.63 0.532 .922611 0.476134
/sigma .4634502 .0930337 04.98 0.000 .2811074 .6457929
Table 11: Diagnostic Tests: Augmented Dickey Fuller Test on the residuals
Test Statistic 1% Critical value
5% Critical value
10% Critical value
Z(t) -4.297 -3.750 -3.000 -2.630
MacKinnon approximate p-value for Z(t) = 0.0004
Table 12: Durbin Watson test for autocorrelation
Durbin-Watson d-statistic( 3, 18) = 1.846441
Table 13: White Noise Test: Plot of the residuals
.5.6
.7.8
.9
xb p
redic
tion,
one-s
tep
1990 1995 2000 2005 2010year
Table 14: Graph of forecasted value against their actuals
10
15
20
25
1990 1995 2000 2005 2010year
rgdp y prediction, one-step
References
1. Barhoumi, K., et al, (2008), ‘Short-term forecasting of GDP using large monthly
datasets a pseudo real-time forecast evaluation exercise’ European Central
Bank. Available at http://ssrn.com/abstract=1084910
2. Barhoumi, K., Brunhes-Lesage, V., et al, (2008) ‘Monthly Forecasting Of French
Gdp: A Revised Version Of The Optim Model’, Banque De France, Available at:
http://ssrn.com/abstract=1678444
3. Emenike K. O., (2010), ‘Forecasting Nigerian Stock Exchange Returns: Evidence
from Autoregressive Integrated Moving Average (ARIMA) Model’, University of
Nigeria, Nigeria.
4. Gujirati, D. N., (2004), ‘Basic Econometrics’ (fourth edition), McGraw Hill
Companies.
5. Igbal, N., et al. (2005), ‘Use of the ARIMA Model for Forecasting Wheat Area and
Production in Pakistan’, Journal of Agriculture and Social Sciences, vol. 1813–
2235/2005/01–2–120–122.
6. International Monetary Fund (1997), ‘The Gambia- Statistical Annex’,
Washington DC.
7. International Monetary Fund (2006), ‘The Gambia- Statistical Appendix’,
Washington DC.
8. Parlow A, (2010), ‘Unit Root Tests and Box Jenkins’, University of Wisconsin
Madison, USA.
9. Pesaran, M. H., et al (2004), ‘Forecasting Time Series Subject to Multiple
Structural Breaks’, Institute for the Study of Labour (IZA), Germany.
10. Radha S., and Thenmozhi M., (undated): ‘Forecasting short term interest rates
using ARMA, ARMA-GARCH and ARMA-EGARCH models’, Indian Institute of
Technology Madras, Chennai.
11. The Ministry of Finance of The Gambia (2009), ‘Budget Speech’, Banjul.
12. Zhou, B., et al, (undated), ‘Traffic Modeling and Prediction using ARIMA/GARCH
Model’, University of Surrey, United Kingdom.
Data Source
1. International Monetary Fund, World Economic Outlook Database, October 2010.
Available at: www.imf.org.