Forecasting. This optimal forecast is referred to as the Minimum Mean Square Error Forecast. This optimal forecast is unbiased because

Similar documents
Chapter 9: Forecasting

Ch 9. FORECASTING. Time Series Analysis

7. Forecasting with ARIMA models

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

Forecasting with ARMA

ESSE Mid-Term Test 2017 Tuesday 17 October :30-09:45

1 Linear Difference Equations

STAT Financial Time Series

University of Oxford. Statistical Methods Autocorrelation. Identification and Estimation

6.3 Forecasting ARMA processes

Problem Set 2: Box-Jenkins methodology

3. ARMA Modeling. Now: Important class of stationary processes

X t = a t + r t, (7.1)

Statistics 349(02) Review Questions

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

Lesson 9: Autoregressive-Moving Average (ARMA) models

MAT 3379 (Winter 2016) FINAL EXAM (PRACTICE)

Module 3. Descriptive Time Series Statistics and Introduction to Time Series Models

Econometrics II Heij et al. Chapter 7.1

Module 4. Stationary Time Series Models Part 1 MA Models and Their Properties

Stochastic Modelling Solutions to Exercises on Time Series

Chapter 4: Models for Stationary Time Series

2. An Introduction to Moving Average Models and ARMA Models

Ch 6. Model Specification. Time Series Analysis

Università di Pavia. Forecasting. Eduardo Rossi

Levinson Durbin Recursions: I

Time Series Examples Sheet

Calculation of ACVF for ARMA Process: I consider causal ARMA(p, q) defined by

Sampling Distributions

We use the centered realization z t z in the computation. Also used in computing sample autocovariances and autocorrelations.

Lecture 8: ARIMA Forecasting Please read Chapters 7 and 8 of MWH Book

Time Series Outlier Detection

Part III Example Sheet 1 - Solutions YC/Lent 2015 Comments and corrections should be ed to

ITSM-R Reference Manual

Introduction to ARMA and GARCH processes

Review Session: Econometrics - CLEFIN (20192)

Exercises - Time series analysis

γ 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

Time Series Examples Sheet

Levinson Durbin Recursions: I

APPLIED ECONOMETRIC TIME SERIES 4TH EDITION

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

Univariate ARIMA Forecasts (Theory)

3 Theory of stationary random processes

FE570 Financial Markets and Trading. Stevens Institute of Technology

Statistics 910, #15 1. Kalman Filter

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

A Data-Driven Model for Software Reliability Prediction

Modelling using ARMA processes

White noise processes

MAT 3379 (Winter 2016) FINAL EXAM (SOLUTIONS)

Univariate Time Series Analysis; ARIMA Models

ECON 616: Lecture 1: Time Series Basics

ARIMA Modelling and Forecasting

Ch 4. Models For Stationary Time Series. Time Series Analysis

INTRODUCTION TO TIME SERIES ANALYSIS. The Simple Moving Average Model

A time series is called strictly stationary if the joint distribution of every collection (Y t

{ ϕ(f )Xt, 1 t n p, X t, n p + 1 t n, { 0, t=1, W t = E(W t W s, 1 s t 1), 2 t n.

Variance reduction. Michel Bierlaire. Transport and Mobility Laboratory. Variance reduction p. 1/18

Time Series I Time Domain Methods

MATH 5075: Time Series Analysis

Econ 4120 Applied Forecasting Methods L10: Forecasting with Regression Models. Sung Y. Park CUHK

Forecasting. Simon Shaw 2005/06 Semester II

Lecture 4a: ARMA Model

interval forecasting

TMA4285 December 2015 Time series models, solution.

Chapter 6: Model Specification for Time Series

Stochastic Processes: I. consider bowl of worms model for oscilloscope experiment:

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

Class 1: Stationary Time Series Analysis

Chapter 3. ARIMA Models. 3.1 Autoregressive Moving Average 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 BRIEFING 1970

Next tool is Partial ACF; mathematical tools first. The Multivariate Normal Distribution. e z2 /2. f Z (z) = 1 2π. e z2 i /2

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

5 Transfer function modelling

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

Minitab Project Report - Assignment 6

Principles of forecasting

Lecture 16: State Space Model and Kalman Filter Bus 41910, Time Series Analysis, Mr. R. Tsay

Autoregressive Moving Average (ARMA) Models and their Practical Applications

Ch. 14 Stationary ARMA Process

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

Covariances of ARMA Processes

Lecture 2: Univariate Time Series

Statistics 910, #5 1. Regression Methods

Regression of Time Series

STAT 720 sp 2019 Lec 06 Karl Gregory 2/15/2019

Univariate Nonstationary Time Series 1

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

Identifiability, Invertibility

Midterm Suggested Solutions

Ch. 15 Forecasting. 1.1 Forecasts Based on Conditional Expectations

Discrete time processes

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

Optimization and Simulation

STA 6857 Estimation ( 3.6)

Lecture 1: Fundamental concepts in Time Series Analysis (part 2)

Probabilistic Graphical Models

ECON/FIN 250: Forecasting in Finance and Economics: Section 6: Standard Univariate Models

Transcription:

Forecasting 1. Optimal Forecast Criterion - Minimum Mean Square Error Forecast We have now considered how to determine which ARIMA model we should fit to our data, we have also examined how to estimate the parameters in the ARIMA model and how to examine the goodness of fit of our model. So we are finally in a position to use our model to forecast new values for our time series. Suppose we have observed a time series up to time T, so that we have known values for X 1, X 2,, X T, and subsequently, we also know Z 1, Z 2,, Z T. This collection of information we know will be denoted as: I T = {X 1, X 2,, X T ; Z 1, Z 2,, Z T } Suppose that we want to forecast a value for X T+k, k time units into the future. We now introduce the most prevalent optimality criterion for forecasting. Theorem: The optimal k-step ahead forecast X T+k,T (which is a function of I T ) that will minimize the mean square error, is E(X T+k X T+k,T ) 2 X T+k,T = E(X T+k I T ) This optimal forecast is referred to as the Minimum Mean Square Error Forecast. This optimal forecast is unbiased because E(X T+k X T+k,T ) = E [E ((X T+k X T+k,T ) I T )] = E[X T+k,T X T+k,T ] = 0 Lemma: Suppose Z and W are real random variables, then min h E [(Z h(w)) 2 ] = E [(Z E(Z W)) 2 ] 1

That is, the posterior mean E(Z W) will minimize the quadratic loss (mean square error). Proof: E [(Z h(w)) 2 ] = E [(Z E(Z W) + E(Z W) h(w)) 2 ] = E [(Z E(Z W)) 2 ] + 2E[(Z E(Z W))(E(Z W) h(w))] +E [(E(Z W) h(w)) 2 ] Conditioning on W, the cross term is zero. Thus E [(Z h(w)) 2 ] = E [(Z E(Z W)) 2 ] + E [(E(Z W) h(w)) 2 ] Note: We usually omit the word optimal in the K Periods Ahead (Optimal) Forecast, because in the time series context, when we refer to forecast, we mean the optimal minimum mean square error forecast, by default. 2

2. Forecast in MA(1) The MA(1) model is: X t = Z t + θz t 1, where Z t ~WN(0, σ 2 ) Given the observed data {X 1, X 2,, X T }, the white noise term Z t is not directly observed, however, we can perform an Recursive Estimation of the White Noise as follows: Given the initial condition Z 0 (not important), we have: Z 1 = X 1 θz 0 Z 2 = X 2 θz 1 Z T = X T θz T 1 Therefore, given {X 1, X 2,, X T }, we can also obtain {Z 1, Z 2,, Z T }, the entire information known can thus be written as: I T = {X 1, X 2,, X T ; Z 1, Z 2,, Z T } Since X T+1 = Z T+1 + θz T, the one period ahead (optimal) forecast is X T+1,T = E(X T+1 I T ) = E(Z T+1 + θz T I T ) = E(Z T+1 I T ) + θe(z T I T ) = E(Z T+1 ) + θe(z T Z T ) = 0 + θz T = θz T Note: Per convention in time series literature, we wrote: E(Z T Z T ) = Z T Although one can write this more rigorously as: E(Z T Z T = z T ) = z T Similarly, we wrote E(X T X T ) = X T, which can be written more rigorously as: E(X T X T = x T ) = x T e T+1,T = X T+1 X T+1,T = Z T+1 Since the forecast is unbiased, the minimum mean square error is equal to the forecast error variance: E(X T+1 X T+1,T ) 2 = Var(X T+1 X T+1,T ) = Var(Z T+1 ) = σ 2 Given I T = {X 1, X 2,, X T ; Z 1, Z 2,, Z T }, and X T+2 = Z T+2 + θz T+1, the two periods ahead (optimal) forecast is X T+2,T = E(X T+2 I T ) = E(Z T+2 + θz T+1 I T ) = E(Z T+2 I T ) + θe(z T+1 I T ) = 0 + θ 0 = 0 3

e T+2,T = X T+2 X T+2,T = Z T+2 + θz T+1 Since the forecast is unbiased, the minimum mean square error is equal to the forecast error variance: E(X T+2 X T+2,T ) 2 = Var(X T+2 X T+2,T ) = Var(Z T+2 + θz T+1 ) = (1 + θ 2 )σ 2 In summary, for more than one period ahead, just like the two-periods ahead forecast, the forecast is zero, the unconditional mean. That is, X T+2,T = E(X T+2 I T ) = 0 X T+3,T = E(X T+3 I T ) = 0 The MA(1) process is not forecastable for more than one period ahead (apart from the unconditional mean). Forecast for MA(1) with Intercept (non-zero mean) If the MA(1) model includes an intercept X t = μ+z t + θz t 1, where Z t ~WN(0, σ 2 ) We can perform forecasting using the same approach. For example, since X T+1 = μ+z T+1 + θz T, the one period ahead (optimal) forecast is X T+1,T = E(X T+1 I T ) = E(μ + Z T+1 + θz T I T ) = μ + E(Z T+1 I T ) + θe(z T I T ) = μ + 0 + θz T = μ + θz T e T+1,T = X T+1 X T+1,T = Z T+1 Since the forecast is unbiased, the minimum mean square error is equal to the forecast error variance: E(X T+1 X T+1,T ) 2 = Var(X T+1 X T+1,T ) = Var(Z T+1 ) = σ 2 3. Generalization to MA(q): For a MA(q) process, we can forecast up to q out-of-sample periods. Can you write down the (optimal) point forecast for each period, the forecast error, and the forecast error variance? Please practice before the exam. 4. Forecast in AR(1) For the AR(1) model, X t = X t 1 +Z t, where Z t ~WN(0, σ 2 ) Given I T = {X 1, X 2,, X T ; Z 1, Z 2,, Z T }; The One Period Ahead (Optimal) Forecast can be computed as follows: 4

X T+1 = X T +Z T+1 So, given data I T, the one period ahead forecast is X T+1,T = E(X T+1 I T ) = E( X T +Z T+1 I T ) = E( X T I T ) + E(Z T+1 I T ) = X T + 0 = X T e T+1,T = X T+1 X T+1,T = Z T+1 The forecast error variance: Var(e T+1,T ) = Var(Z T+1 ) = σ 2 Two Periods Ahead Forecast By back-substitution X T+2 = X T+1 +Z T+2 X T+2 = ( X T +Z T+1 )+Z T+2 X T+2 = 2 X T + Z T+1 +Z T+2 So, given data I T, the two periods ahead (optimal) forecast is X T+2,T = E(X T+2 I T ) = E( 2 X T + Z T+1 +Z T+2 I T ) = 2 X T + 0 + 0 = 2 X T That is, the 2 periods ahead forecast is also a linear function of the final observed value, but with the coefficient 2. e T+2,T = X T+2 X T+2,T = Z T+1 +Z T+2 The forecast error variance is: Var(e T+2,T ) = Var( Z T+1 +Z T+2 ) = (1 + 2 )σ 2 K Periods Ahead Forecast Similarly X T+k = k X T + k 1 Z T+1 + + Z T+k 1 + Z T+k So, given I T, the k periods ahead optimal forecast is X T+k,T = E(X T+k I T ) = k X T AR(1) with Intercept If the AR(1) model includes an intercept X t = α + X t 1 + Z t, where Z t ~WN(0, σ 2 ) Then the one period ahead forecast is X T+1,T = E(X T+1 I T ) = α + E( X T I T ) + E(Z T+1 I T ) 5

= α + X T What is the two periods ahead forecast? Forecast AR(1) recursively. Alternatively, rather than using the back-substitution method directly as qwe have shown above, we can forecast the AR(1) recursively as follows: X T+2 = X T+1 +Z T+2 So, given data I T, the two periods ahead (optimal) forecast is X T+2,T = E(X T+2 I T ) = E( X T+1 +Z T+2 I T ) = E(X T+1 I T ) = X T+1,T Similarly, one can obtain the general recursive forecast relationship as: X T+k,T = E(X T+k I T ) = E( X T+k 1 +Z T+k I T ) = E(X T+k 1 I T ) = X T+k 1,T = = k 1 X T+1,T This way, once you have computed the one-step ahead forecast as: X T+1,T = E(X T+1 I T ) = E( X T +Z T+1 I T ) = E( X T I T ) + E(Z T+1 I T ) = X T + 0 = X T You can obtain the rest of the forecast easily. Note: As mentioned in class, I prefer the back-substitution method (introduced first) in general because it can provide you with the forecast error directly as well. 5. AR(p) Process Consider an AR(2) model with intercept X t = α + 1 X t 1 + 2 X t 2 + Z t, where Z t ~WN(0, σ 2 ) We have X T+1 = α + 1 X T + 2 X T 1 + Z T+1 Then the one period ahead forecast is X T+1,T = E(X T+1 I T ) = α + E( 1 X T I T ) + E( 2 X T 1 I T ) + E(Z T+1 I T ) = α + 1 X T + 2 X T 1 The two periods ahead forecast (by the recursive foreecasting method) is X T+2,T = E(X T+2 I T ) = α + E( 1 X T+1 I T ) + E( 2 X T I T ) + E(Z T+2 I T ) = α + 1 X T+1,T + 2 X T = α + 1 (α + 1 X T + 2 X T 1 ) + 2 X T = (1 + 1 )α + ( 1 2 + 2 )X T + 1 2 X T 1 6

Alternatively, the two periods ahead forecast (by the back-substitution method) can be derived as: X T+2 = α + 1 X T+1 + 2 X T + Z T+2 = α + 1 (α + 1 X T + 2 X T 1 + Z T+1 ) + 2 X T + Z T+2 = (1 + 1 )α + ( 1 2 + 2 )X T + 1 2 X T 1 + 1 Z T+1 + Z T+2 Therefore X T+2,T = E(X T+2 I T ) = (1 + 1 )α + ( 1 2 + 2 )X T + 1 2 X T 1 e T+2,T = X T+2 X T+2,T = 1 Z T+1 + Z T+2 The forecast error variance is: Var(e T+2,T ) = Var( 1 Z T+1 + Z T+2 ) = (1 + 2 1 )σ 2 What are the forecasts for more future periods? Please practice before the exam. 6. ARMA Process Consider an ARMA(1,1) model X t = X t 1 + Z t + θz t 1, where Z t ~WN(0, σ 2 ) Again we can use the back-substitution method to compute point forecast. X T+1 = X T + Z T+1 + θz T X T+2 = X T+1 + Z T+2 + θz T+1 = ( X T + Z T+1 + θz T ) + Z T+2 + θz T+1 One-step ahead forecast: X T+1,T = E(X T+1 I T ) = E( X T I T ) + E(Z T+1 I T ) + E(θZ T I T ) = X T + θz T Two-step ahead forecast: X T+2,T = E(X T+2 I T ) = E( X T+1 I T ) + E(Z T+2 I T ) + E(θZ T+1 I T ) = E(X T+1 I T ) = ( X T + θz T ) The two-step ahead forecast error is e T+2,T = X T+2 X T+2,T = Z T+1 + Z T+2 + θz T+1 = ( + θ)z T+1 + Z T+2 Again, since the forecast is unbiased, the minimum mean square error is equal to the forecast error variance: E(X T+2 X T+2,T ) 2 = Var(X T+2 X T+2,T ) = Var[( + θ)z T+1 + Z T+2 ] = [( + θ) 2 + 1]σ 2 7

7. ARIMA Process Suppose X t follows the ARIMA(1,1,0) model. That means its first difference Y t = X t = X t X t 1 follows the ARMA(1,0) model, which is simply the AR(1) model as follows: Y t = φy t 1 + Z t Here we assume Z t ~WN(0, σ Z 2 ) Note: we used σ Z 2 instead of σ 2 so you can get familiar with different notations. Substituting Y t = X t = X t X t 1, and Y t 1 = X t 1 = X t 1 X t 2 we can write the original ARIMA(1,1,0) model as: X t X t 1 = φ(x t 1 X t 2 ) + Z t That is: X t = (1 + φ)x t 1 φx t 2 + Z t One-step ahead forecast: X T+1,T = E[X T+1 I T ] = E[(1 + φ)x T φx T 1 + Z T+1 I T ] = (1 + φ)x T φx T 1 Thus the forecast error e T+1,T = X T+1 X T+1,T = (1 + φ)x T φx T 1 + Z T+1 [(1 + φ)x T φx T 1 ] = Z T+1 And the variance of the forecast error Var(e T+1,T ) = Var(Z T+1 ) = σ Z 2 Two-step ahead forecast: X T+2 = (1 + φ)x T+1 φx T + Z T+2 = (1 + φ)[(1 + φ)x T φx T 1 + Z T+1 ] φx T + Z T+2 = (1 + φ + φ 2 )X T (φ + φ 2 )X T 1 + Z T+2 + (1 + φ)z T+1 Therefore X T+2,T = E[X T+2 I T ] = E[(1 + φ + φ 2 )X T (φ + φ 2 )X T 1 + Z T+2 + (1 + φ)z T+1 I T ] = (1 + φ + φ 2 )X T (φ + φ 2 )X T 1 Thus the forecast error e T+2,T = X T+2 X T+2,T = Z T+2 + (1 + φ)z T+1 And the variance of the forecast error Var(e T+2,T ) = (2 + 2φ + φ 2 )σ Z 2 8. Prediction (Forecast) Error, and Prediction Interval Recall the k-step ahead prediction error is defined as e +, = X + E(X + I ) By the law of total variance: Var( ) = E[Var( X)] + Var[E( X)] 8

We can derive the variance of the prediction error: Var(e +, ) = Var(X + I ) Based on the predictor and its error variance, we may construct the prediction intervals. For example, if the X s are normally distributed, we can consider the 95% prediction interval E(X + I ) 0.02 Var(X + I ) 9