Time Series Analysis 1. Lecture 8: Time Series Analysis. Time Series Analysis MIT 18.S096. Dr. Kempthorne. Fall 2013 MIT 18.S096



Similar documents
3.1 Stationary Processes and Mean Reversion

Time Series Analysis III

Lecture 2: ARMA(p,q) models (part 3)

Time Series Analysis

Analysis and Computation for Finance Time Series - An Introduction

Univariate and Multivariate Methods PEARSON. Addison Wesley

Sales forecasting # 2

Estimating an ARMA Process

Discrete Time Series Analysis with ARMA Models

Time Series Analysis in Economics. Klaus Neusser

1 Short Introduction to Time Series

Univariate Time Series Analysis; ARIMA Models

Chapter 9: Univariate Time Series Analysis

PITFALLS IN TIME SERIES ANALYSIS. Cliff Hurvich Stern School, NYU

Performing Unit Root Tests in EViews. Unit Root Testing

Non-Stationary Time Series andunitroottests

Some useful concepts in univariate time series analysis

The VAR models discussed so fare are appropriate for modeling I(0) data, like asset returns or growth rates of macroeconomic time series.

TIME SERIES ANALYSIS

Luciano Rispoli Department of Economics, Mathematics and Statistics Birkbeck College (University of London)

Time Series in Mathematical Finance

Financial TIme Series Analysis: Part II

Time Series Analysis

Introduction to Time Series Analysis. Lecture 6.

Time Series - ARIMA Models. Instructor: G. William Schwert

Chapter 6: Multivariate Cointegration Analysis

ITSM-R Reference Manual

Lecture 4: Seasonal Time Series, Trend Analysis & Component Model Bus 41910, Time Series Analysis, Mr. R. Tsay

Chapter 5: Bivariate Cointegration Analysis

Analysis of algorithms of time series analysis for forecasting sales

Univariate Time Series Analysis; ARIMA Models

Time Series Analysis

State Space Time Series Analysis

AR(p) + MA(q) = ARMA(p, q)

Time Series Analysis of Aviation Data

Time Series Analysis

TIME SERIES ANALYSIS

Powerful new tools for time series analysis

Time Series Analysis

Forecasting the US Dollar / Euro Exchange rate Using ARMA Models

How To Model A Series With Sas

Time Series Analysis

SYSTEMS OF REGRESSION EQUATIONS

Rob J Hyndman. Forecasting using. 11. Dynamic regression OTexts.com/fpp/9/1/ Forecasting using R 1

Department of Economics

Time Series Analysis

Advanced Forecasting Techniques and Models: ARIMA

Unit Root Tests. 4.1 Introduction. This is page 111 Printer: Opaque this

Chapter 4: Vector Autoregressive Models

Time Series Analysis

MGT 267 PROJECT. Forecasting the United States Retail Sales of the Pharmacies and Drug Stores. Done by: Shunwei Wang & Mohammad Zainal

Probability and Random Variables. Generation of random variables (r.v.)

9th Russian Summer School in Information Retrieval Big Data Analytics with R

Traffic Safety Facts. Research Note. Time Series Analysis and Forecast of Crash Fatalities during Six Holiday Periods Cejun Liu* and Chou-Lin Chen

Forecasting model of electricity demand in the Nordic countries. Tone Pedersen

A Trading Strategy Based on the Lead-Lag Relationship of Spot and Futures Prices of the S&P 500

Energy Load Mining Using Univariate Time Series Analysis

Regression Analysis. Regression Analysis MIT 18.S096. Dr. Kempthorne. Fall 2013

Maximum likelihood estimation of mean reverting processes

ADVANCED FORECASTING MODELS USING SAS SOFTWARE

A course in Time Series Analysis. Suhasini Subba Rao

Unit root properties of natural gas spot and futures prices: The relevance of heteroskedasticity in high frequency data

Statistics and Probability Letters

Graphical Tools for Exploring and Analyzing Data From ARIMA Time Series Models

Chapter 5. Analysis of Multiple Time Series. 5.1 Vector Autoregressions

Empirical Properties of the Indonesian Rupiah: Testing for Structural Breaks, Unit Roots, and White Noise

Time Series Analysis: Basic Forecasting.

Is the Forward Exchange Rate a Useful Indicator of the Future Exchange Rate?

Factor analysis. Angela Montanari

THE SVM APPROACH FOR BOX JENKINS MODELS

Forecasting of Paddy Production in Sri Lanka: A Time Series Analysis using ARIMA Model

Master s Theory Exam Spring 2006

APPLICATION OF THE VARMA MODEL FOR SALES FORECAST: CASE OF URMIA GRAY CEMENT FACTORY

Promotional Analysis and Forecasting for Demand Planning: A Practical Time Series Approach Michael Leonard, SAS Institute Inc.

Chapter 1. Vector autoregressions. 1.1 VARs and the identi cation problem

In this paper we study how the time-series structure of the demand process affects the value of information

Trading Basket Construction. Mean Reversion Trading. Haksun Li

Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model

System Identification for Acoustic Comms.:

Forecasting in supply chains

Sections 2.11 and 5.8

96 PROC. OF THE 10th PYTHON IN SCIENCE CONF. (SCIPY 2011) Time Series Analysis in Python with statsmodels

The Power of the KPSS Test for Cointegration when Residuals are Fractionally Integrated

The Monte Carlo Framework, Examples from Finance and Generating Correlated Random Variables

Examining the Relationship between ETFS and Their Underlying Assets in Indian Capital Market

THE EFFECTS OF BANKING CREDIT ON THE HOUSE PRICE

Explaining Cointegration Analysis: Part II

Applied Time Series Analysis Part I

Generating Random Numbers Variance Reduction Quasi-Monte Carlo. Simulation Methods. Leonid Kogan. MIT, Sloan , Fall 2010

COMP6053 lecture: Time series analysis, autocorrelation.

TIME SERIES. Syllabus... Keywords...

Unit Labor Costs and the Price Level

Introduction to Time Series and Forecasting, Second Edition

Software Review: ITSM 2000 Professional Version 6.0.

Transcription:

Lecture 8: Time Series Analysis MIT 18.S096 Dr. Kempthorne Fall 2013 MIT 18.S096 Time Series Analysis 1

Outline Time Series Analysis 1 Time Series Analysis MIT 18.S096 Time Series Analysis 2

A stochastic process {..., X t 1, X t, X t+1,...} consisting of random variables indexed by time index t is a time series. The stochastic behavior of {X t } is determined by specifying the probability density/mass functions (pdf s) p(x t1, x t2,..., x tm ) for all finite collections of time indexes {(t 1, t 2,..., t m ), m < } i.e., all finite-dimensional distributions of {X t }. Definition: A time series {X t } is Strictly Stationary if p(t 1 + τ, t 2 + τ,..., t m + τ) = p(t 1, t 2,..., t m ), τ, m, (t 1, t 2,..., t m ). (Invariance under time translation) MIT 18.S096 Time Series Analysis 3

Definitions of Stationarity Definition: A time series {X t } is Covariance Stationary if E(X t ) = µ Var(X t ) = σ 2 X Cov(X t, X t+τ ) = γ(τ) (all constant over time t) The auto-correlation function of {X t } is ρ(τ) = Cov(X t, X t+τ )/ Var(X t ) Var(X t+τ ) = γ(τ)/γ(0) MIT 18.S096 Time Series Analysis 4

Representation Theorem Wold Representation Theorem: Any zero-mean covariance stationary time series {X t } can be decomposed as X t = V t + S t where {V t } is a linearly deterministic process, i.e., a linear combination of past values of V t with constant coefficients. S t = i=0 ψ iη t i is an infinite moving average process of error terms, where ψ 0 = 1, i=0 ψ2 i < {η t } is linearly unpredictable white noise, i.e., E(η t ) = 0, E(η 2 t ) = σ 2, E(η t η s ) = 0 t, s t, and {η t } is uncorrelated with {V t } : E(η t V s ) = 0, t, s MIT 18.S096 Time Series Analysis 5

Intuitive Application of the Wold Representation Theorem Suppose we want to specify a covariance stationary time series {X t } to model actual data from a real time series {x t, t = 0, 1,..., T } Consider the following strategy: Initialize a parameter p, the number of past observations in the linearly deterministic term of the Wold Decomposition of {X t } Estimate the linear projection of X t on (X t 1, X t 2,..., X t p ) Consider an estimation sample of size n with endpoint t 0 T. Let {j = (p 1),..., 0, 1, 2,... n} index the subseries of {t = 0, 1,..., T } corresponding to the estimation sample and define {y j : y j = x t0 n+j}, (with t 0 n + p) Define the vector Y (T 1) and matrix Z (T [p + 1]) as: MIT 18.S096 Time Series Analysis 6

Estimate the linear projection of X t on (X t 1, X t 2,..., X t p ) (continued) y1 1 y0 y 1 y (p 1) y 2 1 y 1 y 0 y (p 2) y = Z =........ yn 1 y n 1 yn 2 yn p Apply OLS to specify the projection: ŷ = Z(Z T Z) 1 Zy = Pˆ(Y t Y t 1, Y t 2,... Y t p ) = ( ŷ p) Compute the projection residual ˆɛ (p) = y ŷ (p) MIT 18.S096 Time Series Analysis 7

Apply time series methods to the time series of residuals { ɛˆj (p) } to specify a moving average model: (p) ɛ t = i=0 ψ jη t i yielding {ψˆj} and {ηˆt}, estimates of parameters and innovations. Conduct a case analysis diagnosing consistency with model assumptions Evaluate orthogonality of ɛˆ(p) to Y t s, s > p. If evidence of correlation, increase p and start again. Evaluate the consistency of {ηˆt} with the white noise assumptions of the theorem. If evidence otherwise, consider revisions to the overall model Changing the specification of the moving average model. Adding additional deterministic variables to the projection model. MIT 18.S096 Time Series Analysis 8

Note: Theoretically, lim p ŷ (p) = ŷ = P(Y t Y t 1, Y t 2,...) but if p is required, then n while p/n 0. Useful models of covariance stationary time series have Modest finite values of p and/or include Moving average models depending on a parsimonious number of parameters. MIT 18.S096 Time Series Analysis 9

Lag Operator L() Time Series Analysis Definition The lag operator L() shifts a time series back by one time increment. For a time series {X t } : L(X t ) = X t 1. Applying the operator recursively we define: L 0 (X t ) = X t L 1 (X t ) = X t 1 L 2 (X t ) = L(L(X t )) = X t 2 L n (X t ) = L(L n 1 (X t )) = X t n Inverses of these operators are well defined as: L n (X t ) = X t+n, for n = 1, 2,... MIT 18.S096 Time Series Analysis 10

Wold Representation with Lag Operators The Wold Representation for a covariance stationary time series {X t } can be expressed as X t = i=0 ψ iη t i + V t = i=0 ψ il i (η t ) + V t = ψ(l)η t + V t where ψ(l) = i=0 ψ il i. Definition The Impulse Response Function of the covariance stationary process {X t } is IR(j) = Xt η t j = ψ j. The long-run cumulative response of {X t} is i=0 IR(j) = i=0 ψ i = ψ(l) with L = 1. MIT 18.S096 Time Series Analysis 11

Equivalent Auto-regressive Representation Suppose that the operator ψ(l) is invertible, i.e., ψ 1 (L) = i=0 ψ i L i such that ψ 1 (L)ψ(L) = I = L 0. Then, assuming V t = 0 (i.e., X t has been adjusted to X t = X t V t ), we have the following equivalent expressions of the time series model for {X t } X t = ψ(l)η t ψ 1 (L)X t = η t Definition When ψ 1 (L) exists, the time series {X t } is Invertible and has an auto-regressive representation: X t = ( i=0 ψ i X t i ) + η t MIT 18.S096 Time Series Analysis 12

Outline Time Series Analysis 1 Time Series Analysis MIT 18.S096 Time Series Analysis 13

ARMA(p,q) Models Time Series Analysis Definition: The times series {X t } follows the ARMA(p, q) Model with auto-regressive order p and moving-average order q if X t = µ + φ 1 (X t 1 µ) + φ 2 (X t 1 µ ) + φ p (X t p µ) + η t + θ 1 η t 1 + θ 2 η t 2 + θ q η t q where {η t } is WN(0, σ 2 ), White Noise with E(η t ) = 0, t E(ηt 2 ) = σ 2 <, t, and E(η t η s ) = 0, t s With lag operators φ(l) = (1 φ 2 P 1L φ 2 L φ p L ) and θ(l) = (1 + θ 1 L + θ 2 L 2 + + θ q L q ) we can write φ(l) (X t µ) = θ(l)η t and the Wold decomposition is X t = µ + ψ(l)η t, where ψ(l) = [φ(l)]) 1 θ(l) MIT 18.S096 Time Series Analysis 14

AR(p) Models Time Series Analysis Order-p Auto-Regression Model: AR(p) φ(l) (X t µ) = η t where {η t } is WN(0, σ 2 ) and φ(l) = 1 φ 1 L φ 2 L 2 + φ p L p Properties: Linear combination of {X t, X t 1,... X t p } is WN(0, σ 2 ). X t follows a linear regression model on explanatory variables (X t 1, X t 2,..., X t p ), i.e X t = c + p j=1 φ jx t j + η where c = µ φ(1), (replacing L by 1 in φ(l)). t MIT 18.S096 Time Series Analysis 15

AR(p) Models Time Series Analysis Stationarity Conditions Consider φ(z) replacing L with a complex variable z. φ(z) = 1 φ 1 z φ 2 z 2 φpz p. Let λ 1, λ 2,... λ p be the p roots of φ(z) = 0. φ(l) = (1 1 λ 1 L) (1 1 λ 2 L) (1 1 λ p L) Claim: {X t } is covariance stationary if and only if all the roots of φ(z) = 0 (the characteristic equation ) lie outside the unit circle {z : z 1}, i.e., λ j > 1, j = 1, 2,..., p For complex number λ: λ > 1, (1 1 λ L) 1 = 1 + ( 1 λ )L + ( 1 λ )2 L 2 + ( 1 λ ) 3 L 3 + = i=0 ( 1 λ )i L i p φ 1 (L) = [ ( ) ] 1 j=1 1 1 λ j L MIT 18.S096 Time Series Analysis 16

AR(1) Model Time Series Analysis Suppose {X t } follows the AR(1) process, i.e., X t µ = φ(x t 1 µ) + η t, t = 1, 2,... where η 2 t WN(0, σ ). The characteristic equation for the AR(1) model is (1 φz) = 0 with root λ = 1 φ. The AR(1) model is covariance stationary if (and only if) φ < 1 (equivalently λ > 1) The first and second moments of {X t } are E(X t ) = µ Var(X t ) = σx 2 = σ2 /(1 φ) (= γ(0)) Cov(X t, X t 1 ) = φ σ 2 X Cov(X t, X t j ) = φ j σ 2 X (= γ(j)) Corr(X t, X t j ) = φ j = ρ(j) (= γ(j)/γ(0)) MIT 18.S096 Time Series Analysis 17

AR(1) Model Time Series Analysis For φ : φ < 1, the W old decomposition of the AR(1) model is: X t = µ + j=0 φj η t j For φ : 0 < φ < 1, the AR(1) process exhibits exponential mean-reversion to µ For φ : 0 > φ > 1, the AR(1) process exhibits oscillating exponential mean-reversion to µ For φ = 1, the Wold decomposition does not exist and the process is the simple random walk (non-stationary!). For φ > 1, the AR(1) process is explosive. Examples of AR(1) Models (mean reverting with 0 < φ < 1) Interest rates (Ornstein Uhlenbeck Process; Vasicek Model) Interest rate spreads Real exchange rates Valuation ratios (dividend-to-price, earnings-to-price) MIT 18.S096 Time Series Analysis 18

Yule Walker Equations for AR(p) Processes Second Order Moments of AR(p) Processes From the specification of the AR(p) model: (X t µ) = φ 1 (X t 1 µ) + φ 2 (X t 1 µ) + + φ p (X µ t p ) + η t we can write the Yule-Walker Equations (j = 0, 1,...) E[(X t µ)(x t j µ)] = φ 1 E[(X t 1 µ)(x t j µ)] + φ 2 E[(X t 1 µ)(x t j µ)]+ + φ p E[(X t p µ)(x t j µ)] + E[η t (X t j µ)] γ(j) = φ 1 γ(j 1) + φ 2 γ(j 2)+ + φ p γ(j p) + δ 2 0,jσ Equations j = 1, 2,... p yield a system of p linear equations in φ j : MIT 18.S096 Time Series Analysis 19

Yule-Walker Equations γ(1) γ(0) γ( 1) γ( 2) γ( (p 1)) φ 1 γ(2) γ(1) γ(0) γ( 1) γ( ( p 2)) φ = 2......... γ(p) γ(p 1) γ(p 2) γ(p 3) γ(0)) φp Given estimates γˆ(j), j = 0,..., p (and µˆ) the solution of these equations are the Yule-Walker estimates of the φ j ; using the property γ( j) = γ(+j), j Using these in equation 0 γ(0) = φ 1 γ( 1) + φ 2 γ( 2) + + φ pγ( p) + δ 0,0 σ 2 provides an estimate of σ 2 p σˆ2 = γˆ(0) j 1 φˆ j γˆ(j) When all the estimates γˆ(j) and µˆ are unbiased, then the Yule-Walker estimates apply the Method of Moments Principle of Estimation. MIT 18.S096 Time Series Analysis 20

MA(q) Models Time Series Analysis Order-q Moving-Average Model: MA(q) (X t µ) = θ(l)η t, where {η 2 t} is WN(0, σ ) and θ(l) = 1 + θ 1 L + θ 2 L 2 + + θ q L q Properties: The process {X t } is invertible if all the roots of θ(z) = 0 are outside the complex unit circle. The moments of X t are: E(X t ) = µ Var(X t ) = γ(0) = σ 2 (1 + θ1 2 + θ2 2 + + θ2 q) { 0, j > q Cov(X t, X t+j ) = σ 2 (θ j + θ j+1 θ 1 + θ j+2 θ 2 + θ qθ q j ), 1 < j q MIT 18.S096 Time Series Analysis 21

Outline Time Series Analysis 1 Time Series Analysis MIT 18.S096 Time Series Analysis 22

Accommodating Non-Stationarity by Differencing Many economic time series exhibit non-stationary behavior consistent with random walks. Box and Jenkins advocate removal of non-stationary trending behavior using Differencing Operators: = 1 L 2 = (1 L) 2 = 1 2L + L 2 k = (1 L) k k = ( k j=0 j ) ( L) j, (integral k > 0) If the process {X t } has a linear trend in time, then the process { X t } has no trend. If the process {X t } has a quadratic trend in time, then the second-differenced process { 2 X t } has no trend. MIT 18.S096 Time Series Analysis 23

Examples of Non-Stationary Processes Linear Trend Reversion Model: Suppose the model for the time series {X t } is: X t = TD t + η t, where TD t = a + bt, a deterministic (linear) trend η t AR(1), i.e., η t = φη t 1 + ξ t, where φ < 1 and {ξ t } is WN(0, σ 2 ). The moments of {X t } are: E(X t ) = E(TD t ) + E(η t ) = a + bt Var(X t ) = Var(η t ) = σ 2 /(1 φ). The differenced process { X t } can be expressed as X t = b + η t = b + (η t η t 1 ) = b + (1 L)η t = b + MIT (118.S096 L)(1 Time φl) Series 1 Analysis ξ t 24

Non-Stationary Trend Processes Pure Integrated Process I(1) for {X t }: X t = X 2 t 1 + η t, where η t is WN(0, σ ). Equivalently: X t = (1 L)X t + η t, where {η t } is WN(0, σ 2 ). Given X 0, we can write X t = X 0 + TS t where t TS t = j=0 η j The process {TS t } is a Stochastic Trend process with TS t = TS t 1 + η t, where {η t } is WN(0, σ 2 ). Note: The Stochastic Trend process is not perfectliy predictable. The process {X t } is a Simple Random Walk with white-noise steps. It is non-stationary because given X 0 : Var(X t) = tσ 2 Cov(X t, X t j ) = (t j)σ 2 for 0 < j < t. Corr = (X t, X t j ) = t j/ t = 1 j/t MIT 18.S096 Time Series Analysis 25

ARIMA(p,d,q) Models Definition: The time series {X t } follows an ARIMA(p, d, q) model ( Integrated ARMA ) if { d X t } is stationary (and non-stationary for lower-order differencing) and follows an ARMA(p, q) model. Issues: Determining the order of differencing required to remove time trends (deterministic or stochastic). Estimating the unknown parameters of an ARIMA(p, d, q) model. Model Selection: choosing among alternative models with different (p, d, q) specifications. MIT 18.S096 Time Series Analysis 26

Outline Time Series Analysis 1 Time Series Analysis MIT 18.S096 Time Series Analysis 27

Estimation of ARMA Models Maximum-Likelihood Estimation Assume that {η t } are i.i.d. N(0, σ 2 ) r.v. s. Express the ARMA(p, q) model in state-space form. Apply the prediction-error decomposition of the log-likelihood function. Apply either or both of Limited Information Maximum-Likelihood (LIML) Method Condition on the first p values of {X t } Assume that the first q values of {η t } are zero. Full Information Maximum-Likelihood (FIML) Method Use the stationary distribution of the first p values to specify the exact likelihood. MIT 18.S096 Time Series Analysis 28

Model Selection Time Series Analysis Statistical model selection critera are used to select the orders (p, q) of an ARMA process: Fit all ARMA(p, q) models with 0 p p max and 0 q q max, for chosen values of maximal orders. Let σ 2(p, q) be the MLE of σ 2 = Var(η t ), the variance of ARMA innovations under Gaussian/Normal assumption. Choose (p, q) to minimize one of: Akaike Information Criterion p AIC(p, q) = log(σ 2(p, q)) + 2 +q n Bayes Information Criterion BIC(p, q) = log(σ 2(p, q)) + log(n) p+q n Hannan-Quinn Criterion HQ(p, q) = log(σ 2(p, q)) + 2log(log(n)) p+q n MIT 18.S096 Time Series Analysis 29

Outline Time Series Analysis 1 Time Series Analysis MIT 18.S096 Time Series Analysis 30

Testing for Stationarity/Non-Stationarity Dickey-Fuller (DF) Test : Suppose {X t } follows the AR(1) model X t = φx t 1 + η t, with {η t } a WN(0, σ 2 ). Consider testing the following hypotheses: H 0 : φ = 1 (unit root, non-stationarity) H 1 : φ < 1 (stationarity) ( Autoregressive Unit Root Test ) Fit the AR(1) model by least squares and define the test ˆ statistic: t φ=1 = φ 1 se(φˆ) where φˆ is the least-squares estimate of φ and se(φˆ) is the least-squares estimate of the standard error of φ. ˆ If φ < 1, then T ( ˆφ φ) d N(0, (1 φ2 )). If φ = 1, then φˆ is super-consistent with rate (1/T ), T t φ=1 has DF distribution. MIT 18.S096 Time Series Analysis 31

References on * Unit Root Tests (H 0 : Nonstationarity) Dickey and Fuller (1979): Dickey-Fuller (DF) Test Said and Dickey (1984): Augmented Dickey-Fuller (ADF) Test Phillips and Perron (1988) Unit root (PP) tests Elliot, Rothenberg, and Stock (2001) Efficient unit root (ERS) test statistics. Stationarity Tests (H 0 : stationarity) Kwiatkowski, Phillips, Schmidt, and Shin (1922): KPSS test. * Optional reading MIT 18.S096 Time Series Analysis 32

MIT OpenCourseWare http://ocw.mit.edu 18.S096 Topics in Mathematics with Applications in Finance Fall 2013 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.