付费下载
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、实用文档Lecture66. Timeseriesanalysis:Multivariatemodels6.1 Learningoutcomes Vectorautoregression(VAR) Cointegration Vectorerrorcorrectionmodel(VECM) Application:pairstrading6.2 Vectorautoregression(VAR)向量自回归Theclassicallinearregressionmodelassumesstrictexogeneity;hence,thereisnoserialcorrelationbetween
2、errortermsandanyrealisationofanyindependentvariable(leadorlag).Aswediscovered,serialcorrelation(orautocorrelation)isverycommoninfinancialtimeseriesandpaneldata.Furthermore,weassumedapre-definedrelationofcausality:explanatoryvariableaffectthedependentvariable.传统的线性回归模型假设严格的外生性,误差项与可实现的独立变量之间没有序列相关性。金
3、融时间序列及面板数据往往都有很强的自相关性,假定解释变量影响因变量。WenowrelaxbothassumptionsusingaVARmodel.VARmodelscanberegardedasageneralisationofAR(p)processesbyaddingadditionaltimeseries.Hence,weenterthefieldofmultivariatetimeseriesanalysis.VAR模型可以当作是在一般的自回归过程中加入时问序列。Let'slookatastandardAR(p)proctortwovariables(ytandxt).The
4、nextstepistoallowthatlaggedvaluesofxtcanaffectytandviceversa.Thismeansthatweobtainasystemofequationsfortwodependentvariables(ytandxt).Bothdependentvariablesareinfluencedbypastrealisationsofytandxt.Bydoingthat,weviolatestrictexogeneity(seeLecture2);however,wecanuseamorerelaxedconcept,namelyweakexogen
5、eityAsweuselaggedvaluesofbothdependentvariables,wecanarguethattheselaggedvaluesareknowntous,asweobservedtheminthepreviousperiod.WecallthesevariablespredeterminedPredetermined(lagged)variablesfulfilweakexogeneityinthesensethattheyhavetobeuncorrelatedwiththecontemporaneouserrortermint.WecanstilluseOLS
6、toestimatethefollowingsystemofequations,whichiscalledaVARinreducedform.标准文案实用文档Thebeautyofthismodelisthatwedon'tneedtopredefinewhetherxoryareendogenous(thedependentvariable).Infact,wecantestwhetherx(y)isendogenousorexogenoususingGrangercausalitytestsTheideaofGrangercausalityisthatpastobservation
7、s(laggeddependentvariables)caninfluencecurrentobservations-butnotviceversa.Sotheideaisrathersimple:thepastaffectsthepresent,andthepresentdoesnotaffectthepast.STATAprovidesGrangercausalitytestsafterconductingaVARanalysis,whichisbasedontestingthejointhypothesisthatpastrealisationsdonotGrangercausethep
8、resentrealisationofthedependentvariable.Inmanyapplications,VARmodelsmakealotofsense,asacleardirectionofcausalitycannotbepredefined.Forinstance,thereisasubstantialliteratureonthebenefitsofinternationalisation(e.g.enteringforeignmarketthroughcross-borderM&A).Thereisevidencethatmultinationalsoutper
9、formlocalpeersduetothebenefitsofoperatinginmanycountries.Atthesametime,weknowthathigh-performingcompaniesaremorelikelytoenterforeignmarketsduetotheirownershipspecificadvantages.ThisargumentisbasedontheResource-basedViewandtheOLSframeworkdevelopedbyDunningandRugman(ReadingSchoolofInternationalBusines
10、s).TheVARmodelallowsyoutoincorporatebotheffects:infactyoucantestwhetherperformancedrivesinternationalisationorinternationalisationdrivesperformance.BeforeyoustartusingaVARmodel,youhavetomakesurethatthetimeseriesarestationary.SothefirststepistocheckwhetherthetimeseriesisstationaryusingDickey-Fullerte
11、stsandKPSStests.Thesecondstepistospecifytheoptimallaglength(p)ofthemodel.Thisisdonebycomparingdifferentmodelspecificationsusinginformationcriteria.ApartfromusingAkaike(AIC)andBayesianSchwarz(BIC),theHannan-Quinn(HQIC)iscommonlyused.MostappliedeconometriciansfavourtheHannan-Quinn(HQIC)criterion.STATA
12、willhelpyoutomakeagoodchoice.Afterspecifyingyourmodel,youneedtocheckstabilityconditions.ThecoefficientmatrixofthereducedformVARhastoensurethattheiterationsequenceconvergestoalong-termvalue.STATAwillhelpyouincheckingstability.Tobeprecise,youneedtoshowthattheeigenvaluesofthecoefficientmatrixliewithint
13、heunitcircle.Thereasonbehinditcanbeonlyunderstoodwhenyouunderstandthemethodofdiagonalizingamatrix.VARmodelsofferanothernicefeature:impulseresponsefunctionsVARmodelscapturethedynamicsoftwo(ormore)stationarytimeseries;hence,wecanassessthedynamicimpactofamarginalchangeofonevariableonanother.Thestandard
14、OLSregressionprovidescoefficients,andcoefficientsrefertothepartialimpactofanexplanatoryvariableonthedependentvariable.InthecaseofVARmodels,therelationshipbecomesdynamic,asachangeofonevariable(sayx)intcanaffectxandyint+1.Theimpactonxandyint+1inturnaffectsxandyint+2andsoonuntiltheimpactdiesout.Impulse
15、responsefunctionsareveryusefulin川ustratingtheshort-termdynamicsinamodel.标准文案实用文档LetslookatanexampletoseehowVARmodellingworks.InLecture,wetriedveryhardtounderstandgoldprices.Weextendourunivariatemodelbyexploringtherelationshipsbetweengoldandsilverprices.Linkingtwo(similar)assetsorsecuritiesisaverycom
16、montradingstrategy,whichiscalledpairs-trading.Beforewedoanysophisticatedmodelling,itisalwaysbeneficialtolookatsomelinecharts.Figure1showstheindexedtimeseriesofnominalgoldandsilverpricesfrom1900to2010.Figure1:Nominalgoldandsilverprices,indexed,1900-2010indexsindexgOA5RwbzOHWU20051nwuolWecanseethatthe
17、reisacertaindegreeofco-movement,whichwemightbeabletoexploitforourtradingstrategy.BeforewecanuseVAR,weneedtoensurethatbothtimeseriesarestationary.ItisobviousfromFigure1thatgoldandsilverpricesarenotstationary.However,aftertakingafirst-differencewecanshowthatpricechangesarestationary.Sobothtimeseriesar
18、eI(1).Thenextstepistodeterminetheoptimallaglengthusinginformationcriteria.Table1showsdifferentspecificationsusingthevarsoccommand.Table 1: Determiningtheoptimallaglengthusinginformationcriteria标准文案实用文档Numberofobs=105Selection-ordercriteriaSample:1906-2010lagllLRdfpFPEAICHQICSBIC234520.1
19、24.130.118551015819826126.00049-1.94511-1.92463-1.8945618.86612.9271.60868.013610.599*444440.0010.0120.8070.0910.031.000442-2.0486-1.98714-1.89694*.000422*-2.09552*-1.9931*-1.84276.000448-2.03465-1.89126-1.68079.000448-2.03478-1.85042-1.57982.000438-2.05954-1.83421-1.50347Endogenous:return_greturn_s
20、Exogenous:_consBasedontheAICandHQIC,twolagsareoptimal;however,the(S)BICprefersonlyonelag.IwouldpreferHQICandtrytwolagsfirst.Ifthesecondlagdoesnotexhibitsignificantcoefficient,wecouldtrytoreducethelaglengthinlinewith(S)BIC.WerunaVARwithtwolagstoexplaincurrentpricechangesingoldandsilver.Table2provides
21、theOLSestimates.Table 2: VARmodelwithtwolagsVectorautoregressionSample:1903-2010Loglikelihood=126.0166FPE=.0004Det(Sigma_ml)=.0003323EquationParmsRMSENo.ofobs=108AIC=-2.148455HQIC=-2.04776SBIC=-1.90011R-sqchi2P>chi2return_g5.1269270.242534.57860.0000returns5.1965690.130616.227630.0027Coef.Std.Err
22、.zP>|z|95%Conf.Intervalreturn_greturn_gL1一.4864107L2.-.0139809.1229856.1228173.96-0.110.0000.909.2453633-.2546979.7274581.2267361return_sL1.-.0068126L2.-.207786.0805903.0807151-0.08-2.570.9330.010-.1647668-.3659847.1511415-.0495874_cons.0277213.01248572.220.026.0032497.0521929return_sreturn_gL1.3
23、143786L2.1085011.1904648.19020381.650.570.0990.568-.0589257-.2642915.6876828.4812937return_sL1.1094293L2.-.3201805.1248083.12500150.88-2.560.3810.010-.1351905-.5651789.354049-.0751821_cons.024511.01933631.270.205-.0133875.0624095Weseethatsilverprices(lag2)affectcurrentgoldprices,andwecanestablishaut
24、ocorrelationinbothtimeseries.TotestwhethergoldGrangercausessilverorviceversa,werunGrangercausalitytestsreportedinTable3.Table 3: Grangercausalitytests标准文案实用文档GrangercausalityWaldtestsEquationExcludedchi2dfProb>chi2return_greturn_s6.76520.034return_gALL6.76520.034return_sreturn_g3.961520.138return
25、_sALL3.961520.138Hence,weconfirmthatpastchangesinsilverpricescanpredictfuturegoldpricechanges.Thisisveryinteresting,asitcanbeusedtodevelopatradingstrategy.Finally,weneedtoshowthattheVARisstable(seeTable4).Table4:StabilityconditionoftheVAREigenvaluestabilityconditionEigenvalueModulus2367286+.362415i.
26、432882367286-.362415i.4328806119136+.3747777i.3797406119136-.3747777i.37974Alltheeigenvalueslieinsidetheunitcircle.VARsatisfiesstabilitycondition.Finally,wecan川ustratetheimpactofsilverpricechangesonfuturegoldpricechangesusinganimpulseresponsefunction.Figure2showstheimpulseresponsefunctionandconfiden
27、ceintervalsderivedfrombootstrapping.Ifsilverpricesincreasetodayby1%,weshouldexpectasignificantdeclineingoldpricesintwoyearsby0.2%.Figure2:Impulseresponsefunction标准文案实用文档step95%CIimpulseresponsefunction(irf)Graphsbyirfname,impulsevariable,andresponsevariable标准文案实用文档6.3 CointegrationWhenweexploreFigur
28、e1abitmorecarefully,wecanseethatsilverandgoldpricesexhibitacertaindegreeofco-movement.Wecouldalmostarguethattheysharecammonstochastictrend.ThelimitationofARIMAandVARmodelsisthattheycanbeonlyusedifthetimeseriesarestationary.Inourcase,wehadtofirst-differenceyourtimeseriestoensurestationarity.First-dif
29、ferencingeliminatesalotofinformationinthetimeseries.Istherenobetterwaytoanalysegoldandsilverprices.Longbeforethedevelopmentofmultivariatetimeserieseconometrics,peoplerealisedthatgoldandsilverseemtohaveacommonmovementaroundalong-termequilibrium(goldsilverpriceratio).Moreover,theideaofequilibriumcondi
30、tionsineconomicsandtheavailabilityofmacroeconomictimeseriesledtothedevelopmentofcointegrationanalysis.Theideaisverysimple.Eveniftwo(ormore)timeseriesarenon-stationaryandhencehavestochastictrends,theymightbestilldrivenbythesameunderlyingfactorsthatleadtotheirstochasticbehaviour.Therefore,weanalysethe
31、timeseriesinlevelsandseewhetherwecanfindalong-termequilibrium-aso-calledcointegratingvector.BeforeweexploretheJohansenprocedurelet'slookatthe-goverratioovertimeshowninFigure3.Figure3:Thegold-silverratio,1900-2010Theratiolookslikeamean-revertingprocessthus,inthelongrunittendstogobacktoitslong-ter
32、mequilibrium(mean).Basedontheratio,wecouldarguethatgoldseemstobeovervaluedcomparedtosilveratthemoment.标准文案实用文档Ofcourse,takingtheratiosuggestsaverysimplecointegratingvector-infactweassumeaone-to-onerelationship.BeforewecanusetheJohansenprocedurewehavetomakesurethatthetimeserieshavethesameorderofinteg
33、rationI(p).WealreadyknowthatgoldandsilverpricesarebothI(1)timeseries.Table5showstheresultsoftheJohansentestforcointegration.InlinewiththeVARmodel,weusetwolags.Table5:Johansentest.johansprice_gprice_s,lags(2)Johansen-JuseliuscointegrationranktestSample:1901to2010Numberofobs=109H1:H0:Max-lambdaTraEige
34、nvaluesrank<=(r)statisticss(lambda)r(rank<=(r+1)(rancetatisticsk<=(p=2).11763126013.6408312.0758622118.599456582.240287.5994565Osterwald-LenumCriticalvalues(95%interval):Table/Case:1*(assumption:interceptinCE)H0:Max-lambdaTrace015.6719.9619.249.24Table/Case:1(assumption:interceptinVAR)H0:Ma
35、x-lambdaTrace014.0715.4113.763.76NormalizedBeta'price_gprice_svec1-1.549e-07.0000176vec24.183e-07-.00001694NormalizedAlphavec1vec2price_g69248.321447701.12price_s-5468.401514662.554Thenullhypothesisthatthereisnocointegration(r=0)canberejectedifweusethetracestatistic.However,thenullhypothesisthat
36、wehaveonecointegratingvector(r=1)cannotberejected.Theproblemisthatthemax-lambdastatisticdoesnotsupportcointegration.Ialsotriedlog-pricesinstead,whichiscommoninanalysinggold-silverratios;however,Idon'tobtainclearresults.Giventheextremeincreaseinvolatilityinprices,itmightbelikelythattherearestruct
37、uralbreaksinanallegedcointegrationvector.Structuralbreaksaredifficulttohandle.Anotherwaytolookatthisproblemistotestwhetherpriceratiosorlog-priceratiosarestationarytimeseries.Iftheyarestationary,thenthetwounderlyingtimeseriesarecointegratedandtheratioindicatesthecointegrationvector.AgainDickey-Fuller
38、testscannotrejectthenullhypothesis;hence,bothratiosdon'tseemtobestationary.标准文案实用文档6.4 Vectorerror-correctionmodel(VECM)TheVECMcombinesVARandcointegrationintooneframework.TheVARisextendedbyincludingdeviationsfromthelong-termequilibriumdefinedbythecointegrationvector.Thecoefficientofthedeviationf
39、romthelong-termequilibriumindicatesthespeedofadjustmentbackintoequilibrium.TheVECMcapturethelong-termrelationshipandtheshort-termdynamicsoftwoormoretimeseries.Let'sseehowitworksinthecaseofgoldandsilverprices.Table6reportstheVECMspecification,whichresemblestheVARwithtwolags.ItalsocontainstheCEcom
40、ponent;theco-callederror-correctioncomponentthatcapturesthedeviationfromthelong-termequilibriuminthepreviousperiod.SotheCEisalaggedandhencepredeterminedvariable,asrequiredbyOLSandtheVARframework.Table6:VECMbasedongoldandsilverpricesNo.ofobs=108=54.15731HQIC=54.28821SBIC=54.48015R-sqchi2P>chi2Vect
41、orerror-correctionmodelSample:1903-2010AICLoglikelihood=-2911.494Det(Sigma_ml)=8.93e+20EquationParmsRMSED_price_g61.5e+060.294942.663730.0000D_price_s649748.20.259835.794240.0000Coef.Std.Err.zP>|z|95%Conf.IntervalD_price_g_ce111.-.0048672.0135324-0.360.719-.0313903.0216559price_gLD.2714343.238468
42、21.140.255-.1959548.7388233L2D.8565381.23517553.640.000.39560261.317474pricesLD.56377846.5867810.090.932-12.3460713.47363L2D.-26.234715.670113-4.630.000-37.34793-15.1215_cons2813.244472046.20.010.995-922380.4928006.9D_price_s_ce111.0005916.00043921.350.178-.0002693.0014524price_gLD.-.007626i3.007739
43、9-0.990.324-.0227962.0075436L2D.0357519.0076334.680.000.0207914.0507123price_sLD.2898047.21378551.360.175-.1292072.7088166L2D.-1.064965.1840335-5.790.000-1.425664-.7042665_cons231462915321.091.510.131-6882.48753175.08Thespeedofadjustmentisnotsignificant,whichunderminestheideaofalong-runequilibriumin
44、goldandsilverpricesassuggestedbytheliterature.Wecanexplorestructuralchanges,whenweplotthepredictedlong-termequilibriumovertime.标准文案实用文档Figure4:Predictedlong-termequilibriumbasedonVECM7n¥eQUZ7n¥eQU40+eQMR-7n¥enwnQ_8A¥eonBo+QnMZ1-195020001900yearItisveryobviousthatthelong-termequil
45、ibriumundergoesstructuralbreaks.Wecouldsplitthetimeperiodintoastableandunstableperiod.Yetthemainissuewithstructuralbreaksisthattheyappeartobeobviousexpos匕butnearlyimpossibletopredictexante.Forinstance,ifwefocuson1900-1980,weobtainaverystrongresultthatunderlinescointegrationandadjustmentsintothelong-
46、termequilibrium.Hence,weconcludethatthegold-silverratioisnolongerareliablephenomenonthatwecouldrelyon.Nevertheless,wecanusetheshort-termdynamicscapturedintheVARtodoshort-termtrading.6.5Pairstrading-APPLICATIONTheideaofpairstradingisthatwetradetwosimilarsharesthataredrivenbysimilarmacroeconomicfactor
47、s.Inourexample,wefocusontheUSsteelindustryandtrytoidentifyatradingstrategybasedonUnitedStatesSteelCorporationandTitanInternational.Firstweneedtomodifythetimedimension,asNASDAQreportsthelatestsharepricesfirst.Weselected5-yearsofdailyclosingpricesforouranalysis.*Timedimensionneedstobemodifiedgent=_nre
48、placet=1264-t标准文案实用文档tssett*Linecharttwoway(lineus_steelt)(linetitant)Let'hsaveaquicklookatalinechartcombiningbothshareprices.Obviouslybothsharepricesarenon-stationary,whichweshouldconfirmfirstusingDickey-Fullertests.US_steelTitanWerunDickey-Fullertestsbasedonsharepricesandfirst-differencedtimes
49、eries.ThetestsconfirmthatbothtimeseriesareI(1).Hence,wecantrytofindacointegrationrelationfollowingtheJohansenprocedure.Beforewedothat,IsuggestthatweexploreaVARmodelanddeterminetheoptimallagstructure.*Returnsgenr_us=ln(us_steel)-ln(l.us_steel)genr_titan=ln(titan)-ln(l.titan)*Dickey-Fullerdfullerus_st
50、eeldfullertitandfullerr_usdfullerr_titan标准文案实用文档.varsocr_usr_titanSelection-ordercriteriaSample:6-1263Numberofobs=1258lagllLRdfpFPEAICHQICSBIC()460,1.882.3e-06*-7.31777*-7.3147*-7.30961*460;5.821.876140.7592.3e-06-7.31291-7.3037-7.2884460;3.846.04640.1962.3e-06-7.31135-7.29601-7.270523461).192.69234
51、0.6112.3e-06-7.30713-7.28565-7.249964I4611.913.438540.4872.3e-06-7.30351-7.27588-7.23Endogenous:r_usr_titanExogenous:_consWecannotestablishanyVARlagstructure,whichshowsthatthereishardlyanyserialcorrelationofreturns.ThisisgreatnewsfortheEfficientMarketHypothesis-butbadnewsforus.WhenyouexploreACandPAC
52、function,youwillalsodiscoverthatunivariateanalysiswon'tgoanywhere,asautocorrelationinreturnsisnotpresent.Luckily,wecanfindcointegrationwithTitanadjustingbacktolong-termequilibriumconditions.BasedontheVECM,wecanpredictthelevels(shareprices)ofbothstocks.Theseareone-stepaheadforecast.Whenshouldyoubuyandsell?Thisalsodependsontransactioncosts.Inpairstrading,yougolonginonestockandshortinthesecondstocktohedgeyourposition.Weneedtoavoidthatwehavetotradetoofrequentlytoreducetransactioncosts.Thefollowingfigurecumulatesthedeviationsfromthelong-termequilibriumandsh
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 路面标线涂料工期保障方案
- 疾控中心新建项目社会稳定风险评估报告
- 给排水管网更新改造工程监理规划
- 现代农业产业园项目规划设计方案
- 中医医院数据资产价值评估实施方案
- GBT 47779-2026 纺织品 机织物双轴向拉伸性能 断裂强力和断裂伸长率的测定标准立项发展报告
- 高标准农田节水灌溉施工方案
- 高中信息技术选修1字符串的应用教学设计-基于密码强度检测的项目化学习
- 初中地理【知识清单】内蒙古乡土地理简答速记
- 小学一年级综合实践活动下册“创意剪纸”教学设计(粤教版)
- 水利工程监理实施细则范本(2025版水利部)
- 护理病历的护理质量与安全管理
- 西安交通大学本科毕业设计论文模板管理资料
- 2026年肥胖患者的长期体重管理及药物临床应用指南
- 制药行业质量意识培训
- 【新教材】2025-2026学年湘美版(2024)美术二年级上册全册教案(教学设计)
- 2025年(第十二届)输电技术大会:无人机机载零值绝缘子检测装置
- 2025年江西省高考地理试卷真题(含答案及官方解析)
- 医院培训课件:《医务人员不良执业行为记分管理办法》
- 全国一等奖高中语文统编版必修上册《百合花》公开课课件
- 公司商业道德管理制度
评论
0/150
提交评论