0% found this document useful (0 votes)
86 views5 pages

15 1 21 Popoola

This document discusses using time series analysis to model and forecast inflation rates in Nigeria. It first provides background on inflation, defining it and discussing factors that influence inflation in Nigeria such as war, government spending, and borrowing. It then outlines the steps to develop a Box-Jenkins time series model, including checking for stationarity, detecting seasonality, differencing to achieve stationarity, and including seasonal terms. The study aims to model Nigeria's inflation rate using these Box-Jenkins methodology steps, test the adequacy of the fitted model, and forecast future inflation rates.

Uploaded by

Iliana Vargas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views5 pages

15 1 21 Popoola

This document discusses using time series analysis to model and forecast inflation rates in Nigeria. It first provides background on inflation, defining it and discussing factors that influence inflation in Nigeria such as war, government spending, and borrowing. It then outlines the steps to develop a Box-Jenkins time series model, including checking for stationarity, detecting seasonality, differencing to achieve stationarity, and including seasonal terms. The study aims to model Nigeria's inflation rate using these Box-Jenkins methodology steps, test the adequacy of the fitted model, and forecast future inflation rates.

Uploaded by

Iliana Vargas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Anale. Seria Informatică. Vol. XV fasc.

1 – 2017
Annals. Computer Science Series. 15th Tome 1st Fasc. – 2017

TIME SERIES ANALYSIS


TO MODEL AND FORECAST INFLATION RATE IN NIGERIA
1
Osuolale Peter Popoola, 2 Ayanniyi W. Ayanrinde, 1 Adesina A.Rafiu, 1 Matthew T.Odusina
1
Mathematics and Statistics Department, the Ibarapa Polytechnic, Eruwa, Oyo State, Nigeria
2
Mechanical Engineering Department the Ibarapa Polytechnic, Eruwa, Oyo State, Nigeria

Corresponding Author: Osuolale Peter Popoola, [email protected]

ABSTRACT: The stability of economy of any nation is at so on even though they employ stringent measures
risk if inflation is not properly checked through constant to curb it and its effect, it still goes on to affect them
analysis and study, hence this research work attempts to adversely. This is a more reason why constant
model inflation rate in Nigeria, test for the adequacy of forecasting has to be done so that policy makers can
the fitted model, forecast future inflation rate. Descriptive
know what end they should work towards when it
statistics, Box-Jenkins Methodology, Augmented Dickey
Fuller Unit Root test was employed, the model of the comes to inflation as it has proven to defy measures
inflation rate was determined using the correlogram. The given its dynamic nature.
order of the models and parameter of the models were Inflation refers to a broad increase in prices across
confirmed from the information criterion computation. It many goods and services in an economy over a
was discovered to be normal from the Box-Pierce test sustained period of time. Conversely, inflation can also
statistic with value of 0.754. The inflation rate had an all- be thought of as the erosion in value of an economy's
time high value of 28.20 and an all-time low value of 3.00 currency. Inflation is the rate at which the general level
with a mean of 10.92. The series was found to be of prices for goods and services is rising and
stationary from the Augmented Dickey Fuller Unit Root subsequently, purchasing power is falling. Kimberly
test. However, correlogram, autoregressive Moving
Amadeo, a US Economy Expert defined inflation as “a
average was also detected. ARIMA (0,1,1), ARIMA
(1,1,1) and ARIMA (1,1,0) was compared. The best devastating condition when prices just keep going up,
model was picked using the AIC, BIC and AICC. eating away at your standard of living”.
Therefore, the best model is ARIMA (0,1,1). Also, the Inflation is define as a persistent increase in the level of
inflation rate forecasted for a period of 36 months shows a consumer prices or a persistent decline in the
parallel movement. purchasing power of money caused by an increase in
KEYWORDS: Box-Jenkins Methodology, Augmented available currency and credit beyond the proportion of
Dickey Fuller Unit Root test, Autoregressive Moving available goods and services of a particular country.
average, inflation, correlogram.
1.1 Inflation in Nigeria
1. INTRODUCTION
Just as inflation is a menace in different economy, it
Various factors affect the stability of an economy; is not different in Nigeria as it has significant impact
these factors can either be small (microeconomic as far back as the Civil war period (1967-1970).As
factors) or large (macroeconomic factors). Every with every other economies battling frantically
player (e.g. the common man, policy makers, against inflation, Nigeria’s inflation pattern is
government and its agencies etc.) has an important affected by different factors. One of which is war.
role to play. It is worthy of note that the direct and War is a favorable condition for inflation to grow,
ripple effect of the macroeconomic factors or typical examples of pre-war and post-war prices
variables are very pivotal in the stability of an show that war and disasters cause serious inflation.
economy as they deal with aggregate and not just In 1965 (Pre-war) 500 cups of rice sold for N14,
unit unlike the microeconomic. Among the however in 1971 (Post-war) same 500 cups of rice
macroeconomic variables that ensure economic sold for N43. This shows the effect of war on the
stability, (e.g. exchange rate, interest rate, GDP etc.) economy as the government pumps in a lot of money
inflation is one that poses a very big threat to into circulation as they spend however the money is
economies all around the world, as a matter of fact, not pumped towards production or investment that
it is no respecter of any economy-developed, will balance the amount of money in circulation. The
developing or under developed. It is seen to affect inflation rate in Nigeria experienced some sinusoidal
developing economies like Brazil, Venezuela, India, movement as there were drops in the inflation rate at
Pakistan, Germany, Israel, Bolivia, Zimbabwe and
174
Anale. Seria Informatică. Vol. XV fasc. 1 – 2017
Annals. Computer Science Series. 15th Tome 1st Fasc. – 2017

various points. Government spending (such as pre- The first step in developing a Box–Jenkins model is
election spending, white elephant projects e.g. Udoji to determine if the time series is stationary and if
awards, Abebo salary awards, Structural adjustment there is any significant seasonality that needs to be
program) affects the rate of inflation in Nigeria, as modelled.
the government is seen to enter deficit spending at Detecting stationarity
some points and also fraternize with a pal of Stationarity can be assessed from a run sequence
inflation “borrowing”. These things and more saw plot. The run sequence plot should show constant
Nigeria inflation rate rise. Therefore, this research location and scale. It can also be detected from an
attempts to model inflation rate, test for the autocorrelation plot. Specifically, non-stationarity is
adequacy of the fitted model and forecast future often indicated by an autocorrelation plot with very
inflation rate with the best model. slow decay.
Detecting seasonality
1.2 Measure of Inflation Seasonality (or periodicity) can usually be assessed
from an autocorrelation plot, a seasonal subseries
Inflation is usually measured using price index and plot, or a spectral plot.
consumer price index. Inflation rate is the Differencing to achieve stationarity
annualized percentage change in a general price Box and Jenkins recommend the differencing
index (normally the consumer price index) over approach to achieve stationarity. However, fitting a
time. curve and subtracting the fitted values from the
Price Index original data can also be used in the context of Box–
A price index is a normalized average (typically a Jenkins models.
weighted average) of price relatives for a given class Seasonal differencing
of goods or services in a given region, during a At the model identification stage, the goal is to
given interval of time. It is used to help to compare detect seasonality, if it exists, and to identify the
how these price relatives, taken as a whole, differ order for the seasonal autoregressive and seasonal
between time periods or geographical locations. moving average terms. For many series, the period is
Consumer Price Index known and a single seasonality term is sufficient.
The consumer price index (CPI) is a measure of the For example, for monthly data one would typically
overall cost of the goods and services bought by a include either a seasonal AR 12 term or a seasonal
typical consumer. The goal of the consumer price MA 12 term. For Box–Jenkins models, one does not
index is to measure changes in the cost of living. explicitly remove seasonality before fitting the
This it does by taking into cognizance when model. Instead, one includes the order of the
calculating, various goods a typical consumer will seasonal terms in the model specification to the
purchase and their prices and calculation is done ARIMA estimation software. However, it may be
with respect to a certain year called the base year. helpful to apply a seasonal difference to the data and
regenerate the autocorrelation and partial
2.0 MATERIALS AND METHODS autocorrelation plots. This may help in the model
identification of the non-seasonal component of the
Time Series as a Stochastic Process model. In some cases, the seasonal differencing may
A stochastic process is a family of time indexed remove most or all of the seasonality effect.
random variables, X(ω, t); where ω belongs to a Identify p and q
simple space and t belongs to an indexed set for a Once stationarity and seasonality have been
fixed t, X(ω, t) is a random variable. Thus, a time addressed, the next step is to identify the order (i.e.
series is a realization or sample function from a the p and q) of the autoregressive and moving
stochastic process. With proper understanding that a average terms. Different authors have different
stochastic process, X(ω, t) is a set of time-indexed approaches for identifying p and q. Brockwell and
random variables defined on a sample space. We Davis (1991) [3] state "our prime criterion for model
simply write X(ω, t) as X(t) or X t. selection among ARMA(p,q) models will be the
AICc", i.e.the Akaike information criterion with
2.1 Box-Jenkins Methodology correction. Other authors use the autocorrelation plot
and the partial autocorrelation plot,
In time series analysis, the Box–Jenkins method,[1] Autocorrelation and partial autocorrelation plots
named after the statisticians George Box and The sample autocorrelation plot and the sample
Gwilym Jenkins, applies autoregressive moving partial autocorrelation plot are compared to the
average (ARMA) or autoregressive integrated theoretical behavior of these plots when the order is
moving average (ARIMA) models to find the best fit known. Specifically, for an AR(1) process, the
of a time-series model to past values of a time series. sample autocorrelation function should have an

175
Anale. Seria Informatică. Vol. XV fasc. 1 – 2017
Annals. Computer Science Series. 15th Tome 1st Fasc. – 2017

exponentially decreasing appearance. However, nonlinear least squares and maximum likelihood
higher-order AR processes are often a mixture of estimation. Maximum likelihood estimation is
exponentially decreasing and damped sinusoidal generally the preferred technique. The likelihood
components. equations for the full Box–Jenkins model are
For higher-order autoregressive processes, the complicated and are not included here. See ([BD91])
sample autocorrelation needs to be supplemented for the mathematical details.
with a partial autocorrelation plot. The partial Box–Jenkins model diagnostics
autocorrelation of an AR(p) process becomes zero at Model diagnostics for Box–Jenkins models is
lag p + 1 and greater, so we examine the sample similar to model validation for non-linear least
partial autocorrelation function to see if there is squares fitting. That is, the error term At is assumed
evidence of a departure from zero. This is usually to follow the assumptions for a stationary univariate
determined by placing a 95% confidence interval on process. The residuals should be white noise (or
the sample partial autocorrelation plot (most independent when their distributions are normal)
software programs that generate sample drawings from a fixed distribution with a constant
autocorrelation plots also plot this confidence mean and variance. If the Box–Jenkins model is a
interval). If the software program does not generate good model for the data, the residuals should satisfy
the confidence band, it is approximately ± 2 / √N these assumptions.
with N denoting the sample size. If these assumptions are not satisfied, one needs to
The autocorrelation function of a MA(q) process fit a more appropriate model. That is, go back to the
becomes zero at lag q + 1 and greater, so we model identification step and try to develop a better
examine the sample autocorrelation function to see model. Hopefully the analysis of the residuals can
where it essentially becomes zero. We do this by provide some clues as to a more appropriate
placing the 95% confidence interval for the sample model.One way to assess if the residuals from the
autocorrelation function on the sample Box–Jenkins model follow the assumptions is to
autocorrelation plot. Most software that can generate generate statistical graphics (including an
the autocorrelation plot can also generate this autocorrelation plot) of the residuals.
confidence interval. The sample partial
autocorrelation function is generally not helpful for 3.0 INTERMEDIATE SECTION
identifying the order of the moving average process.
Hyndman & Athanasopoulos [4] suggest the The data used is a secondary data extracted from the
following: monthly bulletin of the central bank of Nigeria
The data may follow an ARIMA(p,d,0) model if the www.cenbank.com and SAS (A Statistical package
ACF and PACF plots of the differenced data show was employed in the data analysis and charting).
the following patterns: the ACF is exponentially
decaying or sinusoidal, there is a significant spike at
lag p in PACF, but none beyond lag p.
The data may follow an ARIMA(0,d,q) model if the
ACF and PACF plots of the differenced data show
the following patterns. the PACF is exponentially
decaying or sinusoidal there is a significant spike at
lag q in ACF, but none beyond lag q.
In practice, the sample autocorrelation and partial
autocorrelation functions are random variables and
do not give the same picture as the theoretical
functions. This makes the model identification more
difficult. In particular, mixed models can be
particularly difficult to identify. Although
experience is helpful, developing good models using Figure 1: Time Plot of the Data
these sample plots can involve much trial and error.
Box–Jenkins model estimation The Nigerian inflation rate in figure above does not
Estimating the parameters for Box–Jenkins models exhibit seasonal variation. From the above time plot,
involves numerically approximating the solutions of there is an irregular movement in Nigerian inflation
nonlinear equations. For this reason, it is common to rate from January 2006 to December 2015.Since the
use statistical software designed to handle to the p-value is greater than the significant level at 0.05
approach – fortunately, virtually all modern We therefore do not reject our H0. We then conclude
statistical packages feature this capability. The main that the inflation rate in Nigeria data is not
approaches to fitting Box–Jenkins models are stationary.

176
Anale. Seria Informatică. Vol. XV fasc. 1 – 2017
Annals. Computer Science Series. 15th Tome 1st Fasc. – 2017

8 Series: diff1

0.3
6

0.2
4

0.1
Partial ACF
2
diff1

0.0
0

-0.1
-2

-0.2
-4
-6

2006 2008 2010 2012 2014 12 24

Time Lag

Figure 2: The Time Plot of the Differenced Data Figure 4: Partial Autocorrelation Function of the
Differenced Data
Using Augmented Dickey-Fuller test, the following Normal Q-Q Plot

test statistics obtained from table:


Dickey-Fuller = -5.4196, Lag order = 4, p-value =

6
0.01.

4
Conclusion: Since the p-value is lesser than the
Sample Quantiles

2
significant level at 0.05 we therefore reject our H0
and accept our H1 We then conclude that Nigerian 0
inflation rate data is stationary.
-2

The figure 3 shows the autocorrelation function of


-4

the first differencing of the Nigerian inflation rate at


various lags. Comparing the autocorrelations with -2 -1 0 1 2

their error limits, the significant autocorrelations are Theoretical Quantiles

at lag 1, 11, 12. Applying the principle of parsimony Figure 5: Diagnostic Test of ARIMA(1,1,1) of
MA (1) is selected since the ACF cuts off at lag 1. Nigerian Monthly Inflation Rate
The following significant models are suggested from Normal Q-Q Plot

the ACF and the PACF of the differenced data;


ARIMA (1,1,1),ARIMA (0,1,1) and ARIMA (1,1,0)
6

The Figure 5 is the qq-plot which indicates that most


4

of the residuals are located on the straight line


Sample Quantiles

except some few residuals deviating from normality


as that of ARIMA(1,1,1), so the assumption of
0

normally distributed residual looks okay.


-2

The figure 6 is the qq-plot which indicates that most


-4

of the residuals are located on the straight line


except some few residuals deviating from normality -2 -1 0 1 2

as that of ARIMA(1,1,0), so the assumption of Theoretical Quantiles

normally distributed residual looks okay. Figure 6: Diagnostic Test of ARIMA(1,1,0) of Nigerian
Monthly Inflation Rate
Series: diff1
Normal Q-Q Plot
0.3

6
0.2

4
0.1

Sample Quantiles

2
ACF

0.0

0
-0.1

-2
-0.2

-4

12 24 -2 -1 0 1 2

Lag Theoretical Quantiles

Figure 3: Autocorrelation Function of the Differenced Figure 7: Diagnostic Test of ARIMA (0,1,1) of
Data of Nigerian Monthly Inflation Rate Nigerian Monthly Inflation Rate
177
Anale. Seria Informatică. Vol. XV fasc. 1 – 2017
Annals. Computer Science Series. 15th Tome 1st Fasc. – 2017

The figure 7 is the qq-plot which indicates that most Forecasts from ARIMA(0,1,1)
of the residuals are located on the straight line

30
except some few residuals deviating from normality
as that of ARIMA(0,1,1), so the assumption of

20
normally distributed residual looks normal.

10
Table 1. Diagnostics Checking for Nigerian Monthly
Inflation Rate

0
AIC BIC AICC

-10
ARIMA(1,1,1) 446.79 455.13 447.00
ARIMA(1,1,0) 445.59 451.15 445.70
2006 2008 2010 2012 2014 2016 2018
ARIMA(0,1,1) 445.31 450.87 445.42
Figure 8: Graph of Nigerian Inflation Rate and its
Selecting the Best Model for Forecasting Inflation Forecast and Confidence Interval
Rate in Nigeria
When considering the diagnostics criterion, 4.0 RESULTS AND DISCUSSION
ARIMA(0,1,1) selects itself as the best model using
AIC (Alkaike Information Criteria), AICC (Corrected The graph of Nigerian inflation rate was plotted
Alkaike Information Criteria) and BIC (Bayesian against time (the time plot), the graph shows a sharp
Information Criteria). All the parameters in the model increase in the inflation rate around 2006 and also
ARIMA(0,1,1) are significant at 5% level of discovered that there is no seasonal fluctuation in the
significance, then we can say that ARIMA(0,1,1) is the Nigerian inflation rate data which means that there is
best model in forecasting Nigerian inflation rate. no seasonal variation in the inflation rate but rather
Fitting the Model for Nigerian Inflation Rate than irregular variation which may occur as a result
ARIMA(0,1,1) model is the best model for of unusual weather or some political events.
forecasting Nigerian inflation rate. This is a non- From analysis carried out, the time plot does not
seasonal autoregressive integrated moving average exhibit trend. So therefore conclusion was made that
with one level of differencing with one AR term and there is an irregular movement in Nigerian inflation
one MA term. The model in terms of the differenced rate over time period. ARIMA models were
series Yt is given as: subsequently developed for the inflation over the
• Yt =c + ϕ1x(t-1) + …+ Ɛt + Ө1Ɛ(t-1) period of 2006 to 2016, after identifying various
• Where Yt is the differenced series, models. ARIMA(0,1,1) seems to be suitable model
• C and ϕ1 are the constants with parameter 1 for forecasting Nigerian inflation rate.
The model developed was also used in forecasting
present in the AR(autoregressive) and Ɛt, Ө1
for three years starting from 2016 to 2018 with both
and Ө2 are the constants with parameter 1,2 points forecast, 95% confidence interval forecast and
present in the MA(moving average) in the also 80% confidence interval forecast for a better
ARIMA model. forecast values. The time plot of the forecasted
Testing the Adequacy of the Selected Model values depicts a parallel movement with time.
ARIMA(0,1,1)
Box-pierce test REFERENCES
Q(m)=n(n+2)∑mj=1r2j/n-j
X-squared = 0.0982, df = 1, p-value = 0.754Reject [BJ70] Box G., Jenkins G. - Time Series
H0 if p-value is less than the significant level Analysis: Forecasting and Control. San
otherwise we fail to reject H0 Francisco: Holden-Day, 1970.
since the p-value is greater than the significant level,
we therefore do not reject our H0 and conclude that [CK07] Commandeur J. J. F.; Koopman S. J.
the fitted model ARIMA(0,1,1) is independently - Introduction to State Space Time
distributed. Series Analysis. Oxford University
The Figure 8 diagram depicts the graphical Press, 2007.
representation of Nigerian inflation rate data in black [BD91] Brockwell P. J.; Davis R. A. - Time
line and its 3 years forecast (Starts=Jan 2016, Series: Theory and Methods. Springer-
Ends=Dec 2018) with its point forecast and 80% Verlag. p. 273, 1991.
confidence interval in deep ash and its 95%
confidence interval in light ash. [HA15] Hyndman R. J; Athanasopoulos G. -
Forecasting: principles and practice.
Retrieved 18 May 2015.
178

You might also like