Professional Documents
Culture Documents
Cointegration 101 PDF
Cointegration 101 PDF
Intimeseriesanalysis,weoftenencountersituationswherewewishtomodelonenonstationarytime
series( Yt )asalinearcombinationofothernonstationarytimeseries( X 1,t , X 2,t ,..., X k ,t ).Inother
words:
Ingeneral,aregressionmodelfornonstationarytimeseriesvariablesgivesspurious(nonsense)results.
Theonlyexceptionisifthelinearcombinationofthe(dependentandexplanatory)variableseliminates
thestochastictrendandproducesstationaryresiduals.
Motivation
Cointegrationmeansthat,whilemanydevelopmentscancausepermanentchangesintheindividual
variable(i.e. xi ,t ),thereissomelongrunequilibriumrelationtyingtheindividualvariablestogether,
representedbysomelinearcombinationofthem.
Why do we care?
Ignoringthecointegrationaspectintimeseriesvariablesmayleadtoaspuriousregressionproblem,
whichoccursifarbitrarilytrendingand/ornonstationaryseriesareregressedoneachother.
1. Inthecaseofadeterministictrendingseries,thespuriouslyfoundrelationshipisduetothe
trendgoverningbothseries,insteadoftheeconomicforces.
2. Inthecaseofnonstationarity(oftype I (1) ),theseriesevenwithouttrendtendstoshow
localtrends,whichtendtocomovealongforrelativelylongperiods.
Cointegration101
SpiderFinancialCorp,2013
Intrading,atradermaybuyonesecurityandhedgeitwithanothertypeofsecurity(e.g.spreads).Such
strategiesarebasedonthebeliefthattwosecuritiesaresomewhatrelatedandalongrunequilibrium
shouldexistbetweenthem.
Ineconomicsandfinance,academicsusecointegratedvariablestotestplausibleeconomic
relationships,underthehypothesisofalongrunequilibriumbetweennonstationarytimeseries(e.g.
disposableincomevs.privateconsumptions).
Background
Inanutshell,cointegrationassumesthereisacommonstochasticnonstationary(i.e. I (1) )process
underlyingtwo(ormore)processesXandY.
X t o 1 Zt t ~ I (1)
Yt o 1Z t t ~ I (1)
Z t ~ I (1)
t ,t ~ I (0)
t ,t arestationaryprocess( I (0) )withzeromean,buttheycanbeseriallycorrelated.
Although, X t and Yt arebothnonstationary( I (1) ),thereexistsalinearcombinationofthem,whichis
stationary:
1 X t 1Yt ~ I (0)
Inotherwords,theregressionofYandXyieldsstationaryresiduals { t } .
Ingeneral,givenasetofnonstationary(oftype I (1) )timeseriesvariables { X 1,t , X 2,t ,..., X k ,t } ,there
existsalinearcombinationconsistingofallvariableswithavector ,suchthat:
Cointegration101
SpiderFinancialCorp,2013
So,toestablishacointegrationrelationship,youwouldrunfirstanOLSregressionmodelforyour
variablesandtesttheresidualsforstationarity.
Soundssimple?Itis.Butwhichvariableshouldweselectasthedependentvariable?Doesitmatter?It
turnsoutthatitdoesmatter.
Why?Theresidualsvarybasedonwhichtimeseriesisdesignatedasthedependentvariable,andthe
testsmaygivedifferentresults.
Oneimportanttestforcointegrationthatisinvarianttotheorderingofvariablesisthefullinformation
maximumlikelihoodtestofJohansen(akaJohansentest).
Johansen Test
TheJohansentestapproachesthetestingforcointegrationbyexaminingthenumberofindependent
linearcombinations( k )foran m timeseriesvariablessetthatyieldsastationaryprocess.
Why?
Earlyinthispaper,westatedthatcointegrationassumesthepresenceofcommonnonstationary(i.e.
I (1) )processesunderlyingtheinputtimeseriesvariables.
...
X m ,t 2 1Z1,t 2 Z 2,t ... p Z p ,t m ,t
Thenumberofindependentlinearcombinations( k )isrelatedtotheassumednumberofcommonnon
stationaryunderlyingprocesses( p )asfollows:
p m k
So,letsconsiderthreeplausibleoutcomes:
1.
k 0, p m Inthiscase,timeseriesvariablesarenotcointegrated.
2.
0 k m,1 p m .Inthiscase,thetimeseriesvariablesarecointegrated.
3.
Cointegration101
SpiderFinancialCorp,2013
Byexaminingthenumberofindependentcombinations,weareindirectlyexaminingthecointegration
existencehypothesis.
TheJohansentesthastwoforms:thetracetestandthemaximumeigenvaluetest.Bothforms/tests
addresstheCointegrationpresencehypothesis,buteachasksverydifferentquestions.
Trace Test
Thetracetestexaminesthenumberoflinearcombinations(i.e. K )tobeequaltoagivenvalue( K o ),
andthealternativehypothesisfor K tobegreaterthan K o
H o : K Ko
H A : K Ko
TotestfortheexistenceofCointegrationusingthetracetest,weset K o 0 (nocointegration),and
examinewhetherthenullhypothesiscanberejected.Ifthisthecase,thenweconclude thereisatleast
onecointegrationrelationship.
Inthiscase,weneedtorejectthenullhypothesistoestablishthepresenceofCointegrationbetween
thevariables.
Ho : K ko
H A : K ko 1
So,startingwith K o 0 andrejectingthenullhypothesisimpliesthatthereisonlyonepossible
combinationofthenonstationaryvariablestoyieldastationaryprocess.Whatifwehavemorethan
one?Thetestmaybelesspowerfulthanthetracetestforthesame K o values.
Aspecialcaseforusingthemaximumeigenvaluetestiswhen K o m 1 ,whererejectingthenull
hypothesisimpliestheexistenceofmpossiblelinearcombinations.Thisisimpossible,unlessallinput
timeseriesvariablesarestationary( I (0) )tostartwith.
Cointegration101
SpiderFinancialCorp,2013
TraceTestfor K o 0
MaximumEigenvalueTestfor K o m 1
Toestablishtheexistenceofcointegrationinasetoftimeseriesvariables,wewishtorejectthetrace
testnullhypothesis( K o 0 )andnotrejectthenullhypothesisofthemaximumeigenvaluetest(
K o m 1 ).
Now,letsgooverthestepsforconductingacointegrationtestinNumXL.
Step 1:
Organizedyourinputtimeseriesdataasadjacentcolumns.Eachcolumnrepresentsonevariableand
eachrowcorrespondstoanobservation.
Step 2:
LocatethecointegrationtesticonintheNumXLmenuortoolbarandclickonit.
Cointegration101
SpiderFinancialCorp,2013
Step 3:
Usingthecointegrationwizard,selectyourinputvariables.Theselectionmayincludecolumnlabels.
Note:TheMaskfieldisusedtoexcludevariable/columnsfromtheanalysiswithoutchangingyour
inputdataintheworksheet.Inourtutorial,wewanttoincludeallofthem,sowecanleaveitblank.
Afterweselecttheinputdata,theOptionsandMissingValuestabsareenabled.
Step 4: (Optional)
Initially,allJohansentestsareselectedandamaximumlagorderiscalculatedfromtheinputdata,but
youcanoverrideanyofthoseoptionsasyouseefit.
Cointegration101
SpiderFinancialCorp,2013
Letsleaveitunchanged.
Step 5: (Optional)
Ifyourinputdatadoesnothaveanymissingvalues,youmayskipthisstep.
Bydefault,thecointegrationwizardwilltriggeranerrorifanyofthevariableshasamissingvalue.Thisis
acceptableforthistutorial.
ClicktheOKbutton.
Cointegration101
SpiderFinancialCorp,2013
Whenexaminingtheoutputtables,keepthisinmind:
Underthetracetest,weaskedwhethertheresatleastonepossiblelinearcombinationforthe
inputvariablestoyieldastationaryprocess.Weexaminedthisquestionunderdifferent
assumptionfortheinputvariable,andtheyallpassed.Thus,wecanconcludethatthevariables
arecointegrated.
Next,underthemaximumeigenvaluetest,wewanttobesurethatthenumberoflinear
combinationsdoesnotequalthenumberofinputvariables.Why?Becauseiftheydo,theinput
variablesarestationarytostartwith,andcointegrationisnotrelevant.Again,wecarryonthe
testunderdifferentassumptionsfortheinputvariables.Inthisexample,theyallfailedthetest
asidefromonescenario,whichpassedmarginally.
Inconclusion,wewouldstatethattheinputvariablesarecointegrated.
Nowwhat?YoumayuseOLSregressionforonevariableusingtheothervariableswithouttherisk
ofgettingintoaspuriousregressionproblem.
Cointegration101
SpiderFinancialCorp,2013