1、课件,5-1,Chapter 5,Univariate time series modelling and forecasting,课件,5-2,1 introduction,单变量时间序列模型 只利用变量的过去信息和可能的误差项的当前和过去值来建模和预测的一类模型(设定)。 与结构模型不同;通常不依赖于经济和金融理论 用于描述被观测数据的经验性相关特征 ARIMA(AutoRegressive Integrated Moving Average)是一类重要的时间序列模型 Box-Jenkins 1976 当结构模型不适用时,时间序列模型却很有用 如引起因变量变化的因素中包含不可观测因素,解释
2、变量等观测频率较低。结构模型常常不适用于进行预测 本章主要解决两个问题 一个给定参数的时间序列模型,其变动特征是什么? 给定一组具有确定性特征的数据,描述它们的合适模型是什么?,课件,5-3,A Strictly Stationary Process A strictly stationary process is one whereFor any t1 ,t2 , tn Z, any m Z, n=1,2, A Weakly Stationary Process If a series satisfies the next three equations, it is said to be
3、weakly or covariance stationary 1. E(yt) = , t = 1,2,., 2. 3. t1 , t2,2 Some Notation and Concepts,课件,5-4,So if the process is covariance stationary, all the variances are the same and all the covariances depend on the difference between t1 and t2. The moments, s = 0,1,2, .are known as the covarianc
4、e function. The covariances, s, are known as autocovariances. However, the value of the autocovariances depend on the units of measurement of yt. It is thus more convenient to use the autocorrelations which are the autocovariances normalised by dividing by the variance:, s = 0,1,2, .If we plot s aga
5、inst s=0,1,2,. then we obtain the autocorrelation function (acf) or correlogram.,Some Notation and Concepts,课件,5-5,A white noise process is one with no discernible structure. Thus the autocorrelation function will be zero apart from a single peak of 1 at s = 0. 如果假设yt服从标准正态分布, 则 approximately N(0,1/
6、T) We can use this to do significance tests for the autocorrelation coefficients by constructing a confidence interval. a 95% confidence interval would be given by . If the sample autocorrelation coefficient, , falls outside this region for any value of s, then we reject the null hypothesis that the
7、 true value of the coefficient at lag s is zero.,A White Noise Process,课件,5-6,We can also test the joint hypothesis that all m of the k correlation coefficients are simultaneously equal to zero using the Q-statistic developed by Box and Pierce: where T = sample size, m = maximum lag length The Q-sta
8、tistic is asymptotically distributed as a . However, the Box Pierce test has poor small sample properties, so a variant has been developed, called the Ljung-Box statistic: This statistic is very useful as a portmanteau (general) test of linear dependence in time series.,Joint Hypothesis Tests,课件,5-7
9、,Question:Suppose that we had estimated the first 5 autocorrelation coefficients using a series of length 100 observations, and found them to be (from 1 to 5): 0.207, -0.013, 0.086, 0.005, -0.022.Test each of the individual coefficient for significance, and use both the Box-Pierce and Ljung-Box test
10、s to establish whether they are jointly significant. Solution:A coefficient would be significant if it lies outside (-0.196,+0.196) at the 5% level, so only the first autocorrelation coefficient is significant.Q=5.09 and Q*=5.26Compared with a tabulated 2(5)=11.1 at the 5% level, so the 5 coefficien
11、ts are jointly insignificant.,An ACF Example (p234),课件,5-8,Let ut (t=1,2,3,.) be a sequence of independently and identically distributed (iid) random variables with E(ut)=0 and Var(ut)= 2, then yt = + ut + 1ut-1 + 2ut-2 + . + qut-q is a qth order moving average model MA(q). Or using the lag operator
12、 notation:Lyt = yt-1 Liyt = yt-i通常,可以将常数项从方程中去掉,而并不失一般性。,3 Moving Average Processes,课件,5-9,移动平均过程的性质,Its properties are E( yt )= Var( yt ) = 0 = (1+ )2Covariances自相关函数,课件,5-10,Consider the following MA(2) process:where ut is a zero mean white noise process with variance .(i) Calculate the mean and v
13、ariance of Xt(ii) Derive the autocorrelation function for this process (i.e. express the autocorrelations, 1, 2, . as functions of the parameters 1 and 2).(iii) If 1 = -0.5 and 2 = 0.25, sketch the acf of Xt.,Example of an MA Process,课件,5-11,(i) If E(ut )=0, then E(ut-i )=0 i. So E(Xt ) = E(ut + 1ut
14、-1+ 2ut-2 )= E(ut )+ 1E(ut-1 )+ 2E(ut-2 )=0Var(Xt ) = EXt -E(Xt )Xt -E(Xt )Var(Xt) = E(Xt )(Xt )= E(ut + 1ut-1+ 2ut-2)(ut + 1ut-1+ 2ut-2)= E +cross-productsBut Ecross-products=0 ,since Cov(ut,ut-s)=0 for s0. SoVar(Xt ) = 0= E = =,Solution,课件,5-12,(ii) The acf of Xt 1 = EXt-E(Xt )Xt-1-E(Xt-1 )= EXt X
15、t-1 = E(ut +1ut-1+ 2ut-2 )(ut-1 + 1ut-2+ 2ut-3 )= E( )= = 2 = EXt -E(Xt )Xt-2 -E(Xt-2 )= EXt Xt-2 = E(ut +1ut-1+2ut-2 )(ut-2 +1ut-3+2ut-4 )= E( )=,Solution (contd),课件,5-13,3 = EXt Xt-3 = E(ut +1ut-1+2ut-2 )(ut-3 +1ut-4+2ut-5 )= 0So s = 0 for s 2.now calculate the autocorrelations:,Solution (contd),课
16、件,5-14,(iii) For 1 = -0.5 and 2 = 0.25, substituting these into the formulae above gives 1 = - 0.476, 2 = 0.190.Thus the acf plot will appear as follows:,ACF Plot,课件,5-15,An autoregressive model of order p, AR(p) can be expressed asOr using the lag operator notation:Lyt = yt-1 Liyt = yt-ior or where
17、,4 Autoregressive Processes,课件,5-16,平稳性使AR模型具有一些很好的性质。如前期误差项对当前值的影响随时间递减。 The condition for stationarity of a general AR(p) model is that the roots of 特征方程 all lie outside the unit circle. Example 1: Is yt = yt-1 + ut stationary?The characteristic root is 1, so it is a unit root process (so non-stat
18、ionary) Example 2: p241 A stationary AR(p) model is required for it to have an MA() representation.,The Stationary Condition for an AR Model,课件,5-17,States that any stationary series can be decomposed into the sum of two unrelated processes, a purely deterministic part and a purely stochastic part,
19、which will be an MA().For the AR(p) model, , ignoring the intercept, the Wold decomposition iswhere, 可以证明,算子多项式R(L)的集合与代数多项式R(z)的集合是同结构的,因此可以对算子L做加、减、乘和比率运算。,Wolds Decomposition Theorem,课件,5-18,The moments of an autoregressive process are as follows. The mean is given by*The autocovariances and auto
20、correlation functions can be obtained by solving what are known as the Yule-Walker equations: *If the AR model is stationary, the autocorrelation function will decay exponentially to zero.,The Moments of an Autoregressive Process,课件,5-19,Consider the following simple AR(1) model(i) Calculate the (un
21、conditional) mean of yt.For the remainder of the question, set =0 for simplicity.(ii) Calculate the (unconditional) variance of yt.(iii) Derive the autocorrelation function for yt.,Sample AR Problem,课件,5-20,(i) E(yt)= E(+1yt-1) = +1E(yt-1)But also E(yt)= +1 ( +1E(yt-2)= +1 +12 E(yt-2)= +1 +12 ( +1E(
22、yt-3)= +1 +12 +13 E(yt-3)An infinite number of such substitutions would giveE(yt)= (1+1+12 +.) + 1 y0So long as the model is stationary, i.e. , then 1 = 0.So E(yt)= (1+1+12 +.) =,Solution,课件,5-21,(ii) Calculating the variance of yt :*From Wolds decomposition theorem:So long as , this will converge.,
23、Solution (contd),课件,5-22,Var(yt) = Eyt-E(yt)yt-E(yt) but E(yt) = 0, since we are setting = 0. Var(yt) = E(yt)(yt) *有简便方法= E = E = E = = =,Solution (contd),课件,5-23,(iii) Turning now to calculating the acf, first calculate the autocovariances: (*用简便方法)1 = Cov(yt, yt-1) = Eyt-E(yt)yt-1-E(yt-1)1 = Eytyt
24、-1 1 = E = E =,Solution (contd),课件,5-24,Solution (contd),For the second autocorrelation coefficient,2 = Cov(yt, yt-2) = Eyt-E(yt)yt-2-E(yt-2) Using the same rules as applied above for the lag 1 covariance2 = Eyt yt-2= E = E = =,课件,5-25,Solution (contd),If these steps were repeated for 3, the followi
25、ng expression would be obtained3 = and for any lag s, the autocovariance would be given bys = The acf can now be obtained by dividing the covariances by the variance:,课件,5-26,Solution (contd),0 = 1 = 2 = 3 = s =,课件,5-27,Measures the correlation between an observation k periods ago and the current ob
26、servation, after controlling for observations at intermediate lags (i.e. all lags k). yt-k与 yt之间的偏自相关函数kk 是在给定yt-k+1 , yt-k+2 , , yt-1 的条件下, yt-k与 yt之间的部分相关。 So kk measures the correlation between yt and yt-k after removing the effects of yt-k+1 , yt-k+2 , , yt-1 .或者说,偏自相关函数kk 是对yt-k与 yt之间未被yt-k+1 ,
27、 yt-k+2 , , yt-1所解释的 相关的度量。 At lag 1, the acf = pacf always At lag 2, 22 = (2-12) / (1-12) For lags 3+, the formulae are more complex.,5 The Partial Autocorrelation Function (denoted kk),课件,5-28,The pacf is useful for telling the difference between an AR process and an MA process.In the case of an A
28、R(p), there are direct connections between yt and yt-s only for s p. So for an AR(p), the theoretical pacf will be zero after lag p.In the case of an MA(q), this can be written as an AR(), so there are direct connections between yt and all its previous values. For an MA(q), the theoretical pacf will
29、 be geometrically declining.,The Partial Autocorrelation Function,课件,5-29,The invertibility condition,If MA(q) process can be expressed as an AR(), then MA(q) is invertible.MA(q)的可逆性条件:特征方程 根的绝对值大于1。从而有,课件,5-30,By combining the AR(p) and MA(q) models, we can obtain an ARMA(p,q) model:where and or wi
30、th,6 ARMA Processes,课件,5-31,ARMA过程的特征是AR和MA的组合。 可逆性条件:Similar to the stationarity condition, we typically require the MA(q) part of the model to have roots of (z)=0 greater than one in absolute value. The mean of an ARMA series is given by The autocorrelation function for an ARMA process will displa
31、y combinations of behaviour derived from the AR and MA parts, but for lags beyond q, the acf will simply be identical to the individual AR(p) model.,ARMA 过程的特征,课件,5-32,An autoregressive process has a geometrically decaying acf: 拖尾 number of spikes尖峰信号 of pacf = AR order :截尾A moving average process h
32、as Number of spikes of acf = MA order:截尾 a geometrically decaying pacf :拖尾A ARMA process has a geometrically decaying acf: 拖尾 a geometrically decaying pacf :拖尾,Summary of the Behaviour of the acf and pacf for AR and MA Processes,课件,5-33,The acf and pacf are estimated using 100,000 simulated observat
33、ions with disturbances drawn from a normal distribution.ACF and PACF for an MA(1) Model: yt = 0.5ut-1 + ut,Some sample acf and pacf plots for standard processes,课件,5-34,ACF and PACF for an MA(2) Model: yt = 0.5ut-1 - 0.25ut-2 + ut,课件,5-35,ACF and PACF for a slowly decaying AR(1) Model: yt = 0.9 yt-1
34、 + ut,课件,5-36,ACF and PACF for a more rapidly decaying AR(1) Model: yt = 0.5 yt-1 + ut,课件,5-37,ACF and PACF for a AR(1) Model with Negative Coefficient:yt = -0.5 yt-1 + ut,课件,5-38,ACF and PACF for a Non-stationary Model ( a unit coefficient): yt = yt-1 + ut,课件,5-39,ACF and PACF for an ARMA(1,1): yt
35、= 0.5yt-1 + 0.5ut-1 + ut, Chris Brooks 2002, 陈磊 2004,6-40,Chapter 6,Multivariate models, Chris Brooks 2002, 陈磊 2004,6-41,1 Motivations,All the models we have looked at thus far have been single equations models of the form y = X + u All of the variables contained in the X matrix are assumed to be EX
36、OGENOUS.由系统外因素决定的变量 y is an ENDOGENOUS variable. 既影响系统同时又被该系统及其外部因素所影响的变量.An example - the demand and supply of a good:(1)(2)(3)、 = quantity of the good demanded / suppliedPt = price, St = price of a substitute goodTt = some variable embodying the state of technology, Chris Brooks 2002, 陈磊 2004,6-42
37、,Assuming that the market always clears, and dropping the time subscripts for simplicity(4)(5)This is a simultaneous STRUCTURAL FORM of the model. The point is that price and quantity are determined simultaneously (price affects quantity and quantity affects price). P and Q are endogenous variables,
38、 while S and T are exogenous. We can obtain REDUCED FORM equations corresponding to (4) and (5) by solving equations (4) and (5) for P and for Q.,Simultaneous Equations Models: The Structural Form, Chris Brooks 2002, 陈磊 2004,6-43,Solving for Q,(6)Solving for P,(7)Rearranging (6),(8),Obtaining the Re
39、duced Form, Chris Brooks 2002, 陈磊 2004,6-44,Multiplying (7) through by ,(9)(8) and (9) are the reduced form equations for P and Q.,Obtaining the Reduced Form, Chris Brooks 2002, 陈磊 2004,6-45,But what would happen if we had estimated equations (4) and (5), i.e. the structural form equations, separate
40、ly using OLS?Both equations depend on P. One of the CLRM assumptions was that E(Xu) = 0, where X is a matrix containing all the variables on the RHS of the equation.It is clear from (8) that P is related to the errors in (4) and (5) - i.e. it is stochastic.What would be the consequences for the OLS
41、estimator, , if we ignore the simultaneity?,2 Simultaneous Equations Bias, Chris Brooks 2002, 陈磊 2004,6-46,Recall that and So that Taking expectations,If the Xs are non-stochastic, E(Xu) = 0, which would be the case in a single equation system, so that , which is the condition for unbiasedness.,Simu
42、ltaneous Equations Bias, Chris Brooks 2002, 陈磊 2004,6-47,But if the equation is part of a system, then E(Xu) 0, in general. Conclusion: Application of OLS to structural equations which are part of a simultaneous system will lead to biased coefficient estimates.Is the OLS estimator still consistent,
43、even though it is biased? No - In fact the estimator is inconsistent as well.Hence it would not be possible to estimate equations (4) and (5) validly using OLS.,Simultaneous Equations Bias, Chris Brooks 2002, 陈磊 2004,6-48,So What Can We Do? Taking equations (8) and (9), we can rewrite them as(10)(11
44、) We CAN estimate equations (10) what we wanted were the original parameters in the structural equations - , , , , , .,3 Avoiding Simultaneous Equations Bias, Chris Brooks 2002, 陈磊 2004,6-49,Can We Retrieve the Original Coefficients from the s?Short answer: sometimes. we sometimes encounter another
45、problem: identification.* Consider the following demand and supply equationsSupply equation (12)Demand equation (13)We cannot tell which is which! Both equations are UNIDENTIFIED or UNDERIDENTIFIED. The problem is that we do not have enough information from the equations to estimate 4 parameters. No
46、tice that we would not have had this problem with equations (4) and (5) since they have different exogenous variables.,4 Identification of Simultaneous Equations, Chris Brooks 2002, 陈磊 2004,6-50,We could have three possible situations: 1. An equation is unidentified like (12) or (13) we cannot get t
47、he structural coefficients from the reduced form estimates 2. An equation is exactly identified e.g. (4) or (5) can get unique structural form coefficient estimates 3. An equation is over-identified Example given later More than one set of structural coefficients could be obtained from the reduced f
48、orm.,What Determines whether an Equation is Identified or not?, Chris Brooks 2002, 陈磊 2004,6-51,How do we tell if an equation is identified or not? There are two conditions we could look at: - The order 阶condition - is a necessary but not sufficient condition for an equation to be identified. - The rank 秩 condition - is a necessary and sufficient condition for identification. 在G个内生变量、G个方程的联立方程组模型中,某一方程是可识别的,当且仅当该方程没有包含的变量在其他方程中对应系数组成的矩阵的秩为G -1。 对于相对简单的方程系统,这两个规则将得到同样的结论。 事实上,大多数经济和金融方程系统都是过度识别的。,