Vecor auoregression VAR So far we have focused mosl on models where deends onl on as. More generall we migh wan o consider oin models ha involve more han one variable. There are wo reasons: Firs, we migh wan o forecas a variable ha deends on as and some oher. Muli se forecass of will require a oin model for and. Second, we wan o undersand how changes in one variable affec he fuure of anoher variable when heir dnamics are iner relaed. Case If we onl care abou forecasing one series bu wan o use informaion from anoher series we can esimae an ARMA model and include addiional elanaor variables. For eamle if is he series of ineres, bu we hink migh be useful we can esimae models like 0
This model can be fi b leas squares (or MLE). Our deenden variable is and he indeenden variables are and. Once he model is fi, he one se ahead forecas is given b: E F E F E F 0 0 Jus like he simle AR model, he one se 2 ahead forecas variance is. However, a oin model for and is required if we are ineresed in mulile se ahead forecass, or if we are ineresed in feedback effecs from one rocess o he oher. E F E F E F 2 0 Wha do we use here? Answer: We need a model for as well. 2
Case 2 Eamle : Oimal eecuion algorihms aem o break u large orders ino smaller chunks o reduce he overall cos of ransacing. These algorihms require an undersanding of how much a rade will move fuure rices. Trades affec rices (i.e. bus end o ush rices u) rices affec rading decisions (i.e. falling rices ma induce urchases). The wo variables are inerconneced. Case 2 Eamle 2. Wage and inflaion raes are inerconneced. Increases in wages end o increase roducion cos which ges assed ono cusomers in he form of higher rices. Increasing rices ma u ressure on firms o increase wages o kee u wih he cos of living. 3
The VAR() model We have 2 variables and and we consider he oin model: 0 2 0 2 The suerscris us denoe arameers and errors s for model and model. Each equaion is like an AR() model wih one oher elanaor variable. Each equaion deends on is own lag and he lag of he oher variable. We also now have wo errors, one for each equaion: and 4
Noice ha we can wrie he same model wih some mari noaion: 0 2 0 2 Since deends on and deends on, a horough undersanding of dnamics and forecasing requires us o oinl consider and in he ssem of 2 equaions. Simlif Noaion B defining he following vecors and maricies we end u wih a ver simle form for he VAR() model ha will also allow fore eas maniulaion. Le 0 2,, 0, and v β β 0 2 5
Now wrie he VAR() model using linear algebra β β v 0 Assumions on he errors Assumion : boh errors are uncorrelaed hrough ime is uncorrelaed wih is own as and. is uncorrelaed wih is own as and. This is equivalen o saing ha v is uncorrelaed wih v, where v 6
Assumion 2: The s are iid Normal and ma be conemoraneousl correlaed. denoes he variance covariance mari of he error erms. Variance of 2 As we go forward in he noes is alwas he variance covariance mari of he errors. 2 Conemoraneous covariance of errors Variance of An eamle: Trades and quoes Le denoe he h rade in a given asse. Le denoe he log ransacion rice associaed wih he h rade and r denoe he coninuousl comounded reurn r = (called dmidrice in he daase). Le denoe wheher he rade was buer or seller iniiaed (+=bu, =sell) (called in he daase). 7
Trades and quoes equaions Then we sack r and in a vecor. Now a each oin in ime we have an observaion for he reurn associaed wih he ransacion rice and a variable for wheher he rade was buer or seller iniiaed. Define: r r r r r 0 2,, 0, and v β β 0 2 A Firs order Vecor Auoregression VAR() is hen defined as: β0 β v where he elemens of v are iid Normal wih variance covariance mari and he errors are uncorrelaed hrough ime. For his model, he deendence of each variable on he as is summarized b he mari, and he conemoraneous deendence is deermined b he variance covariance mari of v, namel he covariance. 8
VAR for rades and quoes Deenden variables Sloe coefficiens Inerces (So he model for reurns and he model for rades are read vericall) VAR() model β β v where he elemens of v 0 Normal wih variance covariance mari are 9
Quesions o answer. Quesions How do we esimae he model? How do we check he goodness of fi? How do we forecas his model? How do we esimae VAR s? Esimaion is sraigh forward. Firs, ick. Can be he same for all variables in or we can have a differen for each variable. Usuall sa ackages use he same value of for all equaions. Esimae he model equaion b equaion using OLS us as we did for he univariae models. 0
VAR() eamle for rades and rices Se one esimae model for ransacion rices using lagged values of ransacion rices and lagged rades. Se wo esimae model for rades using lagged values of ransacion rices and lagged rades. Covariance mari of errors is esimaed b: We have he esimaed model: r r r e c r c c e b r b b r 0 0 ' ˆ 2( ) T ee T Where b and c corresond o esimaed arameers.
Does he model fi he daa? If he model is well secified, he residuals should be uncorrelaed. We can eamine he residuals of each equaion and check if he are uncorrelaed wih heir own as. We can also check o see ha he are uncorrelaed wih he residuals of he oher equaions. Eamine los of samle covariances of he residual vecor: T ˆ l ee T 2 ' l Noe ha his conains cross correlaions. In our rades and rice eamle here will be 4 combinaions of errors; rices wih lagged rices, rices wih lagged rades, rades wih lagged rades and rades wih lagged rices. 2
Correlogram of errors Auocorrelaions wih 2 Sd.Err. Bounds Cor(DMIDPRICE,DMIDPRICE(-i)) Cor(DMIDPRICE,XX(-i)).03.03.02.02.0.0.00.00 -.0 -.0 -.02 -.02 -.03 2 3 4 5 6 7 8 9 0 2 -.03 2 3 4 5 6 7 8 9 0 2 Cor(XX,DMIDPRICE(-i)) Cor(XX,XX(-i)).03.03.02.02.0.0.00.00 -.0 -.0 -.02 -.02 -.03 2 3 4 5 6 7 8 9 0 2 -.03 2 3 4 5 6 7 8 9 0 2 Forecasing VAR s Le E denoe he k se ahead forecas k of +k Le denoe he esimae of he h mari and 0 denoe he esimae of he inerce vecor. The one se ahead forecas is given b: E E β0 β E β β 0 3
The 2 se ahead forecas is given b: E E 2β0 β E 2 E β β β 2 0 2 2 The k se ahead forecas is given b: E E β0 β E k k k 0 E β β β k k k k.0020.006.002.0008.0004.0000 2000 200 2002 2003 2004 2005 2006 2007 2008 2009 200 R_F 4
.24.20.6.2.08.04.00 2000 200 2002 2003 2004 2005 2006 2007 2008 2009 200 X_F 5