OBJECTIVES OF TIME SERIES ANALYSIS Undersanding he dynamic or imedependen srucure of he observaions of a single series (univariae analysis) Forecasing of fuure observaions Asceraining he leading, lagging and feedback relaionships among several series (mulivariae analysis) 2
STEPS IN TIME SERIES ANALYSIS Model Idenificaion Time Series plo of he series Check for he exisence of a rend or seasonaliy Check for he sharp changes in behavior Check for possible ouliers Remove he rend and he seasonal componen o ge saionary residuals. Esimaion MME MLE Diagnosic Checking Normaliy of error erms Independency of error erms Consan error variance (Homoscedasiciy) Forecasing Exponenial smoohing mehods Minimum MSE forecasing 3
CHARACTERISTICS OF A SERIES For a ime series THE MEAN FUNCTION: E Exiss iff EY. THE VARIANCE FUNCTION: 2 0 Y, 0,, 2, Y The expeced value of he process a ime. Var 2 2 2 Y E Y E Y 0 0 4
CHARACTERISTICS OF A SERIES THE AUTOCOVARIANCE FUNCTION:, s Cov E Y, Y YY ;, s 0,, 2, s THE AUTOCORRELATION FUNCTION:, s s Corr Y, Ys,, s E s Y Y s Covariance beween he value a ime and he value a ime s of a sochasic process Y., s s The correlaion of he series wih iself s 5
EXAMPLE Moving average process: Le i.i.d.(0, ), and X = + 0.5 6
EXAMPLE RANDOM WALK: Le e,e 2, be a sequence of i.i.d. rvs wih 0 mean and variance. The observed ime series is obained as 7 2 e n Y,,2,, e Y Y e e Y e Y Y e e e Y e Y Y e e Y e Y 3 2 3 3 2 3 2 2 2 2
STATIONARITY The mos vial and common assumpion in ime series analysis. The basic idea of saionariy is ha he probabiliy laws governing he process do no change wih ime. The process is in saisical equilibrium. 8
TYPES OF STATIONARITY STRICT (STRONG OR COMPLETE) STATIONARY PROCESS: Consider a finie se of r.v.s. Y, Y,, Y from a sochasic process 2 n Y w, ; 0,, 2,. The n-dimensional disribuion funcion is defined by F y y,, y P w: Y y,, Y Y y, Y,, Y, 2 n 2 n where y i, i=, 2,, n are any real numbers. n n 2
STRONG STATIONARITY A process is said o be firs order saionary in disribuion, if is one dimensional disribuion funcion is ime-invarian, i.e., y F y for any and k. FY Y k Second order saionary in disribuion if y, y F y y for any, and k. FY, Y 2 Y, Y, 2 k k 2 2 2 n-h order saionary in disribuion if F y, y F y, y for any,, and k. Y,, Y, n Y,, Y, n k n k n n 3
STRONG STATIONARITY n-h order saionariy in disribuion = srong saionariy Shifing he ime origin by an amoun k has no effec on he join disribuion, which mus herefore depend only on ime inervals beween, 2,, n, no on absolue ime,. 4
STRONG STATIONARITY So, for a srong saionary process i) ii) iii) iv) 6 y y f y y f n Y Y n Y Y k n k n,,,,,,,, k E Y Y E k k,, Expeced value of a series is consan over ime, no a funcion of ime k Y Var Y Var k k,, 2 2 2 The variance of a series is consan over ime, homoscedasic. h k s k s k s k s k s k s k Y Cov Y Y Cov Y,,,,,, No consan, no depend on ime, depends on ime inerval, which we call lag, k
STRONG STATIONARITY 7 0 2 4 6 8 0 2 2 3 4 5 6 7 8 9 0 2 Y Y Y 3 Y 2 Y n 2 2 2 2 2 3 3 2 3 3 ) ( 2 3 2 3 2 2,,,,, Y Y Cov Y Y Cov Y Y Cov Y Y Cov Y Y Cov n n n n Affeced from ime lag, k...
STRONG STATIONARITY v) Le =-k and s=, I is usually impossible o verify a disribuion paricularly a join disribuion funcion from an observed ime series. So, we use weaker sense of saionariy. 8 h k s k s k s k s k s k s k Y Y Corr Y Y Corr,,,,,, k k k k,,,,
WEAK STATIONARITY WEAK (COVARIANCE) STATIONARITY OR STATIONARITY IN WIDE SENSE: A ime series is said o be covariance saionary if is firs and second order momens are unaffeced by a change of ime origin. Tha is, we have consan mean and variance wih covariance and correlaion beings funcions of he ime difference only. 9
WEAK STATIONARITY E Y Var Cov Corr Y Y,, Y, Y, Y, k 2 k, From, now on, when we say saionary, we imply weak saionariy. k k 20
EXAMPLE Consider a ime series {Y } where Y =e and e i.i.d.(0, 2 ). Is he process saionary? 23
EXAMPLE MOVING AVERAGE: Suppose ha {Y } is consruced as Y e e 2 and e i.i.d.(0, 2 ). Is he process {Y } saionary? 24
EXAMPLE RANDOM WALK Y e e 2 e where e i.i.d.(0, 2 ). Is he process {Y } saionary? 25
EXAMPLE Suppose ha ime series has he form Y a b e where a and b are consans and {e } is a weakly saionary process wih mean 0 and auocovariance funcion k. Is {Y } saionary? 26
EXAMPLE where e i.i.d.(0, 2 ). Is he process {Y } saionary? Y e 27
STRONG VERSUS WEAK STATIONARITY Sric saionariy means ha he join disribuion only depends on he difference h, no he ime (,..., k ). Finie variance is no assumed in he definiion of srong saionariy, herefore, sric saionariy does no necessarily imply weak saionariy. For example, processes like i.i.d. Cauchy is sricly saionary bu no weak saionary. A nonlinear funcion of a sric saionary variable is sill sricly saionary, bu his is no rue for weak saionary. For example, he square of a covariance saionary process may no have finie variance. Weak saionariy usually does no imply sric saionariy as higher momens of he process may depend on ime. 28
STRONG VERSUS WEAK STATIONARITY If process {X } is a Gaussian ime series, which means ha he disribuion funcions of {X } are all mulivariae Normal, weak saionary also implies sric saionary. This is because a mulivariae Normal disribuion is fully characerized by is firs wo momens. 29
STRONG VERSUS WEAK STATIONARITY For example, a whie noise is saionary bu may no be sric saionary, bu a Gaussian whie noise is sric saionary. Also, general whie noise only implies uncorrelaion while Gaussian whie noise also implies independence. Because if a process is Gaussian, uncorrelaion implies independence. Therefore, a Gaussian whie noise is jus i.i.d. N(0, 2 ). 30
STATIONARITY AND NONSTATIONARITY Saionary and nonsaionary processes are very differen in heir properies, and hey require differen inference procedures. 3
Noe he difference beween he (log-) price and he reurn of he S&P500.. The laer is mean-revering around zero, he former is no
F( B) X = m +Q( B)e B is he backward operaor(also denoed as L, lag operaor)
BX = X - B 2 X = B(BX ) = BX - = X -2 B k X = X -k
D k = ( - B) k
Expeced value of MA(q) q q y E E Variance of MA(q) 2 2 2 0 q q q y y Var Var Auocovariance of MA(q) q k q k q k q k k q q y q q k k k E k.,,2,, 0, 2 Auocorelaion of MA(q) q k q k y y y q q q k k k k k.,,2,, / 0, 2 2 0 54 ε whie noise
Firs Order Moving Average Process MA() q= y = m +e -q e - e whie noise Auocovariance of MA(q) g y (0) = s 2 2 ( +q ) g y () = -q s 2 g y (k) = 0, k > Auocorelaion of MA(q) y 2 ( k) 0, k y y 2 2 55
Second Order Moving Average MA(2) process y B B 2 2 2 2 Auocovariance of MA(q) g y (0) = s 2 +q 2 2 ( +q 2 ) g y () = s 2 (-q +q q 2 ) g y (2) = s 2 (-q 2 ) g y (k) = 0, k > 2 Auocorelaion of MA(q) r y ( ) = -q +q q 2 +q 2 2 +q 2 r y ( 2) = -q 2 +q 2 +q 2 2 r y (k) = 0, k > 2 56
Inveribiliy of MA models Inverible moving average process: The MA(q) process k k P is inverible if i has an absolue summable infinie AR represenaion k I can be shown: The infinie AR represenaion for MA(q) y i y i i, i i 57
Firs order exponenial smoohing Firs-order exponenial smoohing: linear combinaion of he curren observaion & he smoohed observaion a he previous ime uni ~ y y T ~ y T ~ y y T ( ) ~ y T Discoun facor : weigh on he las observaion ( ) : weigh on he smoohed value of he previous observaions
~ The iniial value y 0 2 commonly used esimaes of ~ y 0 ~ y y 0 If he changes in he process are expeced o occur early & fas ~ y0 y If he process a he beginning is consan
The value of As ges closer o, & more emphasis is given in he las observaions : he smoohed values follow he original values more closely 0: ~ y ~ T y : ~ yt y T 0 The smoohed values equal o a consan The leas smoohed version of he original ime series 0. 0.4 Values recommended Choice of he smoohing consan: Subjecive: depending of willingness o have fas adapiviy or more rigidiy. 2 Choice advocaed by Brown (invenor of he mehod): λ = 0.7 3 Objecive: consan chosen o minimize he sum of squared forecas errors
Use exponenial smoohers for forecasing A ime T, we wish o forecas observaion a ime T+, or a ime T + ˆ y T T sep ahead forecas Consan Process y 0 0 Can be esimaed by he firs-order exponenial smooher Forecas : y ˆ ( T ) ~ T y T A ime T+ ˆ T y T y T y ~ yˆ ( ) yˆ T yt T T yˆ ˆ () ˆ T ( T) yt yt yt yˆ () e () T T e ( ) y ˆ T T yt ( T) One-sep-ahead forecas error
yˆ ˆ () ˆ T ( T) yt yt yt yˆ () e () T T Our forecas for he nex observaion is our previous forecas for he curren observaion plus a fracion of he forecas error we made in forecasing he curren observaion
Hol s Exponenial smoohing Hol s wo parameer exponenial smoohing mehod is an exension of simple exponenial smoohing. I adds a growh facor (or rend facor) o he smoohing equaion as a way of adjusing for he rend.
Hol s Exponenial smoohing Three equaions and wo smoohing consans are used in he model. The exponenially smoohed series or curren level esimae. L y The rend esimae. ( )( L b ) b ( L L ) ( ) b Forecas m periods ino he fuure. F m L mb
Hol s Exponenial smoohing Three equaions and wo smoohing consans are used in he model. The exponenially smoohed series or curren level esimae. L y The rend esimae. ( )( L b ) b ( L L ) ( ) b Forecas m periods ino he fuure. F m L mb
Hol s Exponenial smoohing L = Esimae of he level of he series a ime = smoohing consan for he daa. y = new observaion or acual value of series in period. = smoohing consan for rend esimae b = esimae of he slope of he series a ime m = periods o be forecas ino he fuure.
Hol s Exponenial smoohing The weigh and can be seleced subjecively or by minimizing a measure of forecas error such as RMSE. Large weighs resul in more rapid changes in he componen. Small weighs resul in less rapid changes.
Hol s Exponenial smoohing The iniializaion process for Hol s linear exponenial smoohing requires wo esimaes: One o ge he firs smoohed value for L The oher o ge he rend b. One alernaive is o se L = y and b or b or b y y 0 2 4 3 y y