You are on page 1of 5

Stationary

Process
Inthisissue,thesecondtutorialinourdatapreparationseries,wewilltouchonthesecondmost importantassumptionintimeseriesanalysis:Stationarity,ortheassumptionthatatimeseriessample isdrawnfromastationaryprocess. Wellstartbydefiningthestationaryprocessandstatingtheminimumstationaryrequirementsforour timeseriesanalysis.Thenwedemonstratehowtoexaminesampledata,drawafewobservations,and highlighttheintuitionsbehindthem.

Background
Inamathematicalsense,astationaryprocessisastochasticprocesswhosejointprobabilitydistribution doesnotchangewhenshiftedintimeorspace.Consequently,parameterssuchasthemeanand variance,iftheyexist,alsodonotchangeasaresultofashiftintimeorposition.Thisisoftenreferred toasthestrictformofstationaryprocess. Let { X t } beastochasticprocess,where FX ( xt1 , xt2 ,..., xtN ) isthedensity(mass)distributionfunctionof thejointdistributionof { X t } .Then { X t } issaidtobestationaryif,forallvaluesofshift( )andall valuesof {t1 , t2 ,..., t N } ,

FX ( xt1 , xt2 ,..., xt N ) FX ( xt1 , xt2 ,..., xtN )


The FX (.) functionisnotaffectedbyashiftacrosstime. AsimplifiedexamplewouldbeaGaussianwhitenoiseprocess,whereeachobservationisidentically distributedandindependentfromallobservationsinagivensample.Consequently,thejointprobability distributionofthesampledataisexpressedasfollows:

FX ( xt1 , xt2 ,..., xt N ) FX ( xt1 ) FX ( xt2 ) ... FX ( xtN )


Furthermore,

FX ( xt ) FX ( xt )
Sothat,

FX ( xt1 , xt2 ,..., xt N ) FX ( xt1 , xt2 ,..., xt N )

DataPreparationStationarity

SpiderFinancialCorp,2012

Thestationaryprocessassumptionisverystrict,andisverydifficulttocheckforoutsideofafewtrivial cases(e.g.whitenoise).Forpracticaltimeseriesanalysis,aweaksensestationaryprocess(WSS)is adequate.

Weaksense stationary (WSS)


Aweakerformofstationaryprocessiscalledweaksensestationary(WSS)orcovariancestationary.The WSSrequiresthatonlythe1st(mean)andsecond(covariance)momentsdontvarywithrespectto time.

E[ xt ] E[ xt ] E[ xt xt ] E[ xt xt ] mx ( )

TheWSSisalsoreferredtoasafirstorderstationaryprocess.Furthermore,theWSSdefinitionleadsto thefollowingconclusions: 1. Thattheautocovariance()andautocorrelationfunctions()areonlydependenton shift over time 2. Theautocovariance( and autocorrelation functions ()aredependentontheabsolute valueoftheshift():

Note:Fortimeseriesanalysis;weshallonlyconcernourselveswiththeWSSformofstationaryprocess.

Checking for a stationary assumption


Letsassumewehaveatimeseriesdatasample;howdoweexamineitforstationarity?

1. Visual Method
Beforewedelveintostatisticaltestsforstationarity,letsdemonstrateinplainwordshowtoexamine forstationarityusingatimeseriesplot.Keepinmindthatwearelookingforarelativelystablemean andvarianceovertime.Mypreferredmethodistoplotthesampledata,movingaverage,and exponentialweightedvolatilityonthesamegraph. The(weighted)movingaverage(WMA)isaproxyfortheprocesssmarginalmean. Theexponentialweightedvolatility(EWMA)isaproxyfortheprocesssmarginalstandard deviation.

Examinethestabilityofthemeanandvarianceovertime.

Example
DataPreparationStationarity 2 SpiderFinancialCorp,2012

LetslookattheIBMstockdailyclosingpricesprocessbetweenJanuary2,2012andtoday(April3rd, 2012):

Thegraphaboveshowsatrendingsamplemeanbutratherstablevolatility.Asaresult,thestationary assumptiondoesnotholdfortheclosingpricesprocess. Note:TheEWMAfunctionassumesthattheprocessmeaniszero(0);however,thisisnotthecasefor theclosingpricesprocess,soweneedtodemeantheserieswithTSSUBbeforepassingittoEWMA.

Example:
LetslookatthedailylogreturnsofIBMstock:

DataPreparationStationarity

SpiderFinancialCorp,2012

Thedailylogreturnsexhibitastablemeanovertime,andthevolatilityissomewhatboundbetween0.6 1.2%pertradingday. Note:WetypicallyignorethefirstfewEWMAvaluesbecausethenumberofobservationsusedto calculatethosevaluesisverylimited,leadingtoinaccurateresults. Letslookatthesummarystatisticstable:

Thesampledatameanisnotsignificantlydifferentthanzero,andthevolatility(standarddeviation)is around0.8%,whichisthecenterlineforEWMAinoursample(excludingvaluesinthebeginningofthe sample). Insum,theIBMstockdailylogreturnsdatasamplelooksstationary. DataPreparationStationarity 4 SpiderFinancialCorp,2012

2. Statistical Test
Inpractice,thecommonreasonfornonstationarityinsampledataisthepresenceoftrendand integration(i.e.unitroot)betweentheobservationsthemselves. Anumberofstatisticaltestscanbeutilizedtoexaminethestationaryassumptionsbydecomposingthe processintothreeelements:adeterministictrend,arandomwalk(unitroot),andastationaryerror. Thefollowingtestsarecommonlyusedtoestablishthestationaryassumptions: (1) TrendstationaryKwiatkowskiPhillipsSchmidtShin(KPSS) (2) UnitrootTestorrandomwalktestAugmentedDickeyFuller(ADF)

The stationary assumption is not holding; what can I do?


Ifastationaryassumptionfailstohold,thesolutionitquitesimple:transformthedataintoastationary process. Howexactlydowegoaboutmakingthatkindoftransformation?Earlier,wementionedthatthe presenceoftrendand/orunitroot(integration)inthetimeseriescommonlyleadstononstationarity. Usingthestatisticaltest,wecancheckforthepresenceoftrendand/orunitroot.Next,weapply varioustechniquesincludingdetrending,seasonaladjustment,anddifferencing,inordertoyielda stationaryprocess. Infinancialtimeseries,unitroot(randomwalk)isoftenfoundintherawtimeseries,whiletrendmaybe foundinmacroeconomicdata.Ananalystsexperienceandfamiliaritywiththetypeoftimeseriesis criticalinpicking/applyingtheappropriatetransformationtechniques. IntheIBMstockclosingpricestimeseries,thedatashowedrandomwalkbehavior.Wecouldalsoeasily computetheACFfunctions,andwedemonstratedanACFforlagonewithavalueashighas100%.To removetherandomwalk,wetookthefirstdifferenceandendedupwithastationaryprocess. IMPORTANT:Weassumethattheunderlyingprocesshasnotundergoneanystructuralchanges(i.e. exogenousevents)withinoursampledata.

DataPreparationStationarity

SpiderFinancialCorp,2012

You might also like