时间序列分析报告及VAR模型.docx
《时间序列分析报告及VAR模型.docx》由会员分享,可在线阅读,更多相关《时间序列分析报告及VAR模型.docx(15页珍藏版)》请在冰豆网上搜索。
![时间序列分析报告及VAR模型.docx](https://file1.bdocx.com/fileroot1/2023-8/14/89e484f7-7dfa-4b50-84d7-0edb4598b5e9/89e484f7-7dfa-4b50-84d7-0edb4598b5e91.gif)
时间序列分析报告及VAR模型
Lecture6
6.Timeseriesanalysis:
Multivariatemodels
6.1Learningoutcomes
∙Vectorautoregression(VAR)
∙Cointegration
∙Vectorerrorcorrectionmodel(VECM)
∙Application:
pairstrading
6.2Vectorautoregression(VAR)向量自回归
Theclassicallinearregressionmodelassumesstrictexogeneity;hence,thereisnoserialcorrelationbetweenerrortermsandanyrealisationofanyindependentvariable(leadorlag).Aswediscovered,serialcorrelation(orautocorrelation)isverycommoninfinancialtimeseriesandpaneldata.Furthermore,weassumedapre-definedrelationofcausality:
explanatoryvariableaffectthedependentvariable.
传统的线性回归模型假设严格的外生性,误差项与可实现的独立变量之间没有序列相关性。
金融时间序列及面板数据往往都有很强的自相关性,假定解释变量影响因变量。
WenowrelaxbothassumptionsusingaVARmodel.VARmodelscanberegardedasageneralisationofAR(p)processesbyaddingadditionaltimeseries.Hence,weenterthefieldofmultivariatetimeseriesanalysis.VAR模型可以当作是在一般的自回归过程中加入时间序列。
Let’slookatastandardAR(p)processfortwovariables(ytandxt).
(1)
(2)
Thenextstepistoallowthatlaggedvaluesofxtcanaffectytandviceversa.Thismeansthatweobtainasystemofequationsfortwodependentvariables(ytandxt).Bothdependentvariablesareinfluencedbypastrealisationsofytandxt.Bydoingthat,weviolatestrictexogeneity(seeLecture2);however,wecanuseamorerelaxedconcept,namelyweakexogeneity.Asweuselaggedvaluesofbothdependentvariables,wecanarguethattheselaggedvaluesareknowntous,asweobservedtheminthepreviousperiod.Wecallthesevariablespredetermined.Predetermined(lagged)variablesfulfilweakexogeneityinthesensethattheyhavetobeuncorrelatedwiththecontemporaneouserrortermint.WecanstilluseOLStoestimatethefollowingsystemofequations,whichiscalledaVARinreducedform.
(3)
(4)
Thebeautyofthismodelisthatwedon’tneedtopredefinewhetherxoryareendogenous(thedependentvariable).Infact,wecantestwhetherx(y)isendogenousorexogenoususingGrangercausalitytests.TheideaofGrangercausalityisthatpastobservations(laggeddependentvariables)caninfluencecurrentobservations–butnotviceversa.Sotheideaisrathersimple:
thepastaffectsthepresent,andthepresentdoesnotaffectthepast.STATAprovidesGrangercausalitytestsafterconductingaVARanalysis,whichisbasedontestingthejointhypothesisthatpastrealisationsdonotGrangercausethepresentrealisationofthedependentvariable.
Inmanyapplications,VARmodelsmakealotofsense,asacleardirectionofcausalitycannotbepredefined.Forinstance,thereisasubstantialliteratureonthebenefitsofinternationalisation(e.g.enteringforeignmarketthroughcross-borderM&A).Thereisevidencethatmultinationalsoutperformlocalpeersduetothebenefitsofoperatinginmanycountries.Atthesametime,weknowthathigh-performingcompaniesaremorelikelytoenterforeignmarketsduetotheirownershipspecificadvantages.ThisargumentisbasedontheResource-basedViewandtheOLSframeworkdevelopedbyDunningandRugman(ReadingSchoolofInternationalBusiness).TheVARmodelallowsyoutoincorporatebotheffects:
infactyoucantestwhetherperformancedrivesinternationalisationorinternationalisationdrivesperformance.
BeforeyoustartusingaVARmodel,youhavetomakesurethatthetimeseriesarestationary.SothefirststepistocheckwhetherthetimeseriesisstationaryusingDickey-FullertestsandKPSStests.Thesecondstepistospecifytheoptimallaglength(p)ofthemodel.Thisisdonebycomparingdifferentmodelspecificationsusinginformationcriteria.ApartfromusingAkaike(AIC)andBayesianSchwarz(BIC),theHannan-Quinn(HQIC)iscommonlyused.MostappliedeconometriciansfavourtheHannan-Quinn(HQIC)criterion.STATAwillhelpyoutomakeagoodchoice.Afterspecifyingyourmodel,youneedtocheckstabilityconditions.ThecoefficientmatrixofthereducedformVARhastoensurethattheiterationsequenceconvergestoalong-termvalue.STATAwillhelpyouincheckingstability.
Tobeprecise,youneedtoshowthattheeigenvaluesofthecoefficientmatrixliewithintheunitcircle.Thereasonbehinditcanbeonlyunderstoodwhenyouunderstandthemethodofdiagonalizingamatrix.
VARmodelsofferanothernicefeature:
impulseresponsefunctions.VARmodelscapturethedynamicsoftwo(ormore)stationarytimeseries;hence,wecanassessthedynamicimpactofamarginalchangeofonevariableonanother.ThestandardOLSregressionprovidescoefficients,andcoefficientsrefertothepartialimpactofanexplanatoryvariableonthedependentvariable.InthecaseofVARmodels,therelationshipbecomesdynamic,asachangeofonevariable(sayx)intcanaffectxandyint+1.Theimpactonxandyint+1inturnaffectsxandyint+2andsoonuntiltheimpactdiesout.Impulseresponsefunctionsareveryusefulinillustratingtheshort-termdynamicsinamodel.
Let’slookatanexampletoseehowVARmodellingworks.InLecture5,wetriedveryhardtounderstandgoldprices.Weextendourunivariatemodelbyexploringtherelationshipsbetweengoldandsilverprices.Linkingtwo(similar)assetsorsecuritiesisaverycommontradingstrategy,whichiscalledpairs-trading.
Beforewedoanysophisticatedmodelling,itisalwaysbeneficialtolookatsomelinecharts.Figure1showstheindexedtimeseriesofnominalgoldandsilverpricesfrom1900to2010.
Figure1:
Nominalgoldandsilverprices,indexed,1900-2010
Wecanseethatthereisacertaindegreeofco-movement,whichwemightbeabletoexploitforourtradingstrategy.BeforewecanuseVAR,weneedtoensurethatbothtimeseriesarestationary.ItisobviousfromFigure1thatgoldandsilverpricesarenotstationary.However,aftertakingafirst-differencewecanshowthatpricechangesarestationary.SobothtimeseriesareI
(1).
Thenextstepistodeterminetheoptimallaglengthusinginformationcriteria.Table1showsdifferentspecificationsusingthevarsoccommand.
Table1:
Determiningtheoptimallaglengthusinginformationcriteria
BasedontheAICandHQIC,twolagsareoptimal;however,the(S)BICprefersonlyonelag.IwouldpreferHQICandtrytwolagsfirst.Ifthesecondlagdoesnotexhibitsignificantcoefficient,wecouldtrytoreducethelaglengthinlinewith(S)BIC.
WerunaVARwithtwolagstoexplaincurrentpricechangesingoldandsilver.Table2providestheOLSestimates.
Table2:
VARmodelwithtwolags
Weseethatsilverprices(lag2)affectcurrentgoldprices,andwecanestablishautocorrelationinbothtimeseries.TotestwhethergoldGrangercausessilverorviceversa,werunGrangercausalitytestsreportedinTable3.
Table3:
Grangercausalitytests
Hence,weconfirmthatpastchangesinsilverpricescanpredictfuturegoldpricechanges.Thisisveryinteresting,asitcanbeusedtodevelopatradingstrategy.Finally,weneedtoshowthattheVARisstable(seeTable4).
Table4:
StabilityconditionoftheVAR
Finally,wecanillustratetheimpactofsilverpricechangesonfuturegoldpricechangesusinganimpulseresponsefunction.Figure2showstheimpulseresponsefunctionandconfidenceintervalsderivedfrombootstrapping.Ifsilverpricesincreasetodayby1%,weshouldexpectasignificantdeclineingoldpricesintwoyearsby0.2%.
Figure2:
Impulseresponsefunction
6.3Cointegration
WhenweexploreFigure1abitmorecarefully,wecanseethatsilverandgoldpricesexhibitacertaindegreeofco-movement.Wecouldalmostarguethattheyshareacommonstochastictrend.ThelimitationofARIMAandVARmodelsisthattheycanbeonlyusedifthetimeseriesarestationary.Inourcase,wehadtofirst-differenceyourtimeseriestoensurestationarity.First-differencingeliminatesalotofinformationinthetimeseries.Istherenobetterwaytoanalysegoldandsilverprices.
Longbeforethedevelopmentofmultivariatetimeserieseconometrics,peoplerealisedthatgoldandsilverseemtohaveacommonmovementaroundalong-termequilibrium(gold-silverpriceratio).Moreover,theideaofequilibriumconditionsineconomicsandtheavailabilityofmacroeconomictimeseriesledtothedevelopmentofcointegrationanalysis.
Theideaisverysimple.Eveniftwo(ormore)timeseriesarenon-stationaryandhencehavestochastictrends,theymightbestilldrivenbythesameunderlyingfactorsthatleadtotheirstochasticbehaviour.Therefore,weanalysethetimeseriesinlevelsandseewhetherwecanfindalong-termequilibrium–aso-calledcointegratingvector.
BeforeweexploretheJohansenprocedure,let’slookatthegold-silverratioovertimeshowninFigure3.
Figure3:
Thegold-silverratio,1900-2010
Theratiolookslikeamean-revertingprocess;thus,inthelongrunittendstogobacktoitslong-termequilibrium(mean).Basedontheratio,wecouldarguethatgoldseemstobeovervaluedcomparedtosilveratthemoment.
Ofcourse,takingtheratiosuggestsaverysimplecointegratingvector–infactweassumeaone-to-onerelationship.BeforewecanusetheJohansenprocedure,wehavetomakesurethatthetimeserieshavethesameorderofintegrationI(p).WealreadyknowthatgoldandsilverpricesarebothI
(1)timeseries.Table5showstheresultsoftheJohansentestforcointegration.InlinewiththeVARmodel,weusetwolags.
Table5:
Johansentest
Thenullhypothesisthatthereisnocointegration(r=0)canberejectedifweusethetracestatistic.However,thenullhypothesisthatwehaveonecointegratingvector(r=1)cannotberejected.Theproblemisthatthemax-lambdastatisticdoesnotsupportcointegration.Ialsotriedlog-pri