8/3/2019 HFT Final Report
1/25
NicholasBucheleres
&MatthewBinder
EECS399:StrategicReasoningGroupAutomatedTradingSystemThesis
ProfessorMichaelP.Wellman
December14,2011
8/3/2019 HFT Final Report
2/25
TableofContents
ProjectGoals...03
Foreword...03
ProjectAbstract.04
Introductory$GLD&$GVZCharts06
TestCase#1.11
TestCase#1Summary..17
TestCase#2..18
TestCase#2Summary...24
ProjectSummary25
8/3/2019 HFT Final Report
3/25
Intodaysbusinessworldoffinancialregulation,fraud,andinvestoruncertainty,international
assetmarketshavebecomeveryunsureofthemselves.Traditionalrisk-managementand
forecastingtechniquesarenolongerrelevant,andmanisbecomingincreasinglylessrelevant
comparedtothemachine.Thesearealltrendsthathavebecomeapparenttous,especiallytoNick
athistimeatBankofNewYork/Mellonoverthesummer.Wehadmanyconversationsaboutthe
inefficiencyofthemanualtradersatBNY,andthatsparkedourinterestinthefieldof
quantitative/automatedtrading.
Wehadageneralideaofwhatwewantedtoaccomplish,butbothofuswereadmittedlyquite
ignorantaboutthesecretivefieldofquantitativetrading.So,wegrabbedacouplebooks,anddove
rightin.Thisiswhatwefound.
Westartedoffthesemesterexperimentingwithquantbench.comsstatisticalanalysisplatform.
AfterspendingacoupleofweekswithQuantBench,wedecidedthatitwasnotcompatiblewith
ourgoalsforthesemesteranddidnotoffertheflexibilityandfreedomthatweneeded.Nextwe
workedwithGeniusTrader,anopensourceandhigh-powertechnicalanalysisandtrading
simulationplatformwritteninperl.WhileGeniusTraderhadthepotentialtoallowustodoour
research,itwasnotapracticaltoolforourpurposesbecauseitwaspoorlydocumented,
unsupported,andnearlyimpossibletomodifywithoutbreaking.Finallyafterseveralfalsestarts,
wefoundanopensourcetradingplatformcalledTradeLinkthatwaswritteninC#andappeared
tosuitallofourneeds.TradeLinkisanenterprisegradesoftwareprojectthatwasgraciously
distributedtothepublicdomainbyitsoriginalauthor.TradeLinkhasseveralcomponentsthat
allowittoserverasacompleteautomatedtradingsystemandconnecttoandplaceautomatic
tradeswithseveralofthemajoronlinebrokerages.WeweremainlyinterestedinTradeLink
becauseitwasopensourceandhadamodulardesignthatmadeiteasytoimplementcustom
algorithmsandstrategies.UnlikeGeniusTrader,TradeLinkisverythoroughlydocumentedandis
stillaliveprojectwithdozensofprogrammersreleasingupdatesonaregularbasis.Westarted
thesubstantivepartofourresearchafterdecidingthatTradeLinksuitedourneeds.Nickdesigned
threesimpletypesofalgorithmsforustotest:meanreversion,movingaverages,and
8/3/2019 HFT Final Report
4/25
8/3/2019 HFT Final Report
5/25
Abstract:
Atthebeginningofthesemesterourgoalwassettoexecutethefollowingapproachinorderto
answerourfundamentalquestion:
Wewillparseourtimeseriesintotwopieces.Giventhefirstpiece,wewilldevelopeachstrategytooptimizehistoricalreturnsforthepastperiod,remainingconsciousofprevailingvolatilityeffectsthatwenoticeforeachtimeseriesontheperformanceofouralgorithms.
Oncewehaveoptimizedeachstrategyovertime[-1,0),wewillthentreatt=0asthepresent,andactasif(0,1]isoneyearintothefuture.Wewanttoavoidpurebacktestingbecauseourresultswillsimplyreflectourabilitytofitstrategiestohistorical
dataandwillnotnecessarilyhaveanypredictivecapability.Althoughsomefalse-startswereencountered,wehavemanagedtofullyrealizetheresearchvalue
ofourinitialgoal:toanalyzevariousautomatedtradingstrategiesofonepriceseriesgivenascope
ofdecreasingvolatility,netzerovolatility,andincreasingvolatility.
WefoundSPDRsgoldETF$GLDanenticingfitformultiplereasons:italmostexactly(inmost
cases,exactly)followsthespotpriceofgold;it(gold)isahighlyliquidassetthatissensitiveto
changesinvolatility,and,amongotherlessintuitivereasons,goldpricesarenotsubjecttothe
largelyunpredictable,news-drivenpricegapsthattraditionalequitiesface.
Ourfirststepwastodownloadthree,threemonthtimeseriesof$GLDintra-daytradedata.These
datawerechosenfrom,asaforementioned,oneperiodofconstantlydecreasingvolatility,one
periodofnetzerochangevolatility,andoneperiodofconstantlyincreasingvolatility.Asa
benchmarkforgoldvolatilityweusedtheCBOEs$GVZgoldvolatilityindex.
Themostmarkedperiodofrecent,constantlydecreasinggoldvolatilitywas11/25/2008through
2/25/2009;themostmarkedperiodofnetzerovolatilitywas9/15/2009through12/15/2009;
andthemostmarkedperiodofincreasingvolatilitywas6/30/2011through9/30/2011.
Ourfirstteststrategyisasimplemovingaverage(SMA)indicator,whichgeneratessignalswhen
$GLDinterfereswithourSMAdistinctions.Followingthat,weimplementedameanreversion
8/3/2019 HFT Final Report
6/25
strategy.Forthemeanreversionstrategy,weusedamovingaverageindicator,similartothe
SMA,butinsteadofplayingmomentumandbuyingup-trendsandsellingdownwardviolations,we
postulatedthatwhen$GLDmovesabovethemovingaverage(mean)thatitwouldreturnbackto
itsmean.
Thetestresultsareasfollows:
GoldpricesasreflectedthroughoneofthemostliquidETFs$GLD.
8/3/2019 HFT Final Report
7/25
GoldvolatilitymeasuredbytheCBOEgoldvolatilityindex$GVZ
Period#1:Decreasingperiodofgoldvolatilityfrom11/25/2008through2/25/2009.
8/3/2019 HFT Final Report
8/25
Period#1:$GLDpricemovementunderdecreasingvolatility.
Period#2:$GLDpricemovementundernetzerovolatility.
8/3/2019 HFT Final Report
9/25
8/3/2019 HFT Final Report
10/25
Period#3:Goldvolatilityfrom6/30/2011through9/30/2011.
8/3/2019 HFT Final Report
11/25
Case#1SimpleMovingAverageOperationParameters2.5hourSimple(Unweighted)MovingAverageProfittarget=$20,000Positionsize=$100IntervalWindow=15minutesIntervalWindowMultiplier=10barsDecreasingVolatility
Left:ResultsfromtheSimpleMovingAverage(SMA)back-testedunderdecreasingvolatility.Right:Tickdatacorrespondingtoback-testeddecreasingvolatilitySMA.
8/3/2019 HFT Final Report
12/25
NetZeroVolatility
Left:IndicatingvalueofSMAatcrossoverpointsundernetzerovolatilityconditions.Right:DescriptionsoftimeofSMAcrossover,positionentry,direction,andexit.
8/3/2019 HFT Final Report
13/25
Left:Positionstakenduringback-testingperiod. Right:OrdersplacedgeneratedbySMAcrossovers.
8/3/2019 HFT Final Report
14/25
Left:Tickdatacorrespondingtonetzerovolatility$GLDpriceseries. Right:Strategyresultsfromnetzerovolatilityback-test.
8/3/2019 HFT Final Report
15/25
Above:Ordersfilledduringback-testsimulation.
8/3/2019 HFT Final Report
16/25
IncreasingVolatility
Left:MessagesdetailingsignalgenerationsfromSMAcrossovers.Right:ResultsfromSMAsback-testperformanceunderincreasingvolatility.
8/3/2019 HFT Final Report
17/25
TestCase#1SummaryUnderthethreemonthdecreasingvolatilityback-test,theSMAstrategyproducedagrosslossof
$328;underthethreemonthnetzerovolatilityback-test,theSMAstrategyproducedagrossloss
of$1043;andunderthethreemonthincreasingvolatilityback-test,theSMAstrategyproduceda
grosslossof$687.
Basedonourfindings,wecanconcludethattheSMAstrategywasnotrobustinthegeneralsense.
Wefind,though,thatthenetzerovolatilityconditionsyieldedthelargestlossofthethree
strategies.Wedeterminethatavolatilityconditionmarkedbymoredrasticandmorefrequent
reversals(zigzagpattern)leadtothefailureoftheSMAstrategyunderthenetzerovolatility
conditions.Duetothespecificexecutionparametersinterval,time,andsizethesefindings
mayormaynotbeageneral,stylized,objectivetrend.
8/3/2019 HFT Final Report
18/25
TestCase#2MeanReversionOperationParameters2.5hourSimple(Unweighted)MovingAverageProfittarget=$20,000Positionsize=$100IntervalWindow=15minutesIntervalWindowMultiplier=10barsDecreasingVolatility
Left:$GLDpriceseriesunderdecreasingvolatilitycondition.Right:Ordersfilledduringtestsimulation.
8/3/2019 HFT Final Report
19/25
Left:Resultsfrommeanreversionbacktestwithdecreasingvolatility.Right:Tickdataof$GLDunderdecreasingvolatilitycondition.
8/3/2019 HFT Final Report
20/25
NetZeroVolatility
Left:Signalsgeneratedwithmeanreversionstrategyundernetzerovolatility.Right:Resultsfrommeanreversionbacktestperformanceundernetzerovolatility.
8/3/2019 HFT Final Report
21/25
Above:Tickdataof$GLDundernetzerovolatilitycondition.
8/3/2019 HFT Final Report
22/25
IncreasingVolatility
Left:Positionsenteredwithmeanreversionstrategyunderincreasingvolatilitycondition.Right:Resultsofmeanreversionstrategyperformancewithincreasingvolatility.
8/3/2019 HFT Final Report
23/25
Above:Tickdataof$GLDunderincreasingvolatilitycondition.
8/3/2019 HFT Final Report
24/25
TestCase#2SummaryUnderthree,three-monthperiodsofdecreasing,netzero,andincreasingvolatility,we
experiencedthreedisparateresultsfromthemeanreversionstrategy.Underdecreasingvolatility
ourmeanreversionstrategyprofited$1,274;undernetzerovolatilityourmeanreversion
strategylost$364;andunderincreasingvolatilityourmeanreversionstrategyprofited$384.
TheseresultsnearlymirrortheresultsfromourSMAstrategy.Itseemsthatwiththemean
reversionstrategy,andwiththeSMAstrategy,thenetzerovolatilityperiodproducedthemost
significantloss.Thisislikelyduetothesameconjecturethatwasmadeabove:periodsinwhich
volatilityswingsbetweenupanddownmakeitmoredifficultforthestrategiestoenterintotight
androbusttrades,andthusdonotcapturetheintendedprofitportionofagivenpricemovement.
Themeanreversionstrategyprovedtobeprofitablefortheperiodsofdecreasingandincreasing
volatility,whereastheSMAstrategydidnotprovetobeprofitableforanyofthevolatilityperiods.
8/3/2019 HFT Final Report
25/25
ProjectSummary
GiventheresultssummarizedinTestCase#1SummaryandTestCase#2Summary,wedonot
findsufficientevidencetoanswerourthesisbeyondareasonabledoubt,butourresearchhas
shedsomelightontothetopic.Althoughwehavenotreachedaspecificresult,weareabletonote
specificoutcomesofourexperimentthatenlightenreadersfromourperspective.
Assummarizedabove,wehavenoteddisparateperformancesofbothstrategiesundereachofthe
threevolatilityconditions.Wehavebeenabletoextrapolatethatoneoftheeffectsthatvolatility
hasontheperformanceofautomatedstrategiescomesasafunctionofthepersistenceofsaid
volatility.Ourstrategiesperformedthebestunderperiodsofnetchange(increasingor
decreasing)volatilityinwhichvolatilitytendedtomovelinearlyasopposedtothevolatility
undulationthatwenotedinthenetzerovolatilityperiods.Weattributethefailureofthe
strategiesunderthenetzeroperiodstotheunpredictable,meanrevertingnatureofthevolatility
duringthoseperiods.
Top Related