Professional Documents
Culture Documents
Overview
TheapproachofthisfeatureistousetheUSCensusfreeprogram(akax12a.exe),whichprovidesusers withcompleteexcelinterfaceaswellasrawinputandoutputfilesforadvancedusers. TheUSCensusX12ARIMAprogrampossessesnouserinterface.Toinvokeit,theuserneedstowritea scriptinputfile(akaspecification)alongwiththedataandinvoketheprogramfromthecommandline interface.Oncecomplete,theprogramgeneratesvariousoutputmessagesandfilesindesignated folders. ToputannewExcelfaceonthiswidelyusedlegacyprogram,NumXLprovidesawizardordialogbox whichuserscanusetospecifythecellsrangeoftheirdata,selectvariousmodelingoptions,savethose settingsaspartoftheirExcelspreadsheetandquerythedifferentoutputsoftheirmodel. Behindthescenes,NumXLtransformstheusersdataandmodelselectionsintoanativex12a specificationfile.Finally,NumXLrunsthex12aprogram,readstheoutputfilesandavailstheresultsto theuserinexcel.
X12ARIMATutorial 1 SpiderFinancialCorp,2013
Data Preparation
Similartowhatwedidinourearliertutorial,weorganizeoursampledatabyplacingthedateinone columnandthevariablevaluesinaseparatecolumn,witheachobservationinaseparaterow.
NumXLremovesthemissingvaluesfromeitherendofthetimesseriesandadjuststheseriesstartdate, soitisnotanissue.Fortheuser,thenewrowservesasaplaceholderforfutureobservations;soas newdatabecomeavailable(published),theuserreplacesthemissingvalue(i.e.#N/A)withtheactual values,triggeringthemodelsformulaetoreevaluate,withouttheneedtoeditanythinginthe spreadsheet. IMPORTANT:TheX12Aprogramhasafewhardlimitsonthesizeofthetimeseries: 1. Themaximumlengthofatimeseriesis600observations 2. Theminimumlengthofmonthlytimeseriesis3years(36observations) 3. Theminimumlengthofquarterlytimeseriesis4years(16observations) Toaccommodatethoselimitsforlargertimeseries,NumXLpicksthemostrecent600observationsand adjuststhestartdateoftheseriesaccordingly.
Process
First,selectanemptycellinyourworksheettostoretheuniqueidentifieroryourX12ARIMAinExcel.
X12ARIMATutorial
SpiderFinancialCorp,2013
Next,LocatetheX12ARIMAiconinthetoolbar(ormenuinExcel2003)andclickonit.
TheX12ARIMAWizard(dialogbox)inExcelappears.
X12ARIMATutorial
SpiderFinancialCorp,2013
Fortheinputtimeseriesdata,selectthecellsrangeforthevalues,startdateandthefrequencyofthe observations(i.e.monthlyorquarterly).
Thissectionallowsyoutosetaspecialdatatreatmentpriortothemodelingprocess.Forinstance, TransforminstructstheX12aprogramtomodelthelogvaluesofourtimeseries. Intheregressionsection,usercanadjustforspecialcalendareffectssuchastradingdaysandholidays likeEaster.Formoredetailsoncalendareffectsandadjustment,refertoourdocumentonline: 1. CalendarEffects http://www.spiderfinancial.com/support/documentation/numxl/tipsandtricks/calendar effects IMPORTANT:TheEasterholidayeffectcommencesNdaysbeforeEaster.Currently,NumXLuses14 dayspriortoEaster.Thiswillbechangedinfuturereleasestopermitusertoselectavalue. Intheoutliertypesection,usercanselectwhichtypesofoutlierstodetectandadjustfor.Formore detailsonthosetypesofoutliers,refertoourdocumentonline: 1. DatapreparationOutliers: http://www.spiderfinancial.com/support/documentation/numxl/tipsandtricks/data preparationoutliers Now,letsexaminetheARIMAmodelsection:
X12ARIMATutorial
SpiderFinancialCorp,2013
TheX12ARIMAmethodology(regARIMA)usesaseasonalARIMA(SARIMA)modeltocaptureboththe seasonality(deterministic)andthe(stochastic)cyclicityinthedata. Theusermayelectfortheprogramtofindthebestfitmodel(AutoSelect)ortheycanspecifythe orderofthemodel. Formoreinformationabouttimeseriesdecompositionand/orseasonaladjustment,refertoouronline document. 1. PatternsUnplugged:http://www.spiderfinancial.com/support/documentation/numxl/tipsand tricks/patternsunplugged IntheForecastsection,wecanselectthedurationoftheforecast.Itissettoone(1)yearbydefault, butuserscanselectahigherforecasthorizonuptoseven(7)years(hardlimit). Now,letssettheseasonaladjustmentvalues:
X12ARIMATutorial
SpiderFinancialCorp,2013
UsingtheX11filteroption,theusercancontroltheseasonalmovingaverageused.Currently,thetrend movingaverageissetto13.
X12ARIMATutorial 8 SpiderFinancialCorp,2013
Notes: 1. TheOpenX12SPCfilebuttonbecomesenabled.
2. IfyouclickonOpenX12SPCfile,theWindowsNotepadapplicationwilllaunchwiththex12a specificationfileopened.
3. Intheselectedcellinyourworksheet,theX12ARIMAgeneratesauniqueidentifierforthe model.
4. TheRunX12Abuttonisenablednow.
X12ARIMATutorial
SpiderFinancialCorp,2013
Finally,letsrunthex12aprogram.ClicktheRunX12Abutton.NumXLinvokestheprogramand passesthespecificationfilegeneratedearlier.Uponcompletion,adialogboxpopsup.
ClickOK. Notethatallcommandbuttonsontheupperrightcornerofthedialogarenowenabled.
X12ARIMATutorial
10
SpiderFinancialCorp,2013
Letsexaminethestatus(i.e.warningsorerrors)producedbythex12aprogramexecution.ClickOpen X12ErrorFiletoviewthefile.
Again,theNotepadapplicationislaunchedandtheerrorfilegeneratedbythex12aprogramis displayed. Note: 1. Theerrorfile(x12a_34cc1761.err)hasthesamebasefilenameasthespecificationfilename (i.e.x12a_34cc1761.spc),whichistheuniqueidentifierofthex12arimamodel (x12a_34cc1761). 2. InthecaseofUSrealGDP,thex12adidnotdetectanysignificantseasonality,thusitthrowsa warning. 3. Thesecondparagraphofthewarningaboveisnotrelevanttoourcase,aswemodelthegross GDPtimeseries(ratherthanitsGDPcomponents(e.g.consumption,investment,government spendingandimport/export)). Optionally,tomayexaminetherawx12aoutput.ClickontheOpenX12Outputfilebuttonand,again, theNotepadapplicationislaunchedandthex12outputfileisdisplayed.
X12ARIMATutorial
11
SpiderFinancialCorp,2013
Outputs
Bynowyoumustbewondering,wherearethemodelsoutputs?NumXLoffersafewworksheet functionstoquerythemodelsdifferentoutputs. X12ARIMATutorial 12 SpiderFinancialCorp,2013
Tostart,letsquerytheX11seasonallyadjustedtimeseries.UsetheX12ACOMPfunctionforthis purpose.
Conclusion
Inthistutorial,wedemonstratedtheprocesstomodelanX12ARIMAmodelandderiveanX11 seasonallyadjustedtimeseriesinExcelusingNumXLsaddinfunctions. Throughoutthetutorial,wepresentedseveralelementsofNumXLsimplementationofX12ARIMA,in anattempttohelpyouresolveissuesthatmaypopupduringthemodelingprocess. Where do we go from here? First,toanswerthequestionofoptimality,weneedtointroduceadditionalalgorithmstoselectthe optimalsetoptionsandtheirvalues(e.g.X11filteroptions,X11mode,etc.)foragivendataset. Second,thesetofcalendarholidayssupportedisrelativelylimited.Bycombiningthecalendarfunctions inNumXL,wecanexpandthesetsignificantly. 1. Furthermore,weareplanningtoaddnonfixedholidayssuchasChineseNewYear,aswellas IslamicandJewishholidays. 2. Fullsupportforuserdefined(exogenous)explanatory/regressionvariables. Third,manyoftheeconomicdatacanberepresentedasasumoftheircomponents(e.g.GDPandits components:consumption,investment,governmentandimport/exportnet),somodelingthe componentsandtheirsumrequiresspecialhandling. Finally,theUSCensuswillreleasetheX13ARIMASEATSeditionoftheirprogram,sonewfiltering optionwillbecomeavailable.
X12ARIMATutorial
14
SpiderFinancialCorp,2013