Академический Документы
Профессиональный Документы
Культура Документы
Cointegration
Intimeseriesanalysis,weoftenencountersituationswherewewishtomodelonenonstationarytime
series(
t
Y )asalinearcombinationofothernonstationarytimeseries(
1, 2, ,
, ,...,
t t k t
X X X ).Inother
words:
1 1, 2 2, ,
...
t o t t k k t t
Y X X X | | | | c = + + + + +
Ingeneral,aregressionmodelfornonstationarytimeseriesvariablesgivesspurious(nonsense)results.
Theonlyexceptionisifthelinearcombinationofthe(dependentandexplanatory)variableseliminates
thestochastictrendandproducesstationaryresiduals.
1 1, 2 2, ,
... ~ (0)
t t t k k t
Y X X X I + + + +
Inthiscase,werefertothesetofvariablesascointegrated.Itisonlyinthiscasethatwecanlookat
regressionasareasonableandreliablemodel.
Inthispaper,welldiscussoneimportantquestion:
1. HowdoweexamineasetofnonstationaryvariablesforCointegration?
Infutureissues,welltacklethetopicsoflongrunandshortrundynamicsofcointegratedtimeseries
variablesusingOLSregressionanderrorcorrectionmodels.
Motivation
Cointegrationmeansthat,whilemanydevelopmentscancausepermanentchangesintheindividual
variable(i.e.
, i t
x ),thereissomelongrunequilibriumrelationtyingtheindividualvariablestogether,
representedbysomelinearcombinationofthem.
Why do we care?
Ignoringthecointegrationaspectintimeseriesvariablesmayleadtoaspuriousregressionproblem,
whichoccursifarbitrarilytrendingand/ornonstationaryseriesareregressedoneachother.
1. Inthecaseofadeterministictrendingseries,thespuriouslyfoundrelationshipisduetothe
trendgoverningbothseries,insteadoftheeconomicforces.
2. Inthecaseofnonstationarity(oftype (1) I ),theseriesevenwithouttrendtendstoshow
localtrends,whichtendtocomovealongforrelativelylongperiods.
Cointegration101 2 SpiderFinancialCorp,2013
Intrading,atradermaybuyonesecurityandhedgeitwithanothertypeofsecurity(e.g.spreads).Such
strategiesarebasedonthebeliefthattwosecuritiesaresomewhatrelatedandalongrunequilibrium
shouldexistbetweenthem.
Ineconomicsandfinance,academicsusecointegratedvariablestotestplausibleeconomic
relationships,underthehypothesisofalongrunequilibriumbetweennonstationarytimeseries(e.g.
disposableincomevs.privateconsumptions).
Background
Inanutshell,cointegrationassumesthereisacommonstochasticnonstationary(i.e. (1) I )process
underlyingtwo(ormore)processesXandY.
1
1
Z ~ (1)
~ (1)
~ (1)
, ~ (0)
t o t t
t o t t
t
t t
X I
Y Z I
Z I
I
c
o o q
c q
= + +
= + +
,
t t
c q arestationaryprocess( (0) I )withzeromean,buttheycanbeseriallycorrelated.
Although,
t
X and
t
Y arebothnonstationary( (1) I ),thereexistsalinearcombinationofthem,whichis
stationary:
1 1
~ (0)
t t
X Y I o
Inotherwords,theregressionofYandXyieldsstationaryresiduals{ }
t
c .
Ingeneral,givenasetofnonstationary(oftype (1) I )timeseriesvariables
1, 2, ,
{ , ,..., }
t t k t
X X X ,there
existsalinearcombinationconsistingofallvariableswithavector | ,suchthat:
1 1, 2 2, ,
... ~ (0)
t t k k t
X X X I | | | + + +
Where 0, 1,2,...,
j
j k | = = .Ifthisisthecase,thenthe ' X s arecointegratedtotheorderof C.I(1,1)
Cointegration101 3 SpiderFinancialCorp,2013
1, 2 2, ,
...
t t k k t t
X X X o | | c = + + + +
So,toestablishacointegrationrelationship,youwouldrunfirstanOLSregressionmodelforyour
variablesandtesttheresidualsforstationarity.
Soundssimple?Itis.Butwhichvariableshouldweselectasthedependentvariable?Doesitmatter?It
turnsoutthatitdoesmatter.
Why?Theresidualsvarybasedonwhichtimeseriesisdesignatedasthedependentvariable,andthe
testsmaygivedifferentresults.
Oneimportanttestforcointegrationthatisinvarianttotheorderingofvariablesisthefullinformation
maximumlikelihoodtestofJohansen(akaJohansentest).
Johansen Test
TheJohansentestapproachesthetestingforcointegrationbyexaminingthenumberofindependent
linearcombinations( k )foran mtimeseriesvariablessetthatyieldsastationaryprocess.
Why?
Earlyinthispaper,westatedthatcointegrationassumesthepresenceofcommonnonstationary(i.e.
(1) I )processesunderlyingtheinputtimeseriesvariables.
1, 1 1 1, 2 2, , 1,
2, 2 1 1, 2 2, , 2,
, 2 1 1, 2 2, , ,
...
...
...
...
t t t p p t t
t t t p p t t
m t t t p p t m t
X Z Z Z
X Z Z Z
X Z Z Z
o c
o | | | c
o c
= + + + + +
= + + + + +
= + + + + +
Thenumberofindependentlinearcombinations( k )isrelatedtotheassumednumberofcommonnon
stationaryunderlyingprocesses( p )asfollows:
p m k =
So,letsconsiderthreeplausibleoutcomes:
1. 0, k p m = = Inthiscase,timeseriesvariablesarenotcointegrated.
2. 0 ,1 k m p m < < < < .Inthiscase,thetimeseriesvariablesarecointegrated.
3. , 0 k m p = = .Alltimeseriesvariablesarestationary( (0) I tostartwith.Cointegrationisnot
relevanthere.
Cointegration101 4 SpiderFinancialCorp,2013
Byexaminingthenumberofindependentcombinations,weareindirectlyexaminingthecointegration
existencehypothesis.
TheJohansentesthastwoforms:thetracetestandthemaximumeigenvaluetest.Bothforms/tests
addresstheCointegrationpresencehypothesis,buteachasksverydifferentquestions.
Trace Test
Thetracetestexaminesthenumberoflinearcombinations(i.e. K )tobeequaltoagivenvalue(
o
K ),
andthealternativehypothesisfor K tobegreaterthan
o
K
: K
:
o o
A o
H K
H K K
=
>
TotestfortheexistenceofCointegrationusingthetracetest,weset 0
o
K = (nocointegration),and
examinewhetherthenullhypothesiscanberejected.Ifthisthecase,thenweconclude
thereisatleast
onecointegrationrelationship.
Inthiscase,weneedtorejectthenullhypothesistoestablishthepresenceofCointegrationbetween
thevariables.
Maximum Eigenvalue Test
Withthemaximumeigenvaluetest,weaskthesamecentralquestionastheJohansentest.The
difference,however,isanalternatehypothesis:
:K k
: k 1
o o
A o
H
H K
=
= +
So,startingwith 0
o
K = andrejectingthenullhypothesisimpliesthatthereisonlyonepossible
combinationofthenonstationaryvariablestoyieldastationaryprocess.Whatifwehavemorethan
one?Thetestmaybelesspowerfulthanthetracetestforthesame
o
K values.
Aspecialcaseforusingthemaximumeigenvaluetestiswhen 1
o
K m = ,whererejectingthenull
hypothesisimpliestheexistenceofmpossiblelinearcombinations.Thisisimpossible,unlessallinput
timeseriesvariablesarestationary( (0) I )tostartwith.
Cointegration101 5 SpiderFinancialCorp,2013
Step 2:
LocatethecointegrationtesticonintheNumXLmenuortoolbarandclickonit.
Cointegration101 6 SpiderFinancialCorp,2013
Step 3:
Usingthecointegrationwizard,selectyourinputvariables.Theselectionmayincludecolumnlabels.
Note:TheMaskfieldisusedtoexcludevariable/columnsfromtheanalysiswithoutchangingyour
inputdataintheworksheet.Inourtutorial,wewanttoincludeallofthem,sowecanleaveitblank.
Afterweselecttheinputdata,theOptionsandMissingValuestabsareenabled.
Step 4: (Optional)
Initially,allJohansentestsareselectedandamaximumlagorderiscalculatedfromtheinputdata,but
youcanoverrideanyofthoseoptionsasyouseefit.
Cointegration101 7 SpiderFinancialCorp,2013
Letsleaveitunchanged.
Step 5: (Optional)
Ifyourinputdatadoesnothaveanymissingvalues,youmayskipthisstep.
Bydefault,thecointegrationwizardwilltriggeranerrorifanyofthevariableshasamissingvalue.Thisis
acceptableforthistutorial.
ClicktheOKbutton.
Cointegration101 8 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.