Sie sind auf Seite 1von 12

Time Series Analysis Project

xxxxxx xxxxxxxxx

TIME SERIES ANALYSIS PROJECT SPRING 2011

Prepared by Xxxxxx xxxxxxxxxxx

Time Series Analysis Project

xxxxxx xxxxxxxxx

MONTHLY DIESEL OIL USAGE IN THAILAND

Introduction Diesel oil is the main energy resource of the transportation and logistic system in Thailand because most of the cargo and goods are transported by using the truck instead of train which is the most effective transportation system. Moreover, oil prices have increased rapidly and seem to be keeping in the high prices due to more consumption and decreasing in oil reserve. From these reasons, its very important to find the forecasting model to predict the usage of diesel oil and also plan to decrease the diesel oil usage in Thailand. The purpose of this time series project is to analyze the monthly diesel oil usage in Thailand from 1999 to 2010 and fit the series with ARIMA model. Its expected that the monthly diesel oil usage is highly correlated with the diesel usage in the preceding months and seasonal pattern is expected to be found in the data. The project is divided into several parts. First of all, the data will be examined with time series plot and correlogram in order to identify if there is any trend and seasonal pattern within the series. Second, attempt will be made on removing identified trend and seasonality and tentative model will be assumed based on sample autocorrelation of the transformed stationary time series. Third, different model dialogistic measures on residual like normal probability plot and histogram of residual will be performed for the tentative model so as to decide if the tentative one is the most suitable model to be used. Finally, a forecast based on the most appropriate model will be check against actual data with a view to testing the validity of the model. Data The data used in this analysis is the actual monthly diesel oil usage (Million liters per month) in Thailand of the period January 1999 to January 2011 with a total of 145 data points. For the purpose of assure the validity of the proposed time series model, monthly diesel oil usage data from January 1999 to January 2010 will be used as raw data to fit into proposed model in contrast data from February 2010 to January 2011 will be reserved for the evaluation of our proposed model in ex-post forecast. The data is directly coming from The office of industrial economics of Thailand website and can be found with the following link: http://www.oie.go.th/industrystat_th.asp

Time Series Analysis Project

xxxxxx xxxxxxxxx

The exhibits attached below show the time series plot and correlogram for the original time series. According to exhibit 1, it is apparent that the monthly diesel oil usage in Thailand is not stationary. Firstly, it demonstrates an upwards linear trend in monthly diesel oil usage over the years. Second, there is a roughly recurring pattern or seasonality with each year.

Time Series Plot of Volume (Million litres)


2000
D A M NJ M M A O MJA JF M J JS J JA J A D J D D A A DM J A M S M M M N JM M F JJA M M J A A J N S O J JJ O J O D JA N S N O M O N DF SN F F F F AJ J M JAO A D S O F S J O JA N S D

1750

Volume (Million litres)

1500
A J

1250

1000

J M JM A M FA FM J JA D N S O

M M S F JA N J O J D N A S

750

500 Month Year J an 1999 J an 2000 J an 2001 J an 2002 J an 2003 J an 2004 J an 2005 J an 2006 J an 2007 J an 2008 J an 2009 J an 2010

Exhibit 1: Time series plot of monthly diesel oil usage in Thailand. Exhibit 2 further confirms the non stationary series which obviously to show that the ACF fails to die out rapidly as the lags increase. Exhibit 2 and Exhibit 3 can be specified the tentative model as AR(1,1) because PACF is seem to be cut off after lag 1. Because of the fact that both upward trend and roughly seasonality mentioned above will disrupt our analysis and hence deseasonalizing should be performed before any further analyses. With a view to removing the upward trend on the time series, 1st difference (Yt Yt-1) of time series is performed and time series plot is shown in the Exhibit 4. Moreover, we also plot the sample PACF obviously shown that there are some correlation at lag 12 and 24 so its the evidence that these data have seasonal trend.

Time Series Analysis Project

xxxxxx xxxxxxxxx

Autocorrelation Function for Volume (Million litres)


(with 5% significance limits for the autocorrelations)
1.0 0.8 0.6

Autocorrelation

0.4 0.2 0.0 -0.2 -0.4 -0.6 -0.8 -1.0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32

Lag

Exhibit 2: Sample ACF of time series of monthly diesel oil usage.


Partial Autocorrelation Function for Volume (Million litres)
(with 5% significance limits for the partial autocorrelations)
1.0 0.8

Partial Autocorrelation

0.6 0.4 0.2 0.0 -0.2 -0.4 -0.6 -0.8 -1.0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32

Lag

Exhibit 3: Sample PACF of time series of monthly diesel oil usage. 4

Time Series Analysis Project

xxxxxx xxxxxxxxx

According to Exhibit 4, the upward trend of time series is taken away and looks like having a constant mean. However, the time series still has to be deseasonlized before fitting into time series model. Given a some annual pattern can be found in exhibit 5, the time series will be transformed into difference of water usage in the current month in the previous year (Yt Yt-12). The resulting time series plot is shown in exhibit 6.

Time Series Plot of 1st Diff Volume (Million litres)


500
D

400

1st Diff Volume (Million litres)

D J J D O M M S J NF M J F A J A D O M M A J J S N M M J M M A DM DM O J J N S O MA AJ N F J M

300 200 100 0 -100 -200 -300 Month Year J an 1999

N A DM AJJ O A FM S

N A N O D A O A O S JSD J JA N M M JA O J A A JS N M F D J M J A A A J M J N S A S J J O F MJ J J J F A F JS S F J

MJA

N F

J an 2000

J an 2001

J an 2002

J an 2003

J an 2004

J an 2005

J an 2006

J an 2007

J an 2008

J an 2009

J an 2010

Exhibit 4: Time series plot of 1st differences of monthly diesel oil usage. As mentioned in the previous session, the sample autocorrelation function suggests the possibility of using a time series model that is able to incorporate both lag 1 and lag 12. After fitting with model with different AR and MA parameters, one of the models that can incorporate the above requirement properly is the multiplicative, seasonal ARIMA (1,1,0) x (2,1,0)12 model and it will also be used as tentative model that will under go further analyses in the later session.

Time Series Analysis Project

xxxxxx xxxxxxxxx

Partial Autocorrelation Function for 1st Diff Volume (Million litres)


(with 5% significance limits for the partial autocorrelations)
1.0 0.8

Partial Autocorrelation

0.6 0.4 0.2 0.0 -0.2 -0.4 -0.6 -0.8 -1.0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32

Lag

Exhibit 5: Sample PACF of 1st differences of monthly diesel oil usage.


Time Series Plot of 1st & Seasonal Diff Volume
400
J N D

300

A M O A S DF J M J J N A M N J A D J M M O S F A JS O

F J M J S O J N A J S A MM J N O F F D D J S A M J A S D F M MJ J A N O J A J F M M D J

D D J

1st & Seasonal Diff Volume

200 100

0 -100 -200 -300 -400 -500 Month Year J an 1999

M F

M A A J

M O J N

O N JS

N O J M S J S J M M F A A M F A N A O D J

J an 2000

J an 2001

J an 2002

J an 2003

J an 2004

J an 2005

J an 2006

J an 2007

J an 2008

J an 2009

J an 2010

Exhibit 6: Time series plot 1st and seasonal differences of monthly diesel oil usage. 6

Time Series Analysis Project ARIMA (1,1,0) x (2,1,0)12 model :

xxxxxx xxxxxxxxx

Wt = + 1 Wt 1 + 1 Wt 12 + 2 Wt 24 1 1 Wt 13 1 2 Wt 25 + e t Y where Wt = 12 t

Exhibit 7 shows the estimation of parameter of the ARIMA (1,1,0) x (2,1,0)12 model and their standard errors. It can be found that 1 = 0.3250 1 = 1.0165 , 2 = 0.4902 , = 7.720 and the model become. ARIMA (1,1,0) x (2,1,0)12 model :
Wt = 7.720 0.3250 Wt 1 1.0165 Wt 12 0.4902 Wt 24 0.3304 Wt 13 0.1593 Wt 25 + e t Y where Wt = 12 t

Since the parameter is estimated with high significant, the proposed model will be proceeded to diagnostic check.

Exhibit 7: Parameter Estimates for monthly diesel oil usage with ARIMA (1,1,0) x (2,1,0)12 model.

Time Series Analysis Project

xxxxxx xxxxxxxxx

Exhibit 7: Parameter Estimates for monthly diesel oil usage with ARIMA (1,1,0) x (2,1,0)12 model. (Continue)

Time Series Analysis Project Model Diagnostic

xxxxxx xxxxxxxxx

When we look at the time series plot of the residuals as shown in exhibit 8 (bottom right corner of the residual plots), the plot does not suggest any main irregularities within the model and the residuals are nearly uncorrelated with each other. Besides, the bell-shaped histogram and the normal probability plot on the residual also support that ARIMA (1,1,0) x (2,1,0)12 model is a appropriate model of this time series. Furthermore, exhibit 9 and 10 ACF and PACF of residual for diesel oil usage also shows that there is no significant correlation within the sample time series with 5% significance limits. Finally, the Modified Box-Pierce (Ljung-Box) Chi-Square statistic shown in exhibit 7 illustrates that ARIMA (1,1,0) x (2,1,0)12 model passed the test with 5% significant level which means that the null hypothesis that the residual follow a white noise process is not rejected at 5% significant level.

Residual Plots for Volume (Million litres)


Normal Probability Plot
99.9 99

Versus Fits
300 Residual 150 0 -150 -300

Percent

90 50 10 1 0.1

-200

0 Residual

200

400

1000

1500 Fitted Value

2000

Histogram
30 Frequency 20 10 0 Residual 300 150 0 -150 -300
1 10 20 30

Versus Order

-200

-100

0 100 Residual

200

300

40 50 60 70 80 90 100 110 120 130

Observation Order

Exhibit 8: Residual plots for monthly diesel oil usage with ARIMA (1,1,0) x (2,1,0)12 model.

Time Series Analysis Project

xxxxxx xxxxxxxxx

ACF of Residuals for Volume (Million litres)


(with 5% significance limits for the autocorrelations) 1.0 0.8 0.6 Autocorrelation 0.4 0.2 0.0 -0.2 -0.4 -0.6 -0.8 -1.0 2 4 6 8 10 12 14 16 Lag 18 20 22 24 26 28 30

Exhibit 9: ACF of residual for diesel oil usage.


PACF of Residuals for Volume (Million litres)
(with 5% significance limits for the partial autocorrelations) 1.0 0.8 Partial Autocorrelation 0.6 0.4 0.2 0.0 -0.2 -0.4 -0.6 -0.8 -1.0 2 4 6 8 10 12 14 16 Lag 18 20 22 24 26 28 30

Exhibit 10: PACF of residual for diesel oil usage. 10

Time Series Analysis Project Model Evaluation

xxxxxx xxxxxxxxx

After identifying and verifying the ARIMA (1,1,0) x (2,1,0)12 model, the forecasted monthly diesel oil usage will be tested against the existing data in 2010. After restoring back the deseaonalized 1st difference stationary model into original time series, the time series plot of forecasted data and original data is shown in exhibit 11. As we can see obviously form the plot below, although the forecast value differ from the actual but the trend of data for forecast and actual is the same.

Time Series Plot of Actual VS Forecasted


1800 1700
Variable Actual Forecast

Volume (Million litres)

1600 1500 1400 1300 1200 1100 Month Year Feb Mar 2010 Apr May J un J ul Aug Sep Oct Nov Dec J an 2011

Exhibit 11: Time series plot of actual vs forecasted time series during 2010

11

Time Series Analysis Project Conclusion

xxxxxx xxxxxxxxx

We have performed examination on the times series of monthly diesel oil usage in Thailand. After 1st differences and deseasonalization, the time series is transformed into a stationary time series. The transformed series is fitted with multiplicative, seasonal ARIMA (1,1,0) x (2,1,0)12 model with equation: ARIMA (1,1,0) x (2,1,0)12 model :
Wt = 7.720 0.3250 Wt 1 1.0165 Wt 12 0.4902 Wt 24 0.3304 Wt 13 0.1593 Wt 25 + e t Y where Wt = 12 t

Residual analyses have also been performed in order to check the validity of the model, No main irregularities within the model are found and the residuals are nearly uncorrelated with each other. Furthermore, forecasted monthly diesel oil usage is tested against the actual one so as to evaluate the effectiveness of the model and satisfactory results are also being shown on the test. Overall, it can be concluded that the monthly diesel oil usage in Thailand can be fit with multiplicative, seasonal ARIMA (1,1,0) x (2,1,0)12 model

12

Das könnte Ihnen auch gefallen