AR(p) + I(d) + MA(q) = ARIMA(p, d, q)

Similar documents
STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9)

STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9) Outline. Return Rate. US Gross National Product

FE570 Financial Markets and Trading. Stevens Institute of Technology

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

TIME SERIES ANALYSIS AND FORECASTING USING THE STATISTICAL MODEL ARIMA

FORECASTING SUGARCANE PRODUCTION IN INDIA WITH ARIMA MODEL

STAT Financial Time Series

Time Series I Time Domain Methods

STAT 436 / Lecture 16: Key

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

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

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

Dynamic Time Series Regression: A Panacea for Spurious Correlations

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

Chapter 8: Model Diagnostics

Ch 6. Model Specification. Time Series Analysis

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

Univariate ARIMA Models

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

AR, MA and ARMA models

Stat 5100 Handout #12.e Notes: ARIMA Models (Unit 7) Key here: after stationary, identify dependence structure (and use for forecasting)

Univariate Time Series Analysis; ARIMA Models

Lecture Notes of Bus (Spring 2017) Analysis of Financial Time Series Ruey S. Tsay

Booth School of Business, University of Chicago Business 41914, Spring Quarter 2017, Mr. Ruey S. Tsay. Solutions to Midterm

Time Series Outlier Detection

Stat 565. (S)Arima & Forecasting. Charlotte Wickham. stat565.cwick.co.nz. Feb

Empirical Market Microstructure Analysis (EMMA)

Using Analysis of Time Series to Forecast numbers of The Patients with Malignant Tumors in Anbar Provinc

Chapter 6: Model Specification for Time Series

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

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

Ch 5. Models for Nonstationary Time Series. Time Series Analysis

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

Chapter 5: Models for Nonstationary Time Series

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

Forecasting. Simon Shaw 2005/06 Semester II

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

CHAPTER 8 FORECASTING PRACTICE I

A SEASONAL TIME SERIES MODEL FOR NIGERIAN MONTHLY AIR TRAFFIC DATA

Suan Sunandha Rajabhat University

Booth School of Business, University of Chicago Business 41914, Spring Quarter 2017, Mr. Ruey S. Tsay Midterm

Minitab Project Report - Assignment 6

EASTERN MEDITERRANEAN UNIVERSITY ECON 604, FALL 2007 DEPARTMENT OF ECONOMICS MEHMET BALCILAR ARIMA MODELS: IDENTIFICATION

Advanced Econometrics

Econometrics I: Univariate Time Series Econometrics (1)

Modelling using ARMA processes

Lecture 7: Model Building Bus 41910, Time Series Analysis, Mr. R. Tsay

University of Oxford. Statistical Methods Autocorrelation. Identification and Estimation

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

ARMA (and ARIMA) models are often expressed in backshift notation.

Modelling Monthly Rainfall Data of Port Harcourt, Nigeria by Seasonal Box-Jenkins Methods

γ 0 = Var(X i ) = Var(φ 1 X i 1 +W i ) = φ 2 1γ 0 +σ 2, which implies that we must have φ 1 < 1, and γ 0 = σ2 . 1 φ 2 1 We may also calculate for j 1

STAT STOCHASTIC PROCESSES. Contents

ARIMA Models. Jamie Monogan. January 16, University of Georgia. Jamie Monogan (UGA) ARIMA Models January 16, / 27

TMA4285 December 2015 Time series models, solution.

Problems from Chapter 3 of Shumway and Stoffer s Book

ARIMA Models. Richard G. Pierse

Autoregressive Moving Average (ARMA) Models and their Practical Applications

STA 6857 Estimation and ARIMA Models ( 3.6 cont. and 3.7)

Applied time-series analysis

Ch 8. MODEL DIAGNOSTICS. Time Series Analysis

{ } Stochastic processes. Models for time series. Specification of a process. Specification of a process. , X t3. ,...X tn }

Classic Time Series Analysis

Final Examination 7/6/2011

We will only present the general ideas on how to obtain. follow closely the AR(1) and AR(2) cases presented before.

Time Series Analysis

Seasonal Autoregressive Integrated Moving Average Model for Precipitation Time Series

Lab: Box-Jenkins Methodology - US Wholesale Price Indicator

Quantitative Finance I

STAT 443 Final Exam Review. 1 Basic Definitions. 2 Statistical Tests. L A TEXer: W. Kong

Multivariate Time Series: VAR(p) Processes and Models

Transformations for variance stabilization

ibm: daily closing IBM stock prices (dates not given) internet: number of users logged on to an Internet server each minute (dates/times not given)

Marcel Dettling. Applied Time Series Analysis SS 2013 Week 05. ETH Zürich, March 18, Institute for Data Analysis and Process Design

Homework 4. 1 Data analysis problems

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

The ARIMA Procedure: The ARIMA Procedure

CHAPTER 8 MODEL DIAGNOSTICS. 8.1 Residual Analysis

MAT3379 (Winter 2016)

APPLIED ECONOMETRIC TIME SERIES 4TH EDITION

2. An Introduction to Moving Average Models and ARMA Models

ITSM-R Reference Manual

ECON/FIN 250: Forecasting in Finance and Economics: Section 8: Forecast Examples: Part 1

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

3 Theory of stationary random processes

Stochastic Modelling Solutions to Exercises on Time Series

Seasonality. Matthieu Stigler January 8, Version 1.1

A SARIMAX coupled modelling applied to individual load curves intraday forecasting

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

Introduction to Time Series Analysis. Lecture 11.

Econometrics for Policy Analysis A Train The Trainer Workshop Oct 22-28, 2016

Econ 623 Econometrics II Topic 2: Stationary Time Series

Automatic seasonal auto regressive moving average models and unit root test detection

ARIMA Models. Jamie Monogan. January 25, University of Georgia. Jamie Monogan (UGA) ARIMA Models January 25, / 38

Ross Bettinger, Analytical Consultant, Seattle, WA

Time Series Examples Sheet

Econometric Forecasting

4. MA(2) +drift: y t = µ + ɛ t + θ 1 ɛ t 1 + θ 2 ɛ t 2. Mean: where θ(l) = 1 + θ 1 L + θ 2 L 2. Therefore,

A Data-Driven Model for Software Reliability Prediction

ECON/FIN 250: Forecasting in Finance and Economics: Section 7: Unit Roots & Dickey-Fuller Tests

Transcription:

AR(p) + I(d) + MA(q) = ARIMA(p, d, q)

Outline 1 4.1: Nonstationarity in the Mean 2 ARIMA Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 2/ 19

Deterministic Trend Models Polynomial Trend Consider the time series The mean function of this process is So this process is not stationary. More generally, the time series Z t = α 0 + α 1 t + a t µ t = α + α 1 t Z t = α 0 + α 1 t + + α k t k + a t has a kth-order polynomial mean function µ t = α 0 + α 1 t + + α k t k Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 3/ 19

Deterministic Trend Models Polynomial Trend Consider the time series The mean function of this process is So this process is not stationary. More generally, the time series Z t = α 0 + α 1 t + a t µ t = α + α 1 t Z t = α 0 + α 1 t + + α k t k + a t has a kth-order polynomial mean function µ t = α 0 + α 1 t + + α k t k Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 3/ 19

Deterministic Trend Models Polynomial Trend Consider the time series The mean function of this process is So this process is not stationary. More generally, the time series Z t = α 0 + α 1 t + a t µ t = α + α 1 t Z t = α 0 + α 1 t + + α k t k + a t has a kth-order polynomial mean function µ t = α 0 + α 1 t + + α k t k Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 3/ 19

Deterministic Trend Models Polynomial Trend Consider the time series The mean function of this process is So this process is not stationary. More generally, the time series Z t = α 0 + α 1 t + a t µ t = α + α 1 t Z t = α 0 + α 1 t + + α k t k + a t has a kth-order polynomial mean function µ t = α 0 + α 1 t + + α k t k Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 3/ 19

Deterministic Trend Models Sinusoidal Frequency Consider the time series Z t = ν 0 + ν cos(ωt + θ) + a t = ν 0 + α cos(ωt) + β sin(ωt) + a t where α = α 2 + β 2 cos(θ) and β = α 2 + β 2 sin(θ) More generally, m Z t = ν 0 + (α j cos(ω j t) + β j sin(ω j t)) + a t j=1 is the model of hidden periodicities". Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 4/ 19

Deterministic Trend Models Sinusoidal Frequency Consider the time series Z t = ν 0 + ν cos(ωt + θ) + a t = ν 0 + α cos(ωt) + β sin(ωt) + a t where α = α 2 + β 2 cos(θ) and β = α 2 + β 2 sin(θ) More generally, m Z t = ν 0 + (α j cos(ω j t) + β j sin(ω j t)) + a t j=1 is the model of hidden periodicities". Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 4/ 19

Outline 1 4.1: Nonstationarity in the Mean 2 ARIMA Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 5/ 19

ARIMA Definition Recall the difference operator Z t = (1 B)Z t = Z t Z t 1 And more generally d Z t = (1 B) d Z t Definition (ARIMA) A process is said to be ARIMA(p,d,q) if d Z t = (1 B) d Z t is ARMA(p, q). Therefore an ARIMA(p,d,q) model (with mean zero) can be written as φ(b)(1 B) d Z t = θ(b)a t Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 6/ 19

ARIMA Definition Recall the difference operator Z t = (1 B)Z t = Z t Z t 1 And more generally d Z t = (1 B) d Z t Definition (ARIMA) A process is said to be ARIMA(p,d,q) if d Z t = (1 B) d Z t is ARMA(p, q). Therefore an ARIMA(p,d,q) model (with mean zero) can be written as φ(b)(1 B) d Z t = θ(b)a t Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 6/ 19

ARIMA Definition Recall the difference operator Z t = (1 B)Z t = Z t Z t 1 And more generally d Z t = (1 B) d Z t Definition (ARIMA) A process is said to be ARIMA(p,d,q) if d Z t = (1 B) d Z t is ARMA(p, q). Therefore an ARIMA(p,d,q) model (with mean zero) can be written as φ(b)(1 B) d Z t = θ(b)a t Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 6/ 19

ARIMA Definition Recall the difference operator Z t = (1 B)Z t = Z t Z t 1 And more generally d Z t = (1 B) d Z t Definition (ARIMA) A process is said to be ARIMA(p,d,q) if d Z t = (1 B) d Z t is ARMA(p, q). Therefore an ARIMA(p,d,q) model (with mean zero) can be written as φ(b)(1 B) d Z t = θ(b)a t Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 6/ 19

Return Rate Suppose Z t is the value of an investment at time t and p t is the percentage changes from t 1 to t (which may be negative). Therefore we have Z t = (1 + p t )Z t 1 Taking logs produces or equivalently log(z t ) = log(1 + p t ) + log(z t 1 ) log(z t ) = log(z t ) log(z t 1 ) = log(1 + p t ) p t where the approximation holds when p t is close to zero. Another representation of log(z t ) is log(z t ) = log(z t ) log(z t 1 ) = log ( Zt Z t 1 ). Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 7/ 19

Return Rate Suppose Z t is the value of an investment at time t and p t is the percentage changes from t 1 to t (which may be negative). Therefore we have Z t = (1 + p t )Z t 1 Taking logs produces or equivalently log(z t ) = log(1 + p t ) + log(z t 1 ) log(z t ) = log(z t ) log(z t 1 ) = log(1 + p t ) p t where the approximation holds when p t is close to zero. Another representation of log(z t ) is log(z t ) = log(z t ) log(z t 1 ) = log ( Zt Z t 1 ). Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 7/ 19

Return Rate Suppose Z t is the value of an investment at time t and p t is the percentage changes from t 1 to t (which may be negative). Therefore we have Z t = (1 + p t )Z t 1 Taking logs produces or equivalently log(z t ) = log(1 + p t ) + log(z t 1 ) log(z t ) = log(z t ) log(z t 1 ) = log(1 + p t ) p t where the approximation holds when p t is close to zero. Another representation of log(z t ) is log(z t ) = log(z t ) log(z t 1 ) = log ( Zt Z t 1 ). Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 7/ 19

Return Rate Suppose Z t is the value of an investment at time t and p t is the percentage changes from t 1 to t (which may be negative). Therefore we have Z t = (1 + p t )Z t 1 Taking logs produces or equivalently log(z t ) = log(1 + p t ) + log(z t 1 ) log(z t ) = log(z t ) log(z t 1 ) = log(1 + p t ) p t where the approximation holds when p t is close to zero. Another representation of log(z t ) is log(z t ) = log(z t ) log(z t 1 ) = log ( Zt Z t 1 ). Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 7/ 19

US Gross National Product We consider the seasonally adjusted quarterly US GNP from 1947(1) to 2003(3) giving a total of n = 223 observations. http://research.stlouisfed.org/ (Economic Data FREDR Gross Domestic Product (GDP) and Components GDP/GNP GNP) > gnp96 = read.table("mydata/gnp96.dat") > gnp = ts(gnp96[,2], start=1947, frequency=4) > plot(gnp,lwd=3) Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 8/ 19

GDP and Housing Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 9/ 19

US Gross National Product (cont) Just for kicks, lets look at the acf. > acf(gnp, 50) Simple differencing may not be the answer. > plot(diff(gnp)) Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 10/ 19

Percentage Quarterly Growth of US GNP Instead, we consider the growth rate Z t = log(z t ). > gnpgr = diff(log(gnp)) # growth rate > plot.ts(gnpgr) Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 11/ 19

Modeling Percentage Quarterly Growth of US GNP The plots of the ACF and PACF of the GNP growth rate indicates two potential models for the log GNP series: ARIMA(0,1,2) ARIMA(1,1,0) We fit AR(1) to log(gnp). > (gnpgr.ar = arima(gnpgr, order = c(1, 0, 0))) Call: arima(x = gnpgr, order = c(1, 0, 0)) Coefficients: ar1 intercept 0.3467 0.0083 s.e. 0.0627 0.0010 sigma^2 estimated as 9.03e-05: log likelihood = 718.61, aic = -1431.22 Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 12/ 19

Modeling in R R says intercept but means mean. Therefore the fitted model is Z t.0083 =.347(Z t 1.0083) + a t or equivalently Z t =.005 +.347Z t 1 + a t i.e. if α is the intercept and µ is the mean, then α = µ(1 φ) Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 13/ 19

Modeling in R From the expression α = µ(1 φ), we see σ α = σ m u(1 φ). Therefore we can write down the fitted model which incorporates the standard errors of the estimators Z t =.005 (.0006) +.347 (.063) Z t 1 + a t and σ = 9.03 10 5.0095. Also R has an issue with the I part of ARIMA fits where there is an AR component, so first difference the data then fit an ARMA model. Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 14/ 19

Modeling Percentage Quarterly Growth of US GNP We fit MA(2) to log(gnp). > (gnpgr.ma = arima(gnpgr, order = c(0, 0, 2))) Call: arima(x = gnpgr, order = c(0, 0, 2)) Coefficients: ma1 ma2 intercept 0.3028 0.2035 0.0083 s.e. 0.0654 0.0644 0.0010 sigma^2 estimated as 8.92e-05: log likelihood = 719.96, aic = -1431.93 The R output indicates the model with σ =.0094. Z t =.0083 (.001) +.303 (.065) a t 1 +.204 (.064) a t 2 + w t Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 15/ 19

The Two Models Aren t That Different The first 10 terms of the MA( ) representation of the AR(1) model is computed in R as > ARMAtoMA(ar=.35, ma=0, 10) # prints psi-weights [1] 3.500000e-01 1.225000e-01 4.287500e-02 1.500625e-02 [5] 5.252187e-03 1.838266e-03 6.433930e-04 2.251875e-04 [9] 7.881564e-05 2.758547e-05 So one (rather crude) approximation to the model Z t =.35Z t 1 + a t is Z t =.35a t 1 + 1.23a t 2 + a t which is close to the fitted MA(2) model Z t =.0083 (.001) +.303 (.065) a t 1 +.204 (.064) a t 2 + w t. Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 16/ 19

Diagnostic Checking Investigate the residuals Z t x t t 1 or standardized residuals e t = Z t x t t 1 P t 1 t If the model fits well, the residuals should behave like an iid sequence with mean zero and variance one. Diagnostic Checks Check the plot of Standardized residuals for patterns and outliers. Check the ACF, ˆρ, for significance lags. Use the Ljung-Box-Pierce Q-statistic to measure collective autocorralative (not just significance at a single lag). The Ljung-Box-Pierce Q-statistic is given as H ρ 2 Q = n(n + 2) e(h) n h Under the null of model adequacy, Q as the asymptotic distribution Q χ 2 H p q. Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 17/ 19 h=1

Diagnostic Checking of gnpgr.ma > tsdiag(gnpgr.ma, gof.lag=20) Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 18/ 19

Model Selection in US GNP Series n = length(gnpgr) kma = length(gnpgr.ma$coef) sma=gnpgr.ma$sigma2 kar = length(gnpgr.ar$coef) sar=gnpgr.ar$sigma2 # AIC Returned Value log(sma) + (n+2*kma)/n # MA2-8.298 log(sar) + (n+2*kar)/n # AR1-8.294 # AICc log(sma) + (n+kma)/(n-kma-2) # MA2-8.288 log(sar) + (n+kar)/(n-kar-2) # AR1-8.285 # BIC log(sma) + kma*log(n)/n # MA2-9.252 log(sar) + kar*log(n)/n # AR1-9.264 # sample size # number of parameters in ma model # mle of sigma^2 # number of parameters in ar model # mle of sigma^2 Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 19/ 19