Analyzing And Predicting The Average Monthly Price of Gold. Like many other precious gemstones and metals, the high volume of sales and

Similar documents
Firstly, the dataset is cleaned and the years and months are separated to provide better distinction (sample below).

at least 50 and preferably 100 observations should be available to build a proper model

TIME SERIES ANALYSIS AND FORECASTING USING THE STATISTICAL MODEL ARIMA

Suan Sunandha Rajabhat University

The log transformation produces a time series whose variance can be treated as constant over time.

Oil price volatility in the Philippines using generalized autoregressive conditional heteroscedasticity

Analysis. Components of a Time Series

Empirical Approach to Modelling and Forecasting Inflation in Ghana

Minitab Project Report - Assignment 6

Chapter 12: An introduction to Time Series Analysis. Chapter 12: An introduction to Time Series Analysis

5 Autoregressive-Moving-Average Modeling

Chapter 8: Model Diagnostics

FE570 Financial Markets and Trading. Stevens Institute of Technology

The ARIMA Procedure: The ARIMA Procedure

CHAPTER 8 MODEL DIAGNOSTICS. 8.1 Residual Analysis

MCMC analysis of classical time series algorithms.

MODELING INFLATION RATES IN NIGERIA: BOX-JENKINS APPROACH. I. U. Moffat and A. E. David Department of Mathematics & Statistics, University of Uyo, Uyo

2. An Introduction to Moving Average Models and ARMA Models

Modeling and forecasting global mean temperature time series

Univariate, Nonstationary Processes

Estimation and application of best ARIMA model for forecasting the uranium price.

A SEASONAL TIME SERIES MODEL FOR NIGERIAN MONTHLY AIR TRAFFIC DATA

Ch 8. MODEL DIAGNOSTICS. Time Series Analysis

Lecture 6a: Unit Root and ARIMA Models

Time Series Analysis of Currency in Circulation in Nigeria

Asitha Kodippili. Deepthika Senaratne. Department of Mathematics and Computer Science,Fayetteville State University, USA.

Forecasting. Simon Shaw 2005/06 Semester II

Time Series I Time Domain Methods

Lecture 19 Box-Jenkins Seasonal Models

PREDICTING SURFACE TEMPERATURES OF ROADS: Utilizing a Decaying Average in Forecasting

Scenario 5: Internet Usage Solution. θ j

Dynamic Time Series Regression: A Panacea for Spurious Correlations

Decision 411: Class 9. HW#3 issues

Forecasting of the Austrian Inflation Rate

Prof. Dr. Roland Füss Lecture Series in Applied Econometrics Summer Term Introduction to Time Series Analysis

Time Series Analysis -- An Introduction -- AMS 586

FinQuiz Notes

Forecasting using R. Rob J Hyndman. 3.2 Dynamic regression. Forecasting using R 1

Basics: Definitions and Notation. Stationarity. A More Formal Definition

Gaussian Copula Regression Application

Univariate ARIMA Models

Volatility. Gerald P. Dwyer. February Clemson University

Forecasting the Prices of Indian Natural Rubber using ARIMA Model

Forecasting Bangladesh's Inflation through Econometric Models

Outline. Nature of the Problem. Nature of the Problem. Basic Econometrics in Transportation. Autocorrelation

The Fitting of a SARIMA model to Monthly Naira-Euro Exchange Rates

Autoregressive Integrated Moving Average Model to Predict Graduate Unemployment in Indonesia

Paper SA-08. Are Sales Figures in Line With Expectations? Using PROC ARIMA in SAS to Forecast Company Revenue

Circle the single best answer for each multiple choice question. Your choice should be made clearly.

Seasonal Autoregressive Integrated Moving Average Model for Precipitation Time Series

Advanced Econometrics

FORECASTING SUGARCANE PRODUCTION IN INDIA WITH ARIMA MODEL

FIN822 project 2 Project 2 contains part I and part II. (Due on November 10, 2008)

In this project I will analyze a time series of the number of deaths that occurred during the Vietnam War.

Read Section 1.1, Examples of time series, on pages 1-8. These example introduce the book; you are not tested on them.

Forecasting using R. Rob J Hyndman. 2.4 Non-seasonal ARIMA models. Forecasting using R 1

Empirical Market Microstructure Analysis (EMMA)

Modelling Seasonality of Gross Domestic Product in Belgium

Economics 618B: Time Series Analysis Department of Economics State University of New York at Binghamton

Forecasting using R. Rob J Hyndman. 2.5 Seasonal ARIMA models. Forecasting using R 1

Chapter 3: Regression Methods for Trends

TIME SERIES DATA PREDICTION OF NATURAL GAS CONSUMPTION USING ARIMA MODEL

A Univariate Time Series Autoregressive Integrated Moving Average Model for the Exchange Rate Between Nigerian Naira and US Dollar

Lesson 13: Box-Jenkins Modeling Strategy for building ARMA models

FinQuiz Notes

Time Series and Forecasting

1 Regression with Time Series Variables

The Identification of ARIMA Models

Problems from Chapter 3 of Shumway and Stoffer s Book

The data was collected from the website and then converted to a time-series indexed from 1 to 86.

Fractal structure in the Chinese yuan/us dollar rate. Abstract. Grande Do Sul, Brazil

Report for Fitting a Time Series Model

Univariate linear models

Technical note on seasonal adjustment for Capital goods imports

Part 1. Multiple Choice (40 questions, 1 point each) Part 2. Problems/Short Answer (10 questions, 6 points each)

Lab: Box-Jenkins Methodology - US Wholesale Price Indicator

Econ 300/QAC 201: Quantitative Methods in Economics/Applied Data Analysis. 17th Class 7/1/10

STAT 436 / Lecture 16: Key

Lecture 3: Autoregressive Moving Average (ARMA) Models and their Practical Applications

Final Examination 7/6/2011

STAT Regression Methods

Trending Models in the Data

Hypothesis testing Goodness of fit Multicollinearity Prediction. Applied Statistics. Lecturer: Serena Arima

Ch 6. Model Specification. Time Series Analysis

Time Series and Forecasting

Study of Time Series and Development of System Identification Model for Agarwada Raingauge Station

ARIMA modeling to forecast area and production of rice in West Bengal

Austrian Inflation Rate

WORKSHOP. Introductory Econometrics with EViews. Asst. Prof. Dr. Kemal Bağzıbağlı Department of Economic

Econometrics for Policy Analysis A Train The Trainer Workshop Oct 22-28, 2016 Organized by African Heritage Institution

Analysis of Violent Crime in Los Angeles County

Ross Bettinger, Analytical Consultant, Seattle, WA

Unit root problem, solution of difference equations Simple deterministic model, question of unit root

Short-run electricity demand forecasts in Maharashtra

Available online at ScienceDirect. Procedia Computer Science 72 (2015 )

Time Series Analysis of United States of America Crude Oil and Petroleum Products Importations from Saudi Arabia

COMPUTER SESSION 3: ESTIMATION AND FORECASTING.

Author: Yesuf M. Awel 1c. Affiliation: 1 PhD, Economist-Consultant; P.O Box , Addis Ababa, Ethiopia. c.

Econometrics Part Three

Econ 423 Lecture Notes: Additional Topics in Time Series 1

Transcription:

Analyzing And Predicting The Average Monthly Price of Gold Lucas Van Cleef Professor Madonia Economic Forecasting 7/16/16 Like many other precious gemstones and metals, the high volume of sales and consumption associated with gold has led to meticulous record being kept in terms of its price at any time. This data, when correctly analyzed in time series format, offers insight into both patterns found in the realized values as well as predictions of future values. This information is of particular importance due to the fact that gold is a commodity commonly bought for the sake of resale later, thus an accurate predictive model regarding its price has profitable applications. In this paper I will be attempting to correctly model, analyze, and predict the average monthly price of gold, according to data provided by the World Gold Council. The data used in this study comes from Quandl.com as was originally provided by the World Gold Council. This data spans from December 1978 to November 2015, and records the average price of gold for that month in US dollars. This provides a sample size of 563 monthly time periods, for the relevant dependant variable of Value, referring to the dollar amount of gold s average price per ounce in that month. A cursory view of the graph 1 reveals that for the majority of the observed time period, the price of gold fluctuated steadily within the range of 350-600$, following a pronounced spike in the very first few periods. This flatter region, which does not appear to be stationary according to R s adf.test function, is then followed by a dramatic positive spike in the series which peaks at a price level of $1772 before falling, a price 1 Appendix A-1

more than three times the mean of 570.5, and the median value of 391.7 for the entire dataset. Following this peak period, the price of gold then begins a gradual downward trend towards its terminal value of $1159.25, around which it hovered over the last few periods. As mentioned prior, visual inspection of the data s plot reveals a period somewhere near the last quarter of the data, in which the price of gold begins to dramatically increase. This period is not notable only for the change in the values of gold embodied within it, but also the shape of the distribution, which is inconsistent with the plot prior to this change. Because of this glaring abnormality, I will be testing the data for a structural break within this partition of the data. Going beyond the plot, an ACF 2 of the variable Value confirms the suspicion of non-linearity over time in the untreated data. In order to compensate for this nonstationarity, I difference the variable by one order, creating the variable Value.delta. An ACF 3 of this differenced series reveals a complete lack of significant spikes, indicating that the autocorrelation associated with the original data does not pervade into its differenced form. The PACF 4 of the differenced data reveals marginally significant spikes at lag 1 and lag 7, from which I surmise that 1 order of autoregression may need to be included in my model, whereas I conclude that the significant lag at 7 may be entirely due to happenstance. The aforementioned observations lead me to an Arima(1,1,0) model, which when tested against an Arima(1,1,1) model, which I also considered, reveals a lower AIC. 2 Appendix A-2 3 Appendix A-3 4 Appendix A-4

The fit over my models residuals over my plot is mostly accurate 5, with some noticeable deviations from the original time series. My QQPlot 6 and density plot 7 of the residuals however reveal that their distribution is not normal and that my model may be flawed. A plot of the residuals 8 reveals several conspicuous areas of erratic peaks of large magnitude, indicating to me that heteroskedasticity may be a culprit in the weakness of my model. Before reaching any conclusions regarding the fit of my original model, I decided to test my model for a structural break. While the visual plot of my data appears to reveal a structural break at around 400, using a dummy Chow Test does not give me a significant result for its coefficient until time period 478. A second Chow Test using the F method for the model, broken at 478, also indicates the presence of a structural break between the periods. Because of this, I determine that there is evidence that the structural break observed in plot does indeed exist, albeit not at the originally suspected point. From the ACF 9 of my two new plots, it is apparent that both require differencing to become stationary. ACFs and PACFs of my new separate time series 10, differenced, indicate that my new models are Arima(1,1,0) for the pre-break period, and Arima(0,1,0) for my post-break period. Despite skepticism, I accept this Arima(0,1,0) specification in the post period as I have no significant spikes for my ACF or PACF of that series, and adding terms on either side lowers the fit of the model. Testing the residuals of models I derive for these two new series, the residuals for the post-break 5 Appendix A-5 6 Appendix A-6 7 Appendix A-7 8 Appendix A-8 9 Appendix B-1 (Pre-Break) and Appendix C-1 (Post-Break) 10 Appendix B-2 and B-3 (Pre-Break) and Appendix C-2 and C-3 (Post-Break)

model look orderly by all the tests 11, though the aforementioned issues with the residuals in the full model emerge when looking at the pre-break time series 12. After squaring the residuals of my pre-break time series, the ACF 13 and PACF 14 of this plot reveal significant spikes at order 2 lag on both functions. This, along with clusters of erratic distribution at the beginning and end of the plot of my residuals, cause me to believe there is heteroskedasticity in my model. Starting with a GARCH(2,2) model, I attempt to compensate for the suspected heteroskedasticity, and find that the coefficients for my Q terms are insignificant and that the Box-Ljung test rejects the null that the squared residuals are uncorrelated. By paring down to GARCH(0,1), I find that both my p coefficient, as well as the intercept of the GARCH model, are significant. The QQ plot 15 of my GARCH adjusted residuals reveals a much more normal distribution, while the density function would not run due to missing values. Further, the fit of the model with the GARCH adjusted residuals is close to perfect. 16 Though GARCH(0,2) revealed a significant coefficient on the additional autoregressive term, and a lower p-value in its box-ljung test, the AIC of the more parsimonious GARCH(0,1) indicates to me that it is the better model. Using Rs predict function, I attempt to forecast the value of Gold in the forthcoming 2 years, or 24 time periods. Additionally, I attempt to predict my pre-break model 24 periods beyond itself, in order to determine its predictions compared to the actual realized observations of the post-break period. Predicting my higher, and more recent model, out 24 periods gives me the same prediction of 1159.25 for every period, 11 Appendix C-4, C-5, and C-6 12 Appendix B-4 and B-5 13 Appendix B-6 14 Appendix B-7 15 Appendix B-8 16 Appendix B-9

with an increasing standard error with time. This same thing happened at any point within the data from which I attempted to predict forward, as if the data did not preexist. This may be due to the seemingly random and unpatterned nature of the series in this post-break period, or the fact that ARIMA model does not include any AR or MA regressors. Predicting my pre-break model, however, was not as easy as the post-break version. When attempting to include my GARCH(0,1) model into my prediction, I discovered that the method by which this is done in R requires the use of a garchfit function, which only works when GARCH is applied to an AR, MA, or ARMA model, not an ARIMA as in the case of my model specification. Merely predicting the ARIMA model 24 periods further yields a constant prediction of 1043.16 with a decreasing standard error. Similar to the predictions of the pre-break model. In conclusion, my analysis determines that my original concerns about a structural break were valid, as well as presenting the additional possibility of heteroskedasticity being present. Using the Chow Test, and Box-Ljung test, as well as standard plots, ACFs, and PACFs, I was able to test for and identify the nature of these concerns. In turn I was able to separate my model at its potential structural break, and use GARCH to better fit the residuals of my ARIMA model in the pre-break period. Though my analysis was thorough and insightful concerning the nature of my data, my predictions do not appear to be as discerning. Whether this is due to the nature of the data, the simplicity of the modeling techniques I have used, or some misstep in my analysis, I have yet to determine at the time of this study s completion.

Appendix A: Full Dataset A-1

A-2

A-3

A-4

A-5

A-6

A-7

A-8

Appendix B: Pre-Break Dataset (Value.lower) B-1

B-2

B-3

B-4

B-5

B-6

Appendix B-7

B-8

B-9

Appendix C: Post-Break Dataset (Value.higher) C-1

C-2

C-3

C-4

References 1. WGC Gold Prices (Monthly Average) - Currency USD. (n.d.). Retrieved July 16, 2016, from https://www.quandl.com/data/wgc/gold_monavg_usd-gold- Prices-Monthly-Average-Currency-USD