tangentdistance[24],timealignment[25]–[27],ordynamictimewarpingkernels[28].Alsoprobabilisticmodels,suchasHMM8hiddenMarkovmodels)andGMM(Gaussianmixturemodels),thataretrainedonthetimeseriesdata,canbeusedincombinationwithSVM.Theso-calledFisher-kernelshavebeenwidelyused,e.g.,forspeechrecognition[29],[30],speakeridenti cation[31]–[33],orwebaudioclassi cation[34].[35],[36]usedanothersimilaritymeasureonGMM,theKullback-Leiblerdivergence,forspeakeridenti cationandveri cation.
Altogether,wecanstatethatdynamickernelfunctions[20]incorporatetemporalinformationdirectlyintoansupportvectormachine’skernelanduseitforcalculatingthesimilaritybetweendifferentinputtimeseries.Therefore,itbecomespos-sibletoalsodetectsimilaritiesbetweenmisalignedsequencesoravaryingfrequencyofthecontainedpatterns.C.DynamicTimeWarpingasKernelFunctionforSVMInourwork,weusedakernelbasedonthedynamictimewarping(DTW)method,whichhaspreviouslybeenutilizedforhandwritingandspeechrecognitionin[27],[28].Wealsorelyonownresultsdescribedin
[37].
Fig.2.ExamplefortheresultsobtainedwithDTW:Thecorrespondenceofpointsoftwosimilartimeseries(oneisdrawnwithaconstantoffsethere)isindicatedbyconnectinglines.
TheDTWkerneltakestwoinputtimeseriesandcalculatestheirsimilaritybydetermininganoptimalso-calledwarpingpathconsistingofpairsoftheirrespectivepoints.Eachpointofoneseriesisassignedtooneormorepointsoftheotherseries,obeyingthreeconstraints:
The rstandthelastpointsofbothseriesareassignedtoeachother.
Allassignmentsrespecttheseries’temporalorder.
Everypointofbothseriesbelongstoatleastoneassign-ment.
Thewarpingpathwiththeminimumsumofdistancesinitsassignmentswillbechosenastheoptimalwarpingpath.Otherdynamickernels,suchasthelongestcommonsubse-quence(LCSS)kernelwepresentedandinvestigatedin[37]followasimilarapproach.
IV.TESTSANDEXPERIMENTS
A.PreparationsandDataSetConstruction
Forourwork,weusedtheSVMroutinesfromthesoftwarepackageLibSVM[38].Theimplementationofthedynamickernelfunctionsfollows[37].
Tocomparetheforecastingaccuracyofthedifferentmodels,avarietyofdifferentmeasuresareusedintheliterature.How-ever,[39]and[40]showthatallofthepopularmeasuresareeithernotinvarianttoscalingorcontainunde nedintervals.Therefore,weusedthemeanabsolutescalederror(MASE)asproposedby[40],whichscalesthemeasurederrorusingthemeanabsoluteerrorofanaiveforecast(alsocalledrandomwalk).Thisforecastingtechniquesimplyassumesthattheresultforthenextpatternequalsthepreviousresult.
IfYtdenotestheobservationattimet∈{1,...,n}andFtistheforecast,wecallet=Yt Fttheforecasterror.Themeanabsolutescalederrorisde nedasthearithmeticmeanoftheforecasterrorsscaledbytheaverageerrorofarandomwalk:
MASE=mean
et |Y (1)i Yi 1| .
i=2Consequently,aMASEsmallerthan1.0indicatesthattheforecastingmethodperformsbetterthananaiveforecast.Appliedtothedomainoftechnicalanalysis,wecanseethatconstantMASEvaluessmallerthan1.0contradicttheef cientmarkettheory.Additionally,wespeci edthehitrateHITSofallforecasts,whichsimplyisthepercentageofcorrectlypredictedtrendsinthechart:HITS=
|{Fi|(Yi Yi 1)·(Fi Fi 1)>0,i=1,...,n}|
n
.
(2)
Fig.3.Inthediagram,weseehowthehistoryoftheFDAXwasdividedintosixdifferent,overlappingseriesofasizeof1000dayseach.Thelast250valuesofeachpart(approximatelyoneyear)wasusedtocalculatethepredictionaccuracyofthedevelopedsystemonthisspeci ctimeseries.Asaresult,amaximumnumberof750valueswasusedfortraining.
Forourexperiments,wedecidedtousetwopopularfutures:TheFDAXfutureonthestockindexDAX,andtheFGBLfutureonGermangovernmentbonds.Asallfuturespriceshaveapre-de nedenddateand,therefore,containperiodicbehaviorandpointsofdiscontinuity,thedatawasmanuallyadjusted.Tominimizetheimpactoftemporaryanomalies,we