Anda di halaman 1dari 10

Time

Series Analysis with NumXL


Inthisdocument,wewilldemonstratethefewstepstoconvertarawtimeseriesdataintoarobust forecastusingNumXL. Asanexample,weareusingthemonthlyelectricpowerdemand(inMWh)forthecityofJeddeh(Saudi Arabia)between2003and2010.
160000 140000 120000 100000 80000 60000 40000 20000 0
Sep-03 Sep-04 Sep-05 Sep-06 Sep-07 Sep-08 Sep-09 May-03 May-04 May-05 May-06 May-07 May-08 May-09 May-10 Sep-10 Jan-03 Jan-04 Jan-05 Jan-06 Jan-07 Jan-08 Jan-09 Jan-10

DEMAND

Thetimeseriesinthefigureabovedemonstratesaseasonalityoftwelve(12)monthsandanupward trendovertime. Thisdatacanbeexplainedbybreakingdownthepowerdemandintoits'twoprimarycomponents:(1) theindustrialdemand,and(2)theresidentialandbusinessdemand.Theresidentialandbusiness demandisinfluencedbyweatherpatterns(e.g.season).Youcanseethisthroughtheincrease/decrease useofelectricityforcooling/heating.Ontheotherhand,theindustrialdemandisratherflat.Asan input,theindustrialdemandisdrivenprimarilybytheeconomicconditionsofthecityorindustry,and tolessextentbyweatherpatterns.

NumXLTutorial

SpiderFinancialCorp,2011

Step 1: Summary Statistics


UsingNumXLtoolbar,launchthedescriptivestatisticsWizard.

Forourillustration,wewillkeepalloptionsselected.Foroutput,selectthecellinyourspreadsheet whereyouwishthetabletobewrittento:
DescriptiveStatistics AVERAGE: 99004.77 STDDEV: 26026.9 SKEW: 0.03 EXCESSKURTOSIS: 0.88 MEDIAN: 98989 MIN: 47772 MAX: 149954 Q1: 77524 Q3: 117380.5 SignificanceTest Target pvlaue 0.000 0.00% 0.000 0.000 45.76% 3.63% 5.00% Different? TRUE FALSE FALSE Test pvlaue Whitenoise 0.00% NormalDistributed? 19.85% ARCHEffect? 0.00% Result? FALSE TRUE TRUE

NumXLTutorial

SpiderFinancialCorp,2011

IMPORTANT:Inthetableabove,NumXLgeneratestheformulasintoyourspreadsheet.Youcaneasily reviewthecalculation,and,ifneeded,makeanyproperchanges.

Step 2: Correlogram Analysis


UsingtheNumXLtoolbar,launchtheCorrelogramWizard:

Forthisillustration,wewillcomputeandplottheACFandPACFforfirst20lags.

NumXLTutorial

SpiderFinancialCorp,2011

TheACFplotdemonstratesaclassiccasefortheAirLinemodelwithacyclelengthof12steps.

Step 3: Data Transformation


Thereisnoneedtotransformthedatabeforemodeling.TheAirLinemodelwillstabilizetheinputseries throughthedifferencingtermsinitsdefinition.

NumXLTutorial

SpiderFinancialCorp,2011

Step 4: Modeling
UsingNumXL,themodelingprocessconsistsof3majorsteps:(1A)modelspecification,(2B)calibration and(3C)residualsdiagnosis.

1A: Model Specification


ClicktheAirLineIconontheNumXLtoolbar.

NumXLwillprepareatableinyouspreadsheetwithmodelscoefficient,goodnessoffitandresidual diagnosisroutines.Note:thevaluesofthemodelarenotoptimalyet.

NumXLTutorial

SpiderFinancialCorp,2011

2B: Model Calibration


Selectthecellwherethemodeltablestartsfrom(i.e.AIRLINE(12)).Clickonthecalibrationiconinthe toolbar.

TheMSExcelsolverdialogwillpopuponyourscreenwithyourmodelspecificationsfilledin.Clickthe Solvebutton. IMPORTANT:InExcel2010,thesolverhasanonnegativeconstraintturnedonbydefault.The constraintrestrictsthemodel'scoefficientstononnegativevalues.Asaresult,thesolveryieldsaless thanoptimalsolution.Theconstraintisnotrelevantforthemodelcalibrationprocess,andshouldbe turnedoff. UncheckthisoptionbeforeyouclickSolve.

NumXLTutorial

SpiderFinancialCorp,2011

Theoptimizerlocatesasetofcoefficientvaluesthatfitsourdatabest,anddefinesastableAirLine model.

NumXLTutorial 7 SpiderFinancialCorp,2011

3C: Residual diagnosis

Theresidualsdiagnosisroutinesarealreadypopulatedinyourspreadsheetwithyourmodelparameters. Nowisagoodtimetoreexaminewhethertheoptimalmodelsatisfiestheunderlyingassumptions.

Step 5: Forecasting
ToperformaforecastusingNumXL,selectthecellofthemodelstable(i.e.AirLine).Clickonthe Forecasticoninthetoolbar.

Theforecastwizardwillpopup.Selecttherealizedobservations(i.e.tailpointsofyoursampledata), andtheforecasthorizoninunitsofsteps. NumXLTutorial 8 SpiderFinancialCorp,2011

Forthisillustration,thelast23observationsinthesampledatawerechosen,thentheforecasthorizon wassetto30steps(orunits),asshownabove.

Plottheforecastanditsconfidenceintervals.

NumXLTutorial

SpiderFinancialCorp,2011


100000 120000 140000 160000 180000 200000 20000 40000 60000 80000 0

NumXLTutorial
LL UL

10

Jan-11 Feb-11 Mar-11 Apr-11 May-11 Jun-11 Jul-11 Aug-11 Sep-11 Oct-11 Nov-11 Dec-11 Jan-12 Feb-12 Mar-12 Apr-12 May-12 Jun-12 Jul-12 Aug-12 Sep-12 Oct-12 Nov-12 Dec-12 Jan-13 Feb-13 Mar-13 Apr-13 May-13 Jun-13 Jul-13 Aug-13 Sep-13 Oct-13 Nov-13 Dec-13

SpiderFinancialCorp,2011

Anda mungkin juga menyukai