You are on page 1of 8

Cointegration

Intimeseriesanalysis,weoftenencountersituationswherewewishtomodelonenonstationarytime
series( Yt )asalinearcombinationofothernonstationarytimeseries( X 1,t , X 2,t ,..., X k ,t ).Inother
words:

Yt o 1 X 1,t 2 X 2,t ... k X k ,t t

Ingeneral,aregressionmodelfornonstationarytimeseriesvariablesgivesspurious(nonsense)results.
Theonlyexceptionisifthelinearcombinationofthe(dependentandexplanatory)variableseliminates
thestochastictrendandproducesstationaryresiduals.

Yt 1 X 1,t 2 X 2,t ... k X k ,t ~ I (0)


Inthiscase,werefertothesetofvariablesascointegrated.Itisonlyinthiscasethatwecanlookat
regressionasareasonableandreliablemodel.
Inthispaper,welldiscussoneimportantquestion:
1. HowdoweexamineasetofnonstationaryvariablesforCointegration?
Infutureissues,welltacklethetopicsoflongrunandshortrundynamicsofcointegratedtimeseries
variablesusingOLSregressionanderrorcorrectionmodels.

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:

1 X 1,t 2 X 2,t ... k X k ,t ~ I (0)

Where j 0, j 1, 2,..., k .Ifthisisthecase,thenthe X ' s arecointegratedtotheorderof C.I(1,1)

Cointegration101

SpiderFinancialCorp,2013

Testing for Cointegration


Inprinciple,testingforCointegrationissimilartotestingthelinearregressionresiduals( t )for
stationarity.

X 1,t 2 X 2,t ... k X k ,t t

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 1,t 1 1Z1,t 2 Z 2,t ... p Z p ,t 1,t


X 2,t 2 1Z1,t 2 Z 2,t ... p Z p ,t 2,t

...
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.

k m, p 0 .Alltimeseriesvariablesarestationary( I (0) tostartwith.Cointegrationisnot


relevanthere.

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.

Maximum Eigenvalue Test


Withthemaximumeigenvaluetest,weaskthesamecentralquestionastheJohansentest.The
difference,however,isanalternatehypothesis:

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

Johansen Test with NumXL


InNumXL,theJohansentestcombinesthesetwotestformstoexaminethecointegrationassumption:

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

You might also like