Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 3, March 2013) Forecasting of Gold Prices (Box Jenkins Approach) Dr. M. Massarrat Ali Khan College of Computer Science and Information System, Institute of Business Management, Korangi Creek, Karachi Abstract— In recent years, the global gold price trend has attracted a lot of attention and the price of gold has frightening spike compared to historical trend. In times of uncertainty investors consider gold as a hedge against unforeseen disasters so the forecasted price of gold has been a subject of highest amongst all. In this paper an attempt has been made to develop a forecasting model for gold price. The sample data of gold price (in US$ per ounce) were taken from January 02, 2003 to March 1, 2012. Data up till January 02, 2012 were used to build the model while remaining were used to forecast the gold price and to check the accuracy of the model. We have used Box-Jenkins, Auto Regressive Integrated Moving Average (ARIMA) methodology for building forecasting model. Results suggest that ARIMA(0,1,1) is the most suitable model to be used for predicting the gold price. For testing the forecasting accuracy Root Mean Square Error, Mean Absolute Error, and Mean Absolute Percentage Error are calculated. II. LITERATURE REVIEW In recent past most of the literature on gold is based on analysis and review of gold markets, its supply and demand situations and forecasting of gold prices by various methods. Some of recent works on gold price forecasting are discussed below: Shahriar and Erkan (2010) carried out a study on global gold market and gold price forecasting. They analyzed the world gold market from January 1968 to December 2008. They applied a modified econometric version of the longterm trend reverting jump and dip diffusion model for forecasting natural resource commodity prices. Estimates of dynamic jump and dip as parameters were obtained using the model ( ) , Where Keywords-- ARIMA, Forecasting, Stationary Time Series, Gold Price, Mean Absolute Error, Root Mean Square Error = First component or drift ( ) = Second component or the range of random movement = Third component or jump or dip I. INTRODUCTION Gold is one of the most important commodities in the world. It is the only commodity that retains its value during all the periods of crises – economies, financial or political. As long as the world economy remains uncertain and investors feel inflation and sovereign default, gold will keep its allure (The Economist – July8, 2010). The price of gold has been rising day by day, the fear of the world economy have caused the price of gold to roar. When foreign nations that hold billions of dollars in US debt starts buying gold because they fear the value of the dollars will go down, the rising price of gold becomes more than a novelty (Frank Ahrans – September 24, 2009 – Economy Watch – The Daily Washington Post). Price of gold cannot be controlled; however it can be measured and forecasted for future decisions. Forecasting models based on time series data (univariate methods) and relationship between a series of other indicators (causal or multivariate methods) are very popular, since they are more effective and have less residual errors and forecast errors. The purpose this study is to develop a forecasting model for the price of gold. The study is based on the time series data of London gold price per ounce, in US Dollars from Jan 02, 2003 to March 1, 2012 (London Gold Price Fixing). Where; , if gold prices have jump and if the gold prices do not have any jump, , if gold prices have dip and if the gold prices do not have any dip and is the historical volatility of gold prices. To evaluate the jump or dip, the model reviews the historical price trend of jump and dip and then estimates the same trend for future. The unit root test for nominal gold price has also been conducted before applying the model. The first component (α2t) in the model is the longterm trend component; this component shows that gold price should be reverting to the historical long-term trend. Shahriar and Erkan (2010) discussed the results of three above mentioned components for gold price from Jan 1968 to Dec 2008 and found that gold price on average increased by $1.12 per ounce per month, jump and dip volatility is 25% of the current gold price per month whereas the gold price goes down at $18 per ounce decreasing a dip period and goes up at $20 per ounce during the jump period. Shahriar and Erkan used the model for forecasting next 10 years gold prices. Results indicated that, assuming the current price jump started in 2007 behaves in the same manner as that experienced in 1978, the gold price would remain high up to the end of 2014. 662 International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 3, March 2013) Ismail, Yahya and Shabri (2009) developed a forecasting model for predicting gold price using Multiple Linear Regression (MLR). They obtained four different models based on several economic factors. In this study PraisWinsten procedure was employed to estimate the regression coefficients and they found this procedure successfully solving the problem of correlated error terms. Ismail, et al. (2009) considered different commodities of factors such as Commodity Research Bureau future index (CBR) , Euro/USD (Euro/USD foreign exchange rate), Inflation Rate (INF) Money Supply (M1), New York Stock Exchange (NYSE), Standard and Poor 500 (SPX), Treasure Bill (T-Bill) and US Dollar Index (USDX) to estimate the gold price. They found that CRB, Euro/USD foreign exchange rate, and M1 as significant factors in forecasting the gold price communicated with low P-values. Khaemasunun (2006) forecasted Thai gold price, using Multiple Regression and Auto-Regression Integrated Moving Average (ARIMA) model. While fitting the model Khaemasunun (2006) considered the effect of nine currencies (United States, Australia, Canada, Peru, Hong Kong, Japan, German and Italy, Signapore and Colombia), Oil Prices, Set Index, Interest Rate, Gold Derivation on Thai gold price. Khaemasunun (2006) also used Chinese New Year Gift as dummy variable. The model to be tested is as follows: Using various lags of time and observing the ACF (Auto correlation Function) and PACF (Partial Auto-correlation Function), Khaemasunun (2006) described to use ARIMA(1,1,1), as it contained the least Mean Absolute Percentage Error (MAPE), to forecast Thai Gold Prices. Selvanatha (1991) used London daily gold price in Australian dollars (PAUD) for the period 3 August, 1987 to 20 July, 1988 to construct the gold price forecasted model. Using Box–Jenkins technique, Selvanatha (1991) found that a suitable model could be: PAUDt = α + β +PAUDt – 1 + Ut t = 2, ……T. Where Ut is a white noise and T = Sample size Testing for Simple Random Walk (SRW) and found that the preferred model is: PAUD = PAUDt – 1 + Ut Selvanathan has analyzed the accuracy of the gold price forecasts gathered from a panel of gold experts and concluded that forecasts from a simple random-walk model are superior to the ERC panel forecasts and simple randomwalk model forecasts are cheap as compared to the efforts of the panel of experts. III. FORECASTING MODEL The Box-Jenkins ARIMA is one of the most sophisticated techniques of time series forecasting. It is so common is econometrics that the terminology ―time series analysis‖ referred to the ‗Box Jenkins approach to modeling time series. (Kennedy, 2008) The general Box-Jenkins (ARIMA) model for y is written as: Yt(Gold Price) = β1US + β2Aus + β3Can + β4Per + β5HK + β6Jap + β7EU + β8SIN + β9Col + β10Oil + β11Set + β12Int + β13Future + β14Gift The first stage results showed that only five currencies were significantly affecting Thai gold price namely AUS, US, Jap, EU and CAN. At second stage Khaemasunun (2006), used five currencies and five other variable namely OIL (Oil Price), SET index (Portfolio Theory), INT (Interest Rate), FUTURE (Gold Derivation) and GIFT (Chinese New Year – Chinese Thai people have belief that gold represent prosperity, giving gold as a gift alike giving the prosperity to other). At final stage simple regression model analysis based on the five currencies, FUTURE and OIL was identified and following significant factors were identified. Where and θ are unknown parameters and the are independent and identically distributed normal errors with zero mean, p is the number of lagged value of y*, it represents the order of auto regressive (AR) dimensions, d is the number of times y is differed, and q is the number of lagged values of the error terms representing the order of moving average (MA) dimension of the model. The term ―integrated‖ means that to obtain a forecast for y from this model it is necessary to integrate the forecast y*. ARIMA methodology may be represented by the following diagram. ΔYt = 0.022039321137 + 0.6624022662Aus + 0.41996153 Can + 0.436812817Jap + 0.1504451898EU + 0.8546501878US + 0.121974604Future + 0.04365593688Oil 663 International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 3, March 2013) Data Preparation Identification Difference data to obtain stationary series Model Selection Examine data, ACF, PACF to identify potential (choosing tentative p, q, d) Figure 4.1 - Gold Price Estimation TABLE 4.1 Correlogram of GP Estimate parameters in potential model and testing. Select best model using suitable criterion Diagnostic Diagnostic Check ACF/PACF of residuals (are the estimated residuals are white noise?) Forecasting Use model to forecast The principle of parsimony is adapted to determine p, d, and q. The Box-Jenkins approach is valid for the variables which are stationary having constant mean and variance over time. Many research studies have shown that most of the macro economy data are non-stationary, as it carries few characteristics of a random walk (highly correlated in adjacent observations). We therefore decided to transfer the gold price series to changed to 1st difference data and tested again. Figure 4.2 shows the 1st difference gold price series; this series may have a mean of zero and are distributed as white noise. Table 4.2 shows the ACFs and PACFs for 1st difference data, the ACFs and PACFs are pattern less and statistically not significant. IV. DATA COLLECTION AND ANALYSIS The data of gold price (in US per ounce) were collected from January 02, 2003 to March 1, 2012 (London Gold Price Fixing). A. Stationary Test: The line diagram for gold price data from Jan 02, 2003 to March 03, 2012 (London Gold Price Fixing) is shown Figure 4.1. The correlogram of gold price is shown in Table 4.1. Both Figure 4.1 and Table 4.1 show random walk behavior. Furthermore the price is showing fluctuation but overall trend is upward. Table 4.1 shows there is high ACFs and PACFs. Figure 4.2 - 1st Differential 664 International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 3, March 2013) TABLE 4.2 Correlogram of D (GP) TABLE 4.3 TABLE 4.4 The Unit Root Test: After stationary test, the unit root test is done by ―Augmented Dickey Fuller‖ and ―Philips Perron‖ unit root test by setting hypothesis as: H0 : ρ= 1 (Non stationary) H1 : ρ ≠ 0 (Stationary) Table 4.3 depicts Augmented Dickey Fuller Test; tstatistic value for direct values is -0.686623 so we do not reject H0 at 5% level of significance. The gold price series (level) is non stationary. However Table 4.4 shows ADF unit root test statistic for first differential gold price data has significant value of test statistic, which is -53.0557, so we reject H0 and it shows that series is stationary at first difference I(1). 665 International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 3, March 2013) Consolidated Unit Root Test (ADF and PP) and KPSS stationary test ‗with intercept‘, ‗trend and intercept‘ and ‗no intercept and trend‘ is shown below in Table 4.5: ARIMA(0,1,1) and ARIMA(1,1,0) models statistics are shown in Appendices. Once the model is identified after evaluating basic assumptions we fitted the following model: Table 4.5 Unit Root Test With Intercept Trend and Intercept No Intercept and Trend (None) ADF Level 1st Diff Level 0.6866 -53.055* 0.808 -2.1406 -53.085* -2.071 PP 1ST Diff -53.3329* -53.410* 2.00 -53.119 -52.951* 2.604 ŷ= + Stationery Test (KPPS) AR (n) + β MA (n) + We are using MA(1) and AR(1) models based on selected criteria‘s Level 1st Diff 5.506 0.2316* 1.045 0.0161* yt = 0.590786 – 0.090876MA (1) The ARIMA(1,1,0) model is: D (GP) = 0.590848 – 0.087114 AR (1) *Significant at 1% B Forecasting Accuracy: There are several methods of measuring accuracy and comparing one forecasting method to another, we have selected Root Mean Square Error (RMSE). Mean Absolute Error (MAE) and Mean Absolute Percentage Error (MAPE). The RMSE, MAE and MAPE are as follows Model identification and Coefficient Estimates: After the test of stationary, we conclude that the data is stationary at first difference. The repressor that would be chosen from the model is selected from various iteration for AR(p) and MA(q), the selection is based on observing the ACFs and PACFs. We used E-views for estimating the coefficients and testing the goodness of fit of the model. The search algorithm tried number of different coefficient values, after several iterations, and based on comparing Akaike Information Criteria (AIC), and Schwarz Information criteria (SIC), the best model to forecast gold prices is ARIMA (0,1,1) since it contains the least AIC and SIC ratios. Table 4.6 shows the AIC and SIC value for various ARIMA (p,d,q) iterations: AIC ARIMA(1,1,0) 22.44866 18.85051 1.086433 The above table shows that the Root Mean Squared Error and Mean Absolute Error are less in ARIMA(0,1,1) as compared to ARIMA(1,1,0). C Forecast Result Analysis: The gold prices from 1st Feburary,2012 to 1st March,2012 were used to predict the gold prices by using both MA(1) and AR(1) model. The results of forecasted actual values are shown in Figure 4.3, Table 4.7 and Figure 4.4, Table 4.8. TABLE 4.6 ARIMA ARIMA(0,1,1) 22.38152 18.78972 1.082841 RMSE MAE MAPE SIC (p,d,q) (1,1,0) 8.000928 8.005803 (2,1,0) 8.001443 8.008758 (3,1,0) 8.002672 8.012428 (4,1,0) 8.003700 8.015900 (5,1,0) 8.004865 8.015900 (0,1,1) 8.000171* 8.005044* (0,1,2) 8.000700 8.008040 1720 (0,1,3) 8.001538 8.011284 1680 (0,1,4) 8.002094 8.014277 1640 (1,1,1) 8.001164 8.008477 (2,1,2) 8.002196 8.009510 (3,1,3) 8.002877 8.010195 (4,1,4) 8.009990 8.017310 Forecast within 2 St. Error 1880 Forecast: GPF2 Actual: GP Forecast sample: 2/01/2012 3/01/2012 Included observations: 22 1840 1800 Root Mean Squared Error Mean Absolute Error Mean Abs. Percent Error Theil Inequality Coefficient Bias Proportion Variance Proportion Covariance Proportion 1760 2/06/2012 2/13/2012 2/20/2012 2/27/2012 GPF2 Figure 4.3 *Lowest Value of AIC and SIC 666 22.38152 18.78972 1.082841 0.006411 0.138334 0.678907 0.182759 International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 3, March 2013) Table 4.7 Table 4.8 ARIMA(0,1,1) Real Data Resulted Data Date 1-Feb-12 2-Feb-12 3-Feb-12 6-Feb-12 7-Feb-12 8-Feb-12 9-Feb-12 10-Feb-12 13-Feb-12 14-Feb-12 15-Feb-12 16-Feb-12 17-Feb-12 20-Feb-12 21-Feb-12 22-Feb-12 23-Feb-12 24-Feb-12 27-Feb-12 28-Feb-12 29-Feb-12 1-Mar-12 1740 1751 1734 1719 1724 1746 1748 1711.5 1720 1722 1733 1713 1723 1733 1748 1752 1777 1777.5 1772 1781 1770 1714 1743.518 1744.22 1744.801 1745.393 1745.984 1746.574 1747.165 1747.756 1748.347 1748.938 1749.529 1750.12 1750.71 1751.301 1751.892 1752.483 1753.074 1753.665 1754.255 1754.846 1755.437 1756.028 Date Error 1-Feb-12 2-Feb-12 3-Feb-12 6-Feb-12 7-Feb-12 8-Feb-12 9-Feb-12 10-Feb-12 13-Feb-12 14-Feb-12 15-Feb-12 16-Feb-12 17-Feb-12 20-Feb-12 21-Feb-12 22-Feb-12 23-Feb-12 24-Feb-12 27-Feb-12 28-Feb-12 29-Feb-12 1-Mar-12 3.518 -6.78 10.801 26.393 21.984 0.574 -0.835 36.256 28.347 26.938 16.529 37.12 27.71 18.301 3.892 0.483 -23.926 -23.835 -17.745 -26.154 -14.563 42.028 1900 Forecast: GPF Actual: GP Forecast sample: 2/01/2012 3/01/2012 Included observations: 22 1800 Root Mean Squared Error Mean Absolute Error Mean Abs. Percent Error Theil Inequality Coefficient Bias Proportion Variance Proportion Covariance Proportion 1750 1700 1650 1740 1751 1734 1719 1724 1746 1748 1711.5 1720 1722 1733 1713 1723 1733 1748 1752 1777 1777.5 1772 1781 1770 1714 ARIMA(1,1,0) Resulted Data 1743.439 1744.03 1744.621 1745.212 1745.802 1746.393 1746.984 1747.575 1748.166 1748.756 1749.347 1749.938 1750.529 1751.12 1751.71 1752.301 1752.892 1753.483 1754.073 1754.664 1755.255 1755.846 Error 3.439 -6.97 10.621 26.212 21.802 0.393 -1.016 36.075 28.166 26.756 16.347 36.938 27.529 18.12 3.71 0.301 -24.108 -24.017 -17.927 -26.336 -14.745 41.846 Figure 4.3 and Figure 4.4 shows the forecast evaluation statistics for gold price with the two standard error bands; and we observe that the forecasted for ARIMA(0,1,1) is better as compared to ARIMA(1,1,0). The results in Table 4.7, ARIMA(0,1,1) show that there is less error in forecasting the first 21 values and the constant are in the range of $26.15 to $37.12. However, in the last; (22nd value) the error is $42.028 which was caused due to change in stance of U.S Federal Reserve. Federal Reserve Chairman stopped the monetary easing (purchasing of gold and other precious metals-which people have been hoping for), which had impacted on the demand of gold and causing the decline in the price of gold by nearly 4% for its biggest one day drop (http://www.assettrend.com). Figure 4.5 shows the comparison for real and forecasted values for ARIMA(0, 1, 1) Forecast Within 2 St. Error(110) 1850 Real Data 22.44866 18.85051 1.086433 0.006430 0.143425 0.674298 0.182277 1600 2/06/2012 2/13/2012 2/20/2012 2/27/2012 GPF Figure 4.4 667 International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 3, March 2013) REFERENCE [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] V. CONCLUSION [11] In order to develop a univariate Time Series Model, we used London Fix gold prices from January 02, 2003 till March 01, 2012. In this paper, we have developed a systematic and iterative methodology of Box-Jenkin ARIMA forecasting for gold price. A unit root test was applied to the long term daily gold prices. This concludes that the gold price series is nonstationary. After the test of stationary, we conclude that the data is stationary at first difference, E-views software is used for fitting the coefficient of the model, using graphs, statistics, ACFs and PACFs of residuals and after several iterations, the model selected is ARIMA(0,1,1). There are several ways of measuring forecasting accuracy; we have used Mean Absolute Error, Root Mean Square Error and Mean Absolute Percentage Error. We may use this model for forecasting the gold prices for future. [12] [13] [14] [15] [16] [17] [18] [19] Acknowledgement [20] I would like to acknowledge and thank Mr. Muhammad Haseeb (Faculty of IoBM) for his help and guidance during this research. I am also thankful to Mr. Muhammad Farhan Ali Khan, who helped me during the preparation of this paper. [21] [22] 668 Cooray T.M. J.A, (2008), 'Applied Time Series, Analysis and Forecasting' Narosa Publishing House India. DeLurgio, Stephen A. (1993), 'Forecasting Principles and Application', University of Missori USA Frank Ahrans, September 24, 2009 "Economy Watch- The Daily Washington Post" www.usagold.com Gaynor, Patricia E and Kirkpatrick Rickey C, (1994) 'Introduction to Time Series Modeling and Forecasting in Business and Economics' Mc Graw Hill International USA Govelt, M.H., Govelt GJS (1982), 'Gold Demand and Supply', Resources Policy 8. 84-96 Greene, William H, (2003) ‗Econometrics Analysis‘ Fifth Edition Pearson Education Inc USA Gujrati, Damodar N, (2004) ‗Basic Econometrics‘ Fourth Edition Ismail, Z., Yahya A. And Shabri A.. (2009) ' Forecasting Gold Prices Using Multiple Linear Regression Method'. American Journal of Applied Sciences 6: 1509-1514 Kanfmann, T.D. and Winters, R.a., (1989), 'The Price of Gold; A Simple Model'A Resources Policy 15, 309-313 Kennedy Peter, (2008) ' A Guide to Econometrics' 6th Edition, Blackwell Publishing USA Lineesh, M.C, Minu, K.K. and Jessy John, e. (2010), "Analysis of Nonstationary Nonlinear Economic Time Series of Gold Price A Comparative Study." International Mathematical Forum, 5,16731683 Newaz, M.K. (2008), 'Comparing the Performance of Time Series Models for Forecasting Exchange Rate' BRAC University Journal, Vol V, No.2. 55-65 Said Nasser and Scacciavillant, Fabio, (2010), 'The Case for Gold as Reserve Asset: Gold, the GCC and Khaliji", Dubai International Financial Center Selvanathan, E.A, (1991) 'A Note on the Accuracy of Business Economists' Gold Price Forecast'. Australian Journal of Managements. 16 Selvanathans S. Selvanathan, E.A. (1999). 'The Effect of the Price of Gold on its Production; A Time Series Analysis', Resource Policy 25, 265-275 Shafiee Shahriar and Topal Erkan, (2010), "An Overview of Global Gold Market and Gold Price Forecasting' Resources Policy, Journal 35,178-189 WGC, 2012, World Gold Council Publications Achieves, www.gold.org : World Gold Council http:// www.pdffactory.com Lin, Jing , Empirical Study of Gold Price Based on ARIMA and GARCH Models http://www.Kitco.com/scripts/hist_charts/yearly_graphs.plx London Fix Historical gold- result http://www.wbiconpro.com Khaemasunun Pravit, 'Forecasting Thai Gold Prices', Australian Journal of Management, Vol. 16, No.1 http://businessmanagement.wordpress.com/2008/2/21/time-seriesmethods of forecasting http://www.usagold.com/reference/price/2005.html International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 3, March 2013) Appendix 01 Correlogram of 2nd Difference of Gold price Appendix 01 ADF for 2nd Difference gold price series 669 International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 3, March 2013) Appendix 02 ARIMA(0,1,1) Appendix 02 ARIMA(1,1,0) Dependent Variable: D(GP) Method: Least Squares Date: 06/20/12 Time: 18:24 Sample (adjusted): 1/06/2003 1/31/2012 Included observations: 2367 after adjustments Convergence achieved after 3 iterations Dependent Variable: D(GP) Method: Least Squares Date: 06/20/12 Time: 16:16 Sample (adjusted): 1/03/2003 1/31/2012 Included observations: 2368 after adjustments Convergence achieved after 5 iterations Backcast: 1/02/2003 Variable Coefficient Std. Error t-Statistic Prob. C 0.590786 0.246744 2.394331 0.0167 MA(1) -0.090876 0.020479 -4.437470 0.0000 R-squared 0.007917 Mean dependent var 0.591385 Adjusted R-squared 0.007497 S.D. dependent var 13.25649 S.E. of regression 13.20671 Akaike info criterion 8.000171 Sum squared resid 412670.8 Schwarz criterion 8.005044 F-statistic 18.88034 Prob(F-statistic) 0.000015 Log likelihood Durbin-Watson stat Inverted MA Roots -9470.202 1.996447 .09 670 Variable Coefficient Std. Error t-Statistic Prob. C AR(1) 0.590848 -0.087114 0.249796 0.020490 2.365327 -4.251519 0.0181 0.0000 R-squared Adjusted R-squared S.E. of regression Sum squared resid Log likelihood Durbin-Watson stat 0.007585 0.007165 13.21171 412808.8 -9467.098 2.003790 Inverted AR Roots -.09 Mean dependent var S.D. dependent var Akaike info criterion Schwarz criterion F-statistic Prob(F-statistic) 0.591339 13.25929 8.000928 8.005803 18.07541 0.000022