Full text
MDSAA
Mas e ’s Deg ee P og am in
Da a Science and Ad anced Analy ics
TREND FOLLOWING ALGORITHMIC TRADING
WITH A REDUCED UNIVERSE OF
CRYPTOCURRENCIES
Using unsupe ised lea ning o uni e se educ ion and end
ollowing s a egies o gene a e p o i s
And é O ão Pe ei a
Disse a ion
p esen ed as pa ial equi emen o ob aining he Mas e Deg ee P og am in Da a Science and
Ad anced Analy ics
NOVA In o ma ion Managemen School
Ins i u o Supe io de Es a ís ica e Ges ão de In o mação
Uni e sidade No a de Lisboa
NOVA In o ma ion Managemen School
Ins i u o Supe io de Es a ís ica e Ges ão de In o mação
Uni e sidade No a de Lisboa
T end ollowing algo i hmic ading wi h a educed uni e se o
c yp ocu encies
Using unsupe ised lea ning o uni e se educ ion and end ollowing s a egies o
gene a e p o i s
by
And é O ão Pe ei a
Disse a ion p esen ed as pa ial equi emen o ob aining he Mas e ’s Deg ee in
Da a Science and Ad anced Analy ics, wi h a Specializa ion in Da a Science
Supe iso : Mau o Cas elli
May 2024
ii
STATEMENT OF INTEGRITY
I he eby decla e ha ing conduc ed his academic wo k wi h in eg i y. I con i m ha I
ha e no used plagia ism o any o m o undue use o in o ma ion o alsi ica ion o
esul s along he p ocess leading o i s elabo a ion. I u he decla e ha I ha e ully
acknowledge he Rules o Conduc and Code o Hono om he NOVA In o ma ion
Managemen School.
And é O ão Pe ei a
Lisboa, May 2024
iii
DEDICATION
I wan o exp ess my g a i ude o my pa en s o always belie ing in me and encou aging
me o aim highe han e e I hough possible. To my b o he s, I wan o exp ess my
hea el g a i ude o he pa hs you' e chosen, which ha e se ed as a cons an sou ce
o inspi a ion and guidance o me.
I wan o ex end my since e hanks o Ahmed Assad and Tomás Juhos o hei inc edible
pa ience and willingness o help me h ough he ups and downs o p o essional li e.
Lucas Ca alho and Dua e Caldas, you insigh ul alks on inance ha e been inc edibly
in luen ial in shaping he di ec ion o his p ojec .
To all my iends, hank you o you unwa e ing suppo and iendship h oughou his
jou ney. You kindness and ha d wo k inspi e me. He e's o many mo e ad en u es
oge he .
i
ABSTRACT
C yp ocu encies ha e e olu ionized ading wi h hei decen alized and ola ile
na u e, p esen ing unique oppo uni ies o end- ollowing s a egies. This s udy
in es iga es he enhancemen o such s a egies by implemen ing a educ ion in he
uni e se o c yp ocu encies based on hei simila i ies, aiming o imp o e ading
pe o mance. Addi ionally, a ma ke momen um classi ica ion will be cons uc ed o
analyze and compa e pe o mance ac oss di e en ma ke momen um en i onmen s.
By u ilizing Suppo Vec o Machines (SVM) and P incipal Componen Analysis (PCA), he
o e all uni e se o c yp ocu encies is educed o he mos simila c yp ocu encies
based on me ics o momen um, g ow h, and echnical analysis. This app oach aims o
add ess ma ke o e load caused by he conside able numbe o a ailable
c yp ocu encies, emo ing he mos e a ic c yp ocu encies.
To assess he e icacy o wo end- ollowing ading s a egies—an equally weigh ed
po olio app oach and a ime-weigh ed po olio app oach—we will u ilize a
momen um-based ading s a egy se ing as ou benchma k. All s a egies will be used
wi h he educed uni e ses p oduced by ou me hod. Addi ionally, a ma ke momen um
classi ica ion will be cons uc ed using ma ke capi aliza ion da a o he c yp o ma ke ,
wi h he goal o gaining ele an insigh s in o he e ec s o he o e all ma ke
momen um en i onmen on he pe o mance o he algo i hmic ading s a egies and
educed uni e se combina ions.
The inno a ion lies in he me hod o educing he c yp ocu ency uni e se by iden i ying
he mos simila okens du ing he same pe iod while asse ing he alue o
unsupe ised lea ning models like SVM and PCA in enhancing end- ollowing ading
s a egies by educing complexi y.
In summa y, his esea ch unde sco es he c i ical di e ences in sho and long end
o ma ion pe iods, he e ec i eness o end- ollowing app oaches, and he supe io
pe o mance o ime-weigh ed po olios, demons a ing how SVM and PCA can
enhance algo i hmic ading s a egies by educing complexi y and op imizing
p o i abili y in he dynamic c yp ocu ency ma ke .
KEYWORDS
C yp o Cu encies; Machine Lea ning; Unsupe ised Lea ning; Algo i hmic T ading;
T end Following
Sus ainable De elopmen Goals (SGD):
Con en
1. In oduc ion ...................................................................................................... 10
1.1 Mo i a ion ................................................................................................ 10
1.2 Aim and Objec i es ................................................................................... 11
1.3 Resea ch Ques ions ................................................................................... 11
1.4 Ou line o he Resea ch ............................................................................. 12
2. Li e a u e Re iew .............................................................................................. 13
2.1. C yp o ....................................................................................................... 13
2.1.1. C yp o Cu encies .............................................................................. 13
2.1.2. C yp o Ma ke ................................................................................... 13
2.2. Algo i hmic T ading ................................................................................... 14
2.2.1. Time Se ies ........................................................................................ 14
2.2.2. T end Following ................................................................................. 14
2.3. Machine Lea ning Me hods ....................................................................... 14
2.3.1. Suppo ec o machine ..................................................................... 15
2.3.2. P incipal componen analysis ............................................................. 15
2.3.3. Anomalies and ou lie s ...................................................................... 15
2.3.4. Anomaly De ec ion ............................................................................ 16
2.4. Me ics Rele ance ..................................................................................... 17
2.4.1. Momen um ....................................................................................... 17
2.4.2. Technical Indica o s ........................................................................... 17
3. Da a .................................................................................................................. 18
3.1. Da a Sou ce............................................................................................... 18
3.2. Da a Inges ion ........................................................................................... 18
3.2.1. Raw Field Desc ip ions ....................................................................... 18
3.3. Da a P epa a ion ....................................................................................... 19
3.3.1. Fea u e Enginee ing ........................................................................... 19
3.4. Da a No maliza ion ................................................................................... 22
4. Me hodology .................................................................................................... 24
4.1. A chi ec u e .............................................................................................. 24
4.2. Pa ame e ized Uni e se Fo ma ion ............................................................ 25
4.2.1. Me ics G oups .................................................................................. 26
i
4.2.2. Lookback Pe iod ................................................................................ 27
4.2.3. Selec ion Me hod .............................................................................. 27
4.2.4. Uni e se Size ..................................................................................... 28
4.3. Algo i hmic T ading S a egies Back Tes ing ................................................ 29
4.3.1. S a egy Type ..................................................................................... 29
4.3.2. Po olio Weigh ................................................................................ 31
4.4. Ma ke Momen um Signal ......................................................................... 31
4.5. E alua ion Me ics ..................................................................................... 32
5. Resul s and Analysis .......................................................................................... 35
5.1. Resul s ...................................................................................................... 35
5.1.1. Bes o e all alue pe pa ame e ........................................................ 35
5.1.2. Pa ame e Combina ion Analysis ........................................................ 37
5.1.3. Top Ranked Combina ions Analysis ..................................................... 40
5.2. Discussion ................................................................................................. 41
5.3. Limi a ions ................................................................................................ 42
6. Conclusions ....................................................................................................... 44
6.1. Academic Con ibu ion .............................................................................. 44
6.2. Fu u e Wo k .............................................................................................. 44
Bibliog aphical Re e ences ........................................................................................ 46
Appendix A ........................................................................................................... 51
Appendix B ........................................................................................................... 51
Appendix C ........................................................................................................... 51
Appendix D ........................................................................................................... 51
Appendix E ........................................................................................................... 52
ii
LIST OF FIGURES
Figu e 3.1: Candles ick cha wi h hou ly candles o he pai Bi coin / USD Te he . ..... 18
Figu e 3.2: Simple Pe cen age Change Equa ion ........................................................ 20
Figu e 3.3: Simple Mo ing A e age Equa ion ............................................................. 20
Figu e 3.4: Exponen ial Mo ing A e age Equa ion ..................................................... 20
Figu e 3.5: Bollinge Band Equa ions ......................................................................... 21
Figu e 3.6: Rela i e S eng h Index Equa ion ............................................................. 22
Figu e 3.7: Coe icien o Va iance Equa ion .............................................................. 22
Figu e 3.8: Min-max Fo mula .................................................................................... 23
Figu e 4.1: Hie a chical Flow o In o ma ion in he P oposed Solu ion........................ 24
Figu e 4.2: Pa ame e iza ion Explo a ion o Uni e se Fo ma ion ............................... 26
Figu e 4.3: SVM selec ion me hod example. .............................................................. 28
Figu e 4.4: PCA selec ion me hod example. ............................................................... 28
Figu e 4.5: Algo i hmic T ading S a egy wo k low. .................................................... 29
Figu e 4.6: A e age P o i & Loss Equa ion ................................................................ 32
Figu e 4.7: Sha pe Ra io Equa ion ............................................................................. 32
Figu e 4.8: So ino Ra io Equa ion ............................................................................. 33
Figu e 4.9: Max D aw Down Equa ion ....................................................................... 33
Figu e 4.10: Ku osis Equa ion .................................................................................. 34
Figu e 4.11: Skewness Equa ion ................................................................................ 34
Figu e 5.1: Ne and G oss Re u ns o Bes Long po olio. .......................................... 38
Figu e 5.2: Ne and G oss Re u ns o Bes Sho po olio. ......................................... 39
Figu e 5.3: Bea Ma ke Op imal Combina ion Flow .................................................. 40
iii
LIST OF TABLES
Table 3.1: Desc ip ion and Type o Da a o All Fields Inges ed Each Hou .................. 19
Table 4.1: Me ics G oups o Uni e se Fo ma ion ..................................................... 27
Table 5.1: Pa ame e O e iew ................................................................................. 35
Table 5.2: Selec ion Me hod Analysis. ....................................................................... 36
Table 5.3: Po olio Ac ion analysis. ........................................................................... 36
Table 5.4: Ma ke Class Con idence Le el Analysis ..................................................... 37
15
pa e ns by u ilizing s a is ical models and algo i hms.
The e a e main ca ego ies o machine lea ning algo i hms, each wi h i s unique way o
analyzing da a.
Supe ised lea ning algo i hms a e augh using labeled da a, in which each aining
ins ance is linked o a speci ic goal o esul . The objec i e is o he algo i hm o be able
o an icipa e ou comes based on p e iously unseen da a by lea ning a mapping unc ion
ha connec s inpu a iables o ou pu a iables. Supe ised lea ning is commonly
employed in asks such as diagnosing medical condi ions based on pa ien da a and
o ecas ing s ock p ices using his o ical and inancial indica o s. (Ko sian is, 2007)
Unsupe ised lea ning is he aining o an algo i hm o iden i y pa e ns o s uc u es
in da a wi hou he use o labels o any human in e ac ion. The algo i hm au onomously
disco e s no el insigh s and connec ions wi hin he da ase , wi hou equi ing any
human inpu o p ede ined a ge a iables. Unsupe ised lea ning o en encompasses
asks such as g ouping and dimensionali y educ ion. Dimensionali y educ ion
echniques, such as p incipal componen analysis (PCA), unco e la en pa e ns in da a
wi h a la ge numbe o dimensions (Gen leman & Ca ey, 2008).
Semi-supe ised lea ning algo i hms aim o op imize he pe o mance o supe ised
lea ning models by le e aging he addi ional in o ma ion p o ided by unlabeled da a.
This app oach excels in scena ios when he e is a sca ci y o labeled da a and a su plus
o unlabeled da a, a ci cums ance ha is equen ly seen in eal-wo ld con ex s ( an
Engelen & Hoos, 2020).
2.3.1. Suppo ec o machine
Suppo Vec o Machine (SVM) is a supe ised lea ning model adep a handling da a
classi ica ion and eg ession asks. Ope a ing e ec i ely in high-dimensional spaces,
SVM iden i ies he op imal hype plane o maximize he ma gin be ween di e en
classes o da a poin s, exhibi ing capabili ies in bo h linea and nonlinea classi ica ion
(Pisne & Schnye , 2020). Howe e , SVM's pe o mance may su e wi h la ge da ase s
o in he p esence o noise.
One-Class SVM, a speci ic case o he suppo ec o machine, exempli ies unsupe ised
machine lea ning. I can ain wi h unlabeled da a, dis inguishing be ween inlie s and
ou lie s. One-Class SVM achie es his by sepa a ing all da a poin s om he o igin and
maximizing he dis ance om his hype plane o he o igin (Schölkop , Williamson,
Smola, John , & Pla , 1999).
2.3.2. P incipal componen analysis
P incipal Componen Analysis (PCA) is a widely used echnique o dimensionali y
educ ion, enhancing in e p e abili y by ex ac ing signi ican ea u es om high-
dimensional da ase s. By p ojec ing da a on o a lowe -dimensional subspace, PCA
imp o es compu a ional e iciency and minimizes in o ma ion loss. This me hod is
in aluable o explo a o y da a analysis, ea u e ex ac ion, and isualiza ion asks
ac oss di e se domains (Song, Guo, & Mei, 2010).
2.3.3. Anomalies and ou lie s
While he e ms "ou lie s" and "anomalies" a e o en used in e changeably, hei
dis inc ion is nuanced ye c ucial in da a analysis, as hey ep esen dis inc concep s
16
wi h sub le di e ences in meaning and in e p e a ion.
Ou lie s, as de ined by G ubbs (1969), a e da a poin s ha signi ican ly de ia e om he
majo i y o da a poin s in a da ase . These de ia ions a e ypically cha ac e ized by
excep ional alues o placemen s ela i e o he dis ibu ion o he da a. Ou lie s may
a ise due o measu emen inaccu acies, inhe en a iabili y, o in equen occu ences
wi hin he da a. They a e o en iden i ied using s a is ical me ics such as s anda d
de ia ion, z-sco es, o in e qua ile ange, wi h a ocus on he dis ibu ional p ope ies
o he da a. Impo an ly, ou lie s do no necessa ily imply de ian beha io o pose
signi ican h ea s o he unde lying sys em o p ocess. As such, hey may be ea ed as
benign da a poin s ha can be sa ely igno ed o emo ed om he da ase wi hou
signi ican consequences.
On he o he hand, anomalies encompass a b oade ange o a ypical o un o eseen
obse a ions wi hin a da ase . While ou lie s ep esen a subse o anomalies, anomalies
can include a ious ypes o i egula i ies, pa e ns, o beha io s ha de ia e om
expec ed no ms o dis ibu ions (Chandola, Bane jee, & Kuma , 2009). Anomalies may
a ise om sys emic ailu es, audulen ac i i ies, unexpec ed e en s, o eme ging
ends ha a e no adequa ely cap u ed by he exis ing da a model. Consequen ly, mo e
sophis ica ed algo i hms may be equi ed o iden i y anomalies ha a e no eadily
appa en h ough simple s a is ical analyses.
The dis inc ion be ween ou lie s and anomalies unde sco es he impo ance o
conside ing he b oade con ex , domain knowledge, and speci ic objec i es when
analyzing da a and iden i ying i egula i ies. By unde s anding hese dis inc ions, da a
analys s and decision-make s can e ec i ely in e p e he esul s o anomaly de ec ion
me hods and make in o med decisions o add ess po en ial isks o oppo uni ies wi hin
hei da ase s.
2.3.4. Anomaly De ec ion
Anomaly de ec ion, also known as ou lie de ec ion, is a c i ical ask in a ious ields,
including cybe secu i y, inance, heal hca e, and indus ial moni o ing (Singh &
Upadhyaya, 2012).
Anomaly de ec ion echniques le e age a ious me hods, including s a is ical analysis,
machine lea ning algo i hms, and domain-speci ic knowledge. One common app oach
is o use machine lea ning algo i hms o au oma ically lea n pa e ns om da a and
de ec anomalies based on de ia ions om hose pa e ns.
Supe ised anomaly de ec ion in ol es aining a model on labeled da a, whe e
anomalies a e explici ly ma ked. The model lea ns o dis inguish be ween no mal and
anomalous ins ances based on he p o ided labels. This app oach is e ec i e when
labeled da a is eadily a ailable and when anomalies a e well-de ined. Howe e , i may
no pe o m well in cases whe e labeled da a is sca ce o when anomalies a e no clea ly
de ined.
Unsupe ised anomaly de ec ion, on he o he hand, does no equi e labeled da a.
Ins ead, i elies on iden i ying ins ances ha a e signi ican ly di e en om mos o he
da a. Clus e ing algo i hms, densi y es ima ion echniques, and dis ance-based me hods
a e commonly used in unsupe ised anomaly de ec ion. While unsupe ised me hods
a e mo e e sa ile and applicable o a wide ange o scena ios, hey may s uggle o
accu a ely de ec anomalies in complex da ase s wi h high-dimensional ea u es
(Gu h ie, Gu h ie, Allison, & Wilks, 2007).
17
Anomaly de ec ion me hods mus be ca e ully selec ed based on he cha ac e is ics o
he da a and he speci ic equi emen s o he applica ion. Fac o s such as he ype o
anomalies p esen , he a ailabili y o labeled da a, and he compu a ional esou ces
equi ed o aining and in e ence play c ucial oles in de e mining he mos sui able
app oach.
2.4. Me ics Rele ance
2.4.1. Momen um
Time-se ies momen um, a s a egy ocusing on an asse 's absolu e pe o mance o e a
his o ical pe iod, has ga ne ed a en ion in inancial esea ch. Moskowi z e al. (2012)
ound compelling e idence suppo ing his s a egy ac oss a ious secu i ies, sugges ing
ha pas e u ns posi i ely p edic u u e e u ns. This phenomenon, known as he ime-
se ies momen um e ec , is a ibu ed o signi ican au oco a iance in e u ns,
pa icula ly du ing pe iods o ma ke ola ili y. Howe e , skep icism exis s ega ding he
obus ness o hese indings, wi h some esea che s a ibu ing he obse ed e u ns o
ola ili y scaling a he han ue p edic i e powe (Kim, Tse , & Wald, 2016). Despi e i s
popula i y, ime-se ies momen um ules o en unde pe o m mo ing a e age ules,
indica ing he complexi ies o implemen ing his s a egy e ec i ely.
2.4.2. Technical Indica o s
Technical analysis is a me hodology ha use his o ical ma ke da a o o ecas u u e
p ice changes. The idea behind i s ope a ion is ha ma ke ac i i y encompasses all
accessible in o ma ion and ha p e ious p icing pa e ns end o ecu . Analys s employ
a ange o echniques and indica o s, including mo ing a e ages and cha pa e ns, o
disce n ends and p o ide ade ecommenda ions.
While echnical analysis o e s a sys ema ic app oach o ma ke analysis, i s
e ec i eness emains un egula o e ime (Zakamulin, 2014). Some s udies sugges ha
ma ke iming wi h mo ing a e ages can ou pe o m passi e s a egies, highligh ing he
po en ial alue o echnical analysis in in es men decision-making (Kilgallen, 2012).
18
3. Da a
3.1. Da a Sou ce
The ounda ion o he p oposed sys em elies on a cu a ed collec ion o ime se ies da a,
which is undamen al o ex ac ing meaning ul ea u es. This s udy u ilizes
c yp ocu ency ime se ies da a sou ced om Binance's API, a leading da a p o ide
enowned o i s ex ensi e co e age o c yp ocu encies. Each ime se ies co esponds
o a c yp ocu ency exchange pai , consis ing o a base cu ency and a quo e cu ency,
and is acqui ed o a p ede ined ime ame and equency. The s udy ocuses exclusi ely
on c yp ocu ency pai s wi h he quo e cu ency USDT (Te he ) o ensu e ha all da a
poin s a e s anda dized. While Binance o e s a ange o ime esolu ions om one
minu e o one mon h, his hesis ocuses exclusi ely on hou ly in e als. This s a egic
decision s ikes a balance be ween g anula i y and space e iciency, aligning wi h he
objec i es o his hesis. This wo k acks a o al o 457 symbols du ing he analysis
pe iod aiming o achie e a comp ehensi e ye manageable explo a ion o
c yp ocu ency ma ke dynamics.
3.2. Da a Inges ion
Candles ick cha s se e as aluable ools o gaining insigh s used in a ious echnical
indica o s. They isually depic he ela ionship be ween wo asse s alues o e ime,
ypically in ol ing a leas one cu ency. Technical analysis equen ly cen e s on
examining hese cha s o disce n pa e ns and ends. The undamen al uni o a
candles ick cha is a candle, which ep esen s a consis en ime leng h. Each candle
p o ides in o ma ion on he highes , lowes , opening and closing p ices o ha speci ic
pe iod. Addi ionally, sepa a e g aphs o en depic he o al asse olume aded and he
o al numbe o ades associa ed wi h each pe iod.
Figu e 3.1: Candles ick cha wi h hou ly candles o he pai Bi coin / USD Te he .
3.2.1. Raw Field Desc ip ions
In he ollowing able, we can obse e he desc ip ion and ype o da a o all ields
inges ed each hou .
Candle S ick Cha s
19
Table 3.1: Desc ip ion and Type o Da a o All Fields Inges ed Each Hou
Field Name
Field desc ip ion
Da a Type
symbol
A ading pai composed o a base cu ency and a quo e
cu ency
Tex
Open Time
The s a ime o he candles ick
Times amp
Open P ice
The p ice o he asse when he candles ick opened
Nume ic (25,10)
High P ice
The highes p ice o he asse du ing he candles ick's
du a ion
Nume ic (25,10)
Low P ice
The lowes p ice o he asse du ing he candles ick's
du a ion
Nume ic (25,10)
Close P ice
The p ice o he asse when he candles ick closed
Nume ic (25,10)
Close Time
The closing ime o he candles ick
Times amp
Quo e Asse Volume
The olume o he asse aded in e ms o he quo e asse
du ing he candles ick's du a ion
Nume ic (25,10)
Numbe o T ades
The numbe o ades execu ed du ing he candles ick's
du a ion
In ege
Take Buy Base Asse
Volume
The olume o he asse bough by ake s du ing he
candles ick's du a ion
Nume ic (25,10)
Take Buy Quo e Asse
Volume
The olume o he quo e asse bough by ake s du ing
he candles ick's du a ion
Nume ic (25,10)
3.3. Da a P epa a ion
A da ase comp ises mul iple obse a ions, e med a sample, cha ac e ized by a se o
alues e e ed o as ea u es. Missing da a is a p e alen sou ce o e o s in code, o en
igge ing excep ions. A emp ing o emo e missing alues may signi ican ly educe he
a ailable da a while dis o ing he u h, a scena io de imen al in machine lea ning. One
o he mos amilia challenges encoun e ed in da a cleaning and explo a o y analysis is
managing missing alues.
To main ain ideli y o Binance's p o ided u h, his hesis op s no o manage any
missing alues. Ins ead, missing da a is in e p e ed as indica i e o pe iods o ma ke o
c yp ocu ency ading pai inac i i y. The da ase unde goes p ep ocessing and
no maliza ion be o e analysis o op imize he da a o said analysis.
3.3.1. Fea u e Enginee ing
Fea u e enginee ing (FE) is a machine lea ning echnique aimed a enhancing he
e ec i eness o models by ans o ming aw da a in o mo e meaning ul a iables known
as ea u es. By ex ac ing domain-speci ic ea u es om he da a, FE no only
accele a es he lea ning p ocess bu also ele a es he model's pe o mance, ensu ing a
mo e accu a e ep esen a ion o he unde lying p oblem.
20
This wo k adop s a me hodology ha calcula es pe cen age changes in a iables by
means o di e en speeds (o lookback pe iods):
𝑅𝑡,𝑡−ℎ
𝑐=𝑃𝑡𝑐
𝑃𝑡−ℎ
𝑐− 1
Figu e 3.2: Simple Pe cen age Change Equa ion
• 𝑅𝑡,𝑡−ℎ
𝑐 is he e u n o c yp ocu ency 𝑐 be ween hou 𝑡−ℎ and 𝑡
• 𝑃𝑡−ℎ
𝑐 is he p ice o c yp ocu ency 𝑐 a close o hou 𝑡−ℎ
• 𝑃𝑡𝑐 is he p ice o c yp ocu ency 𝑐 a close o hou 𝑡
The mo ing a e age (MA) is a widely employed echnical indica o in inancial analysis
(Glend ange & T ei en, 2016). I s p ima y ole is o smoo h ou sho - e m luc ua ions,
imp o ing he in e p e a ion o ends h ough a line de i ed om successi e a e ages.
As new ading pe iods un old, he mo ing a e age is ecompu ed by in oducing
cu en in o ma ion while disca ding he oldes in o ma ion, he eby shi ing he
a e age along he ime scale. This indica o is he e o e classi ied as a lagging indica o
due o i s eac i e na u e elying solely on pas p ices o con i m ends e en hough i
aids in end p edic ion by il e ing ou noise om andom p ice luc ua ions, achie ed
h ough a e aging a ixed size o his o ical p ice le els known as he lookback pe iod. In
his hesis, wo ypes o MA a e employed: he Simple Mo ing A e age (SMA), which
assigns equal weigh s o all ime scales, and he Exponen ial Mo ing A e age (EMA),
which uses exponen ial weigh ing wi h a decay ac o 𝜆 as a sensi i i y adjus men o
ecen p ices.
𝑆𝑀𝐴𝑡,𝑙=1
𝑙+1 ∑𝑃𝑡−𝑖
𝑐
𝑙
𝑖=0
Figu e 3.3: Simple Mo ing A e age Equa ion
𝐸𝑀𝐴𝑡,𝑙=∑𝜆𝑖𝑃𝑡−𝑖
𝑐𝑙𝑖=0
∑𝜆𝑖
𝑙𝑖=0
Figu e 3.4: Exponen ial Mo ing A e age Equa ion
• 𝑃𝑡−𝑖
𝑐 is he p ice o c yp ocu ency c a close o hou 𝑡−𝑖
• 𝜆 is he decay ac o ,0≺𝜆≼1
• 𝑙 is he lookback pe iod in hou s
Bollinge Bands (BB) ocus on ola ili y as a key by using s anda d de ia ion in band
calcula ions. The bands a e made by a cen al line using SMA, and uppe and lowe
Simple Pe cen age Change
Mo ing A e ages
Bollinge Bands
21
bands mi o ing his a e age by s anda d de ia ions c ea ing non-symme ic bands
unlike mo ing a e age en elopes, which shi bands ela i e o he a e age. Aimed a
c ea ing bands sensi i e o ex eme de ia ions wi h quick eac ion o la ge p ice
luc ua ions, his app oach sugges s a lookback pe iod o wen y uni s wi h wo s anda d
de ia ions (Williams, 2006). Bollinge Bands a e e sa ile, applicable o a ious da a
equencies om in aday o mon hly. Ra he han gi ing absolu e buy o sell signals,
Bollinge Bands assess whe he p ices a e high o low ela i e o ecen his o y. They
o e a amewo k o unde s anding p ice mo emen s in ela ion o indica o s,
emphasizing a ela i e pe spec i e.
𝑀𝐵𝑡,ℎ=∑𝑃𝑡−𝑖
𝑐ℎ
𝑖=0ℎ
𝑈𝐵𝑡,ℎ=𝑀𝐵𝑡,ℎ+ 𝐷 √∑(𝑃𝑡−𝑖
𝑐−𝑀𝐵𝑡,ℎ )
ℎ
𝑖=0 ℎ
𝐿𝐵𝑡,ℎ=𝑀𝐵𝑡,ℎ− 𝐷 √∑(𝑃𝑡−𝑖
𝑐−𝑀𝐵𝑡,ℎ )
ℎ
𝑖=0 ℎ
𝐵𝐵𝑃𝑡,ℎ=𝑃𝑡𝑐−𝐿𝐵𝑡,ℎ
𝑈𝐵𝑡,ℎ−𝐿𝐵𝑡,ℎ
Figu e 3.5: Bollinge Band Equa ions
• 𝑃𝑡−𝑖
𝑐 is he p ice o c yp ocu ency 𝑐 a close o hou 𝑡−𝑖
• ℎ is he numbe o hou s in he lookback pe iod
• 𝑡 is he cu en hou
• 𝑀𝐵𝑡,ℎ ,𝑈𝐵𝑡,ℎ 𝑎𝑛𝑑 𝐿𝐵𝑡,ℎ a e espec i ely he Middle, Uppe and Lowe
Band alues a he close o hou 𝑡 ha ing a lookback pe iod o ℎ hou s
• 𝐵𝐵𝑃𝑡,ℎ is he Bollinge Bands Pe cen age (BBP), which is a me ic used o
gauge whe e he cu en p ice is ela i e o he Bollinge Bands.
The Rela i e S eng h Index (RSI) se es as a momen um oscilla o , e alua ing he speed
and size o p ice changes o de e mine i a ma ke is o e bough o o e sold. Typically
calcula ed using a lookback pe iod o ou een uni s, he RSI compa es he a e age gain
o up pe iods o he a e age loss o down pe iods wi hin his ime ame. I s alues ange
om 0 o 100, wi h eadings abo e 70 indica ing o e bough condi ions and hose below
30 sugges ing o e sold condi ions wi h di e gence be ween RSI and p ice o en
an icipa ing a po en ial end e e sal (Rani, 2020).
𝑅𝑆ℎ= 𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝐺𝑎𝑖𝑛ℎ
𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝐿𝑜𝑠𝑠ℎ
Rela i e S eng h Index
22
𝑅𝑆𝐼ℎ=100−( 100
1+𝑅𝑆ℎ)
Figu e 3.6: Rela i e S eng h Index Equa ion
• ℎ is he numbe o hou s in he lookback pe iod
• 𝑡 is he cu en hou
• 𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝐺𝑎𝑖𝑛ℎ= 𝑆𝑢𝑚 𝑜𝑓 𝐺𝑎𝑖𝑛𝑠𝑡
ℎ
• 𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝐿𝑜𝑠𝑠ℎ= 𝑆𝑢𝑚 𝑜𝑓 𝐿𝑜𝑠𝑠𝑒𝑠𝑡
ℎ
• 𝐺𝑎𝑖𝑛𝑠𝑡={∆𝑃𝑡𝑐 | 𝑃𝑡𝑐>0}
• 𝐿𝑜𝑠𝑠𝑒𝑠𝑡={∆𝑃𝑡𝑐 | 𝑃𝑡𝑐<0}
The coe icien o a ia ion (CV) measu es he ela i e a iabili y o a da ase compa ed
o i s a e age, i.e.
𝐶𝑉= 𝜎
𝜇
Figu e 3.7: Coe icien o Va iance Equa ion
• Whe e 𝜎 is he a e age o he da ase ,
• And 𝜇 is he measu e o he dispe sion o a iabili y o he da ase .
3.4. Da a No maliza ion
Da ase scaling, o no maliza ion, is a c i ical p ep ocessing s ep in machine lea ning
pipelines aimed a ha monizing ea u e scales o ensu e uni o mi y. This adjus men is
essen ial o enhancing he pe o mance o classi ica ion models.
Equalizing he scales o ea u es p e en s a ibu es wi h la ge o wide nume ical
anges om domina ing hose wi h na owe o lowe anges. This p e en s biases ha
could o he wise a ise, ensu ing ha a ibu es con ibu e p opo ionally o he analysis
ega dless o scale. Consequen ly, da ase scaling mi iga es bias and imp o es
classi ica ion pe o mance.
Resea ch consis en ly suppo s he idea ha scaling da a be o e model aining
signi ican ly boos s pe o mance compa ed o using non-scaled da a. Selec ing he mos
sui able echnique is a c ucial me hodological decision, as s udies ha e shown ha an
inapp op ia e scaling me hod can be mo e de imen al han no scaling he da a a all.
Thus, ca e ul conside a ion is necessa y o op imize model pe o mance (Amo im,
Ca alcan i, & C uz, 2023).
Min-max Scale
The Min-max Scale is a echnique used o ans o m ea u e scales, ensu ing ha he
ans o med alues all wi hin he in e al [0,1]. In his me hod, he scaling ac o is
Coe icien o Va iance
23
de e mined by he a ibu e's ange, while he minimum alue de e mines he
ansla ional ec o . As a esul , his echnique gua an ees a new minimum o ze o and
a new maximum o one. Howe e , i is impo an o conside ha he Min-max Scale
may encoun e di icul ies in equalizing means and a iances o dis ibu ions,
pa icula ly when dealing wi h da a con aining ou lie s. This limi a ion should be
conside ed when deciding whe he o use his me hod in da a p ep ocessing.
𝑥𝑖′= 𝑥𝑖− 𝑥𝑚𝑖𝑛
𝑥𝑚𝑎𝑥− 𝑥𝑚𝑖𝑛
Figu e 3.8: Min-max Fo mula
24
4. Me hodology
The me hodology sec ion o his hesis del es in o he comp ehensi e a chi ec u e o
he amewo k employed o he analysis. I begins wi h an o e iew o he o e all
design, p o iding insigh in o how he a ious componen s in e ac and unc ion
cohesi ely. Following his, each sec ion o he amewo k is examined in de ail,
highligh ing he speci ic oles and ope a ions ha con ibu e o he sys em's
pe o mance. By sys ema ically b eaking down he a chi ec u e and i s componen s, his
sec ion aims o o e a clea and p ecise unde s anding o he me hodology
unde pinning he esea ch.
4.1. A chi ec u e
The sys em's a chi ec u al amewo k is o ganized in o i e hie a chical laye s, each
designed o suppo speci ic s ages o da a p ocessing and analy ical inqui y. Figu e 4.1
p o ides a isual ep esen a ion o he low o in o ma ion wi hin he p oposed solu ion.
As depic ed, he ou pu o each laye se es as he inpu o he subsequen laye .
Figu e 4.1: Hie a chical Flow o In o ma ion in he P oposed Solu ion.
31
• 𝛼 is he slope o linea eg ession
• 𝐴𝑐𝑡𝑖𝑜𝑛𝑐 is he ac ion o c yp ocu ency 𝑐
4.3.2. Po olio Weigh
The po olio weigh is esponsible o de e mining he weigh o each c yp ocu ency
wi h he same ac ion o buy o sell un il he nex ebalancing pe iod o 4 hou s.
In his hesis, wo ypes o decision c i e ia we e implemen ed. Fi s , an equally
weigh ed app oach was u ilized, whe e all c yp ocu encies a e gi en he same amoun
o ele ance in ou po olio. This me hod is employed in bo h he momen um and
end- ollowing ading s a egy app oaches, and he po olio weigh is de ined as:
𝑃𝑜𝑟𝑡𝑓𝑜𝑙𝑖𝑜𝑊𝑒𝑖𝑔𝑡ℎ𝑐=1
∑𝑐
• Whe e ∑𝑐 is he summa ion o c yp ocu encies in he po olio.
Second, he ime-weigh ed app oach is solely used wi h he end- ollowing s a egy. In
his app oach, he weigh o each oken in he po olio is de e mined by he numbe o
consecu i e ebalancing pe iods i has emained an inlie , i ’s du a ion. This me hod
aims o adjus he po olio dynamically based on bo h he end di ec ion and he
oken's s abili y. Addi ionally, a maximum ime limi o i e pe iods is implemen ed o
p e en o e ly s able coins om domina ing he po olio dynamics, ensu ing a balanced
alloca ion. The po olio weigh is de ined as:
𝑇𝑖𝑚𝑒𝑐= 𝑚𝑖𝑛(𝑁𝑐,5)
𝑃𝑜𝑟𝑡𝑓𝑜𝑙𝑖𝑜𝑊𝑒𝑖𝑔𝑡ℎ𝑐=𝑇𝑖𝑚𝑒𝑐
∑𝑇𝑖𝑚𝑒𝑐
• Whe e 𝑁𝑐 is he numbe o consecu i e ebalance pe iods wi h c yp ocu ency 𝑐
conside ed inline
• And ∑𝑇𝑖𝑚𝑒𝑐 is he summa ion o all 𝑇𝑖𝑚𝑒𝑐 o all c yp ocu encies in he same
ebalance pe iod
4.4. Ma ke Momen um Signal
In addi ion o e alua ing a educed uni e se and a ading s a egy componen , we aim
o assess he combina ions' pe o mance ac oss empo al spaces de ined as bullish,
bea ish, o neu al, ac oss mul iple con idence le els. These con idence le els se e as
pa ame e s ha in oduce sensi i i y egula o s o he classi ica ion o ma ke
momen um. This assessmen will help us unde s and i he e is ele an in o ma ion o
be ob ained om he o e all ma ke momen um ha can signi ican ly impac ou
decision o educed uni e se and ading s a egy combina ion, and i so, how impo an
i is.
The classi ica ion ask begins by compu ing he daily pe cen age change o he ma ke
capi aliza ion da a, ollowed by he calcula ion o i s 5-day simple mo ing a e age.
32
Following a sys ema ic app oach, we e alua e i e con idence le els o classi ying daily
ma ke momen um. I is impo an o no e ha he classi ica ion p o ided o day 𝑑 a e
used on day 𝑑+ 1 o a oid in oducing lookahead bias. The ma ke classi ica ion can be
de ined as:
𝑀𝑎𝑟𝑘𝑒𝑡 𝐶𝑙𝑎𝑠𝑠𝑑+1= { 𝐵𝑢𝑙𝑙, 𝑆𝑀𝐴5
𝑑≥ 𝑏𝑝𝑠
𝑁𝑒𝑢𝑡𝑟𝑎𝑙, − 𝑏𝑝𝑠≤𝑆𝑀𝐴5
𝑑≤ 𝑏𝑝𝑠
𝐵𝑒𝑎𝑟, 𝑆𝑀𝐴5
𝑑≤− 𝑏𝑝𝑠
• 𝑀𝑎𝑟𝑘𝑒𝑡 𝐶𝑙𝑎𝑠𝑠𝑑+1 is he ma ke momen um classi ica ion o he day 𝑑 +
1
• 𝑆𝑀𝐴5
𝑑 is he simple mo ing a e age o he pe cen age change o e 5 days
on he day 𝑑
• 𝑏𝑝𝑠 is he le el o con idence in he classi ica ion p o ided
• 𝑏𝑝𝑠 ∈ {10,20,30,40,50} in basis poin s.
4.5. E alua ion Me ics
To gauge he s a egies' e ec i eness, we ha e c a ed a sys ema ic e alua ion me hod.
This includes acking key me ics, namely A e age P o i and Loss (APL), Sha pe Ra io,
So ino Ra io, Max D aw Down (MDD), Ku osis and Skewness which we desc ibe nex .
A e age P o i and Loss (APL) quan i ies he gain o loss om a se ies o ades by
a e aging he p o i s and losses o indi idual ebalancing pe iods. A high APL sugges s a
p o i able s a egy, while a low APL may indica e a less success ul app oach.
𝐴𝑃𝐿= ∑𝑅𝑖
𝑛
Figu e 4.6: A e age P o i & Loss Equa ion
• ∑𝑅𝑖 is he ime se ies con aining e u ns on in es men
• n is he numbe o ebalancing pe iods.
The Sha pe Ra io is a me ic used o e alua e isk-adjus ed e u ns by compa ing he
excess e u n o an in es men o i s isk. While no s a is ically signi ican on i s own, i
se es as a aluable ool o compa ing he pe o mance o asse s o po olios. Highe
Sha pe a ios indica e be e isk-adjus ed e u ns, which is ypically p e e ed by
in es o s (Sha pe, 1998).
𝑆𝑅= 𝑅𝑂𝐼𝑝− 𝑅𝑓
𝜎𝑝
Figu e 4.7: Sha pe Ra io Equa ion
A e age P o i and Loss
Sha pe Ra io
33
• 𝑅𝑂𝐼𝑝 is he a e age e u n o he asse /po olio
• 𝑅𝑓 is he isk- ee a e
• 𝜎𝑝 is he s anda d de ia ion o he asse /po olio
The So ino a io o e s a nuanced al e na i e o he Sha pe a io. While he Sha pe a io
conside s all ola ili y, including posi i e ola ili y, he So ino a io ocuses solely on
nega i e ola ili y. This adjus men add esses a limi a ion o he Sha pe a io, whe e
posi i e ola ili y can un ai ly penalize he a io. The So ino a io eplaces he s anda d
de ia ion wi h he downside de ia ion, which measu es he ola ili y o e u ns below a
speci ied minimum accep able e u n (MAR), ypically se o ze o (So ino, 1994).
𝐷𝑜𝑤𝑛𝑠𝑖𝑑𝑒𝐷𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛(𝑅𝑥)= √∑(𝑅𝑖−𝑀𝐴𝑅)2 𝑤ℎ𝑒𝑟𝑒 𝑅𝑖≺𝑀𝐴𝑅
𝑛
𝑆𝑜𝑟𝑡𝑖𝑛𝑜𝑅𝑎𝑡𝑖𝑜(𝑥)= 𝑅𝑂𝐼𝑝− 𝑅𝑓
𝐷𝑜𝑤𝑛𝑠𝑖𝑑𝑒𝐷𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛(𝑅𝑥)
Figu e 4.8: So ino Ra io Equa ion
• 𝑅𝑂𝐼𝑝 is he a e age e u n o he asse /po olio
• 𝑅𝑓 is he isk- ee a e
• 𝑅𝑖 is he ime se ies con aining e u ns on in es men
Maximum d awdown is c ucial o assessing downside isk in in es men s o s a egies,
ep esen ing he la ges decline in a po olio's alue om peak o ough be o e a new
peak is es ablished. I p o ides insigh in o ela i e downside isk and is pa icula ly
ele an in ola ile c yp ocu ency ma ke s. Conside ing maximum d awdown alongside
ola ili y is essen ial when e alua ing in es men isks. (Magdon-Ismail, 2004)
𝑀𝐷𝐷= 𝑚𝑎𝑥𝑡 ∈ ( 𝑆𝑡𝑎𝑟𝑡𝐷𝑎𝑡𝑒, 𝐸𝑛𝑑𝐷𝑎𝑡𝑒)[𝑚𝑎𝑥𝑡 ∈ ( 𝑆𝑡𝑎𝑟𝑡𝐷𝑎𝑡𝑒, 𝑇)(𝑅𝑂𝐼𝑡)−𝑅𝑂𝐼𝑇]
Figu e 4.9: Max D aw Down Equa ion
Ku osis desc ibes he ail shape o da a dis ibu ions by compa ing he weigh o he
ails o he cen e o he dis ibu ion. I is no a measu e o he peakedness o he
dis ibu ion. High ku osis alues indica e ha he ails ex end u he om he cen e ,
while low ku osis alues indica e sho e ails and a sha pe peak (Chouksey, 2018).
𝐾𝑢𝑟𝑡𝑜𝑠𝑖𝑠 = ∑(𝑌𝑖− 𝑌)4/𝑁
𝑁
𝑖=0 𝑆4
So ino Ra io
Max D aw Down
Ku osis
34
Figu e 4.10: Ku osis Equa ion
• 𝑌 is he mean
• 𝑆 is he s anda d de ia ion
• 𝑁 is he numbe o da a poin s
Skewness desc ibes he symme y o a dis ibu ion. Nega i e alues indica e le
skewness, while posi i e alues indica e igh skewness. When skewness is close o ze o,
he dis ibu ion app oxima es o symme ic (Chouksey, 2018).
𝑆𝑘𝑒𝑤𝑛𝑒𝑠𝑠 = ∑(𝑌𝑖− 𝑌)3/𝑁
𝑁
𝑖=0 𝑆3
Figu e 4.11: Skewness Equa ion
• 𝑌 is he mean
• 𝑆 is he s anda d de ia ion
• 𝑁 is he numbe o da a poin s
Skewness
35
5. Resul s and Analysis
5.1. Resul s
Fo he discussion o esul s, we will ha e access o a o al o 16,200 eco ds. The
a ionale behind his numbe o eco ds can be ound in he able below, which
desc ibes each pa ame e used du ing he s udy, i s ela ion o a p ocess and he
numbe o di e en alues used.
Table 5.1: Pa ame e O e iew
Pa ame e s
Combina ions
Uni e se Fo ma ion
90
Lookback Pe iod
3
Me ics G oup
3
Selec ion Me hod
2
Uni e se Size
5
S a egy De ini ion
12
Ac ion
2
S a egy
3
T ansac ion Cos s
2
Ma ke Momen um Signal
15
Con idence Le el
5
Ma ke Class
3
To al Resul s
16200
The sys ema ic app oach o in oducing pa ame e s o es se e al alues a each
decision-making s ep o he algo i hm has le us wi h a high dimensionali y p oblem
ha can be assessed in a la ge a ie y o ways. This p ojec adop s h ee di e en
pe spec i es deemed ele an o he esea ch ques ions p oposed.
Fi s ly, he examina ion o he a e age pe o mance me ics o each pa ame e ’s
alues, emaining agnos ic o all o he pa ame e s in he s udy. This in ol es analyzing
how each pa ame e independen ly in luences he ou come, p o iding a clea
unde s anding o hei isola ed e ec s.
Secondly, an analysis o he low o he op imal se o pa ame e alues ac oss a ious
o ganiza ional s uc u es. This analysis includes a comp ehensi e examina ion o bo h
he ne and g oss e u ns o he po olios, ac o ing in ansac ion cos s.
Finally, he hi d iewpoin ocuses on he op 20 pe cen o eco ds anked by A e age
P o i and Loss (APL). This high-pe o ming subse is sc u inized o iden i y common
cha ac e is ics ha lead o supe io pe o mance, p o iding insigh s in o he mos
e ec i e pa ame e con igu a ions.
5.1.1. Bes o e all alue pe pa ame e
In his sec ion, 16,200 combina ions gene a ed h oughou his p ojec a e g ouped
solely on indi idual pa ame e s.
36
PCA consis en ly ou pe o ms SVM ac oss a ious e u n me ics as well as ola ili y and
isk me ics, lea ing no oom o doub abou i s o e all supe io i y. Momen um me ics
eme ge as he op pe o me s, while g ow h-o ien ed me ics exhibi he leas
skewness. A clea posi i e co ela ion is obse ed be ween uni e se size and
pe o mance, e ealing low signi icance o he uni e se educ ion e o . A mid- e m
lookback pe iod o 12 hou s p o es o be he mos eliable, o e ing balanced e u ns
and isk managemen (see Appendix A).
Table 5.2: Selec ion Me hod Analysis.
Bo h equally weigh ed and ime-weigh ed end- ollowing ading s a egies su pass he
benchma k momen um s a egy, exhibi ing simila isk le els. No ably, he weigh ed
op ion s ands ou wi h supe io e u n me ics and a highe Sha pe a io (see Appendix
B). A subs an ial pe o mance di e en ial is obse ed wi hin he po olio ac ion
decision, sho po olios ou pe o m long po olios, despi e sligh ly highe ku osis.
Table 5.3: Po olio Ac ion analysis.
Ac ion
T ades
Sha pe
So ino
MDD
APL
Ku osis
Skewed
Coun
Buy
2329
-2.4704
-0.0681
-0.9314
-0.001184
17.2754
-0.2824
8100
Sell
2329
-0.1269
-0.0018
-0.6959
0.000001
23.4231
-0.0371
8100
The neu al ma ke class demons a es he mos p omising alues in e ms o e u ns
and isk me ics. Howe e , i is impo an o no e ha he sample size o he neu al
ma ke is signi ican ly smalle compa ed o he bull and bea ma ke s, which educes
ou con idence in hese esul s. The bull ma ke , wi h a sample size wice as la ge, anks
second, sligh ly ou pe o ming he bea ma ke in APL (see Appendix C). The analysis o
ma ke classi ica ion con idence le els indica es a nega i e co ela ion wi h
pe o mance me ics. In o he wo ds, as ma ke con idence le els ise, pe o mance
ends o dec ease.
Uni e se Fo ma ion Pa ame e s
Me hod
T ades
Sha pe
So ino
MDD
APL
Ku osis
Skewed
Coun
PCA
2328
-1.1234
-0.0304
-0.7944
-0.0005
13.8905
-0.0411
8100
SVM
2328
-1.4739
-0.0395
-0.8329
-0.0007
26.8080
-0.2784
8100
S a egy De ini ion Pa ame e s
Ma ke Momen um Signal Pa ame e s
37
Table 5.4: Ma ke Class Con idence Le el Analysis
Con . Le el
T ades
Sha pe
So ino
MDD
APL
Ku osis
Skewed
Coun
10
2329
-1.2214
-0.0322
-0.7712
-0.0005
19.9119
-0.1135
3240
20
2329
-1.2912
-0.0350
-0.8033
-0.0006
20.4440
-0.1574
3240
30
2329
-1.3094
-0.0352
-0.8197
-0.0006
21.0207
-0.1912
3240
40
2329
-1.3290
-0.0359
-0.8323
-0.0006
20.3526
-0.1737
3240
50
2329
-1.3423
-0.0364
-0.8416
-0.0006
20.0170
-0.1630
3240
In summa y, PCA, end- ollowing s a egies wi h weigh ed po olios, and lowe
con idence le el ma ke classi ica ions eme ge as he op pe o me s in hei espec i e
ca ego ies.
5.1.2. Pa ame e Combina ion Analysis
In his sec ion, he app oach g adually educes he combina ions in he subg oups
deemed mos wo hy o u he analysis, p oceeding in he o de o ma ke momen um
signal pa ame e s o s a egy de ini ion pa ame e s o uni e se o ma ion pa ame e s.
In his sec ion, 8100 combina ions o long po olios a e analyzed o de e mine he
op imal pa ame e con igu a ion o buying s a egies.
The esul s indica e ha he bull ma ke class should be used o u he analysis. While
he neu al ma ke class exhibi s be e isk ac o s, i s smalle sample size and lowe
e u ns make i less sui able as he bes app oach. Wi hin he bull ma ke , he highes
con idence le el consis en ly ou pe o ms ac oss all me ics, excep o skewness, which
shows an in e es ing nega i e co ela ion by imp o ing wi h lowe con idence le els.
Fo he s a egy componen , he ime-weigh ed end- ollowing ading s a egy
eme ges as he bes choice. The s a egy is selec ed due o i s high e u ns’ po en ial
and balanced isk ac o s, clea ly ou pe o ming o he s a egies in e ms o bo h e u n
me ics and isk managemen . Bo h he me ics g oup and selec ion me hod show no
ambigui y, wi h he g ow h me ics g oup and PCA selec ion me hod pe o ming he
bes among hei pee s. Al hough hese combina ions indica e a mo e isk-p one
app oach, hey o e highe ewa ds.
When i comes o he uni e se size pa ame e , educing he uni e se does no seem
e ec i e o long po olios. Pe o mance shows a clea end o imp o emen as he
size o he uni e se inc eases. This sugges s ha a la ge uni e se p o ides be e
di e si ica ion and oppo uni ies o highe e u ns. The lookback pe iod, whe he mid-
e m o sho - e m, pe o ms simila ly, allowing o some lexibili y in his pa ame e ’s
choice.
Amongs he long po olios, his app oach anks 35 h in e ms o APL and 355 h a e
accoun ing o ansac ion cos s.
Bes Combina ions o Long Po olios
38
Figu e 5.1: Ne and G oss Re u ns o Bes Long po olio.
In conclusion, he bes pa ame e s combina ion o long po olios in a buying s a egy
in ol es ope a ing wi hin a bull ma ke , using a high con idence le el, and employing a
ime-weigh ed end- ollowing s a egy. The g ow h me ics and PCA me hod should be
applied, wi h lexibili y in he lookback pe iod, al hough la ge uni e ses end o yield
be e pe o mance.
In his sec ion, 8100 combina ions o sho po olios a e analyzed o de e mine he
op imal pa ame e con igu a ion o selling s a egies.
The esul s e eal ha he bes con igu a ion appea s in a bea ma ke . This
con igu a ion achie es he highes Sha pe a io and APL, al hough i does su e om
he highes ku osis. The chosen s a egy is a end- ollowing app oach wi h a ime-
weigh ed po olio, which e ec i ely cap u es ma ke ends and manages isks.
In e ms o uni e se selec ion, he uni e se is educed using SVM me hodology. SVM
p o es o be supe io o e all, despi e exhibi ing highe skewness and ku osis. This
sugges s ha while SVM may in oduce some addi ional isk, i s o e all pe o mance
bene i s ou weigh hese d awbacks.
Re u ns a e he p e e ed me ics in his analysis, consis en ly pe o ming be e ac oss
he boa d. Pe o mance shows a clea end o imp o emen as he size o he uni e se
dec eases despi e esul ing in highe maximum d awdowns and wo se skewness.
Fo he lookback pe iod pa ame e , longe ime ames demons a e be e pe o mance
o e all, sugges ing ha an ex ended his o ical iew aids in iden i ying mo e eliable
ends.
Amongs he sho po olios, his app oach anks 10 h in e ms o mean P&L and 29 h
a e accoun ing o ansac ion cos s.
Bes Combina ions o Sho Po olios
39
Figu e 5.2: Ne and G oss Re u ns o Bes Sho po olio.
In conclusion, he bes pa ame e combina ion o sho po olios in a selling s a egy
in ol es ope a ing wi hin a bea ma ke employing a end- ollowing s a egy wi h a
ime-weigh ed po olio. The SVM me hod should be used o educe he uni e se, wi h
a ocus on e u ns and keeping uni e se size low. Longe ime ames should be u ilized
o enhance pe o mance.
Wi h a ocus on iden i ying he mos e ec i e con igu a ions o a ying ma ke
condi ions, 5400 combina ions o each ma ke class a e analyzed.
The le el o con idence pa ame e shows a posi i e co ela ion wi h he pe o mance
me ics sugges ing a s onge eliabili y on ma ke ends.
The analysis consis en ly shows ha sho po olios a e he op pe o me s in all ma ke
classes. This inding highligh s he e ec i eness o sho selling s a egies.
In bull ma ke s, end- ollowing ime-weigh ed po olios exhibi sligh ly be e
pe o mance compa ed o momen um po olios. The end- ollowing app oach,
especially when used wi h a ime-weigh ed po olio, is adep a cap u ing upwa d
ends, leading o be e e u ns. The weigh ed aspec o he s a egy allows o a mo e
nuanced and esponsi e app oach o ma ke mo emen s (see Appendix D).
The pe o mance gap be ween s a egies widens in he neu al ma ke , wi h ime-
weigh ed end- ollowing po olios signi ican ly ou pe o ming momen um po olios.
In hese ma ke condi ions, whe e he di ec ion is no clea ly de ined, he adap abili y
o end- ollowing s a egies p o es ad an ageous (see Appendix E).
Du ing bea ma ke s, he end- ollowing ime-weigh ed po olio s ands ou as he
supe io choice. This s a egy no only deli e s be e e u ns bu also manages isk
mo e e ec i ely in declining ma ke s.
Ac oss all ma ke classes, he use o SVM and a smalle uni e se size is a common heme.
This me hodological choice ensu es ha he s a egy is applied o a well-selec ed subse
o c yp ocu encies, enhancing o e all pe o mance. The SVM me hodology aids in
iden i ying he mos ele an and high-po en ial c yp ocu encies, while he educed
uni e se size main ains a ocus on quali y o e quan i y.
Momen um me ics a e p e e ed in ma ke classes expe iencing subs an ial shi s.
These me ics a e e ec i e a quickly cap u ing and exploi ing apid changes in he
Bes Combina ions pe Ma ke Class
40
ma ke , p o iding an edge in highly dynamic en i onmen s.
G ow h me ics a e employed in he neu al ma ke , emphasizing s abili y and
consis en pe o mance. These me ics a e less eac i e o sho - e m ola ili y, which
is c ucial in a ma ke whe e clea ends a e absen .
The impo ance o he lookback pe iod a ies ac oss ma ke condi ions. In bull ma ke s,
sho e lookback pe iods a e a o ed as hey help in quickly iden i ying and capi alizing
on upwa d ends. Con e sely, in bea ma ke s, longe lookback pe iods a e p e e ed.
They o e a comp ehensi e iew o long- e m downwa d ends, aiding in mo e
s a egic decision-making.
Figu e 5.3: Bea Ma ke Op imal Combina ion Flow
5.1.3. Top Ranked Combina ions Analysis
In his sec ion, he op 20 pe cen o combina ions anked by APL, accoun ing o 3240
combina ions a e analyzed. This subse ep esen s he mos p o i able and p omising
pa ame e con igu a ions, o e ing aluable insigh s in o he ac o s con ibu ing o hei
success.
When examining he op combina ions, i is c ucial o analyze he pe cen ages o use o
each pa ame e and s a egy. Among he op combina ions, SVM eme ges as he
p e e ed me hod, being u ilized 60% o he ime. This inding con adic s he analysis
o he da ase bu sugges s ha in he op-pe o ming subse , SVM may o e be e
e u ns despi e in ol ing sligh ly mo e isk.
Fu he mo e, e u ns a e he mos equen me ics choice, p esen in 50% o he cases
wi h highe APL. G ow h me ics a e sligh ly less u ilized bu p o ide be e skewness.
Addi ionally, a clea end eme ges ega ding he size o he uni e se, wi h smalle
uni e ses being associa ed wi h be e pe o mance, excluding isk ac o s such as
skewness and ku osis. This end di e ges om he o e all da ase analysis bu
indica es ha among he op-pe o ming combina ions, a smalle uni e se may lead o
47
Eu opean Cen al Bank. (2019). Algo i hmic T ading: . Re ie ed om Eu opean Cen al
Bank: Banking Supe ision.
h ps://www.bankingsupe ision.eu opa.eu/p ess/publica ions/newsle e /2019/h ml/
ssm.nl190213_5.en.h ml
Fa ell, R. M. (2015). An Analysis o he C yp ocu ency Indus y. Mas e Thesis, Uni e si y
o Texas a Aus in. h ps:// eposi o y.upenn.edu/handle/20.500.14332/49177
Gen leman, R., & Ca ey, V. (2008). Unsupe ised Machine Lea ning. In F. Hahne, W.
Hube , R. Gen leman, & S. Falcon, Bioconduc o Case S udies (pp. 121-136). Sp inge .
h p://doi.o g/10.1007/978-0-387-77240-0_10
Glend ange, G., & T ei en, S. (2016). Tes ing he Pe o mance o Simple Mo ing A e age
Wi h he Ex ension o Sho Selling. Mas e ’s Thesis, Uni e si y o Agde .
h p://hdl.handle.ne /11250/2419339
G ubbs, F. E. (1969). P ocedu es o De ec ing Ou lying Obse a ions in Samples.
Technome ics, 11(1), 1-21. h p://doi.o g/10.1080/00401706.1969.10490657
Gu h ie, D., Gu h ie, L., Allison, B., & Wilks, Y. (2007). Unsupe ised Anomaly De ec ion.
IJCAI 2007, P oceedings o he 20 h In e na ional Join Con e ence on A i icial
In elligence, (pp. 1624-1628). Hyde abad, India.
h p://ijcai.o g/P oceedings/07/Pape s/262.pd
Hi am, N. A., Ismail , A. R., & Saeed, F. (2019). An Op imized Suppo Vec o Machine
(SVM) based on Pa icle Swa m Op imiza ion (PSO) o C yp ocu ency Fo ecas ing.
P ocedia Compu e Science, 163, 427-433. h ps://doi.o g/10.1016/j.p ocs.2019.12.125
Kilgallen, T. (2012). Tes ing he Simple Mo ing A e age Ac oss Commodi ies, Global S ock
Indices and Cu encies. The Jou nal o Weal h Managemen , 15(1), 82-100.
h p://doi.o g/10.3905/jwm.2012.15.1.082
Kim, A. Y., Tse , Y., & Wald, J. K. (2016). Time se ies momen um and ola ili y scaling.
Jou nal o Financial Ma ke s, 30, 103-124. h ps://doi.o g/10.1016/j. inma .2016.05.003
48
Ko sian is, S. B. (2007). Supe ised Machine Lea ning: A Re iew o Classi ica ion
Techniques. P oceedings o he 2007 Con e ence on Eme ging A i icial In elligence
Applica ions in Compu e Enginee ing: Real Wo d AI Sys ems wi h Applica ions in
EHeal h, HCI, In o ma ion Re ie al and Pe asi e Technologies (pp. 3–24). NLD: IOS
P ess. h ps://dl.acm.o g/doi/10.5555/1566770.1566773
Lesmod, D. A., Schill, M. J., & Zhou, C. (2004). The illuso y na u e o momen um p o i s.
Jou nal o Financial Economics, 71(2), 349-380. h ps://doi.o g/10.1016/S0304-
405X(03)00206-X
Le ine, A., & Pede sen, L. H. (2015). Which T end Is You F iend? Financial Analys s
Jou nal, 72(3). h p://dx.doi.o g/10.2139/ss n.2603731
Magdon-Ismail, Malik & A iya, Ami (2004). An Analysis o he Maximum D awdown Risk
Measu e. Risk, 17.
h ps://www. esea chga e.ne /publica ion/241812835_An_Analysis_o _ he_Maximum
_D awdown_Risk_Measu e
Moskowi z , T. J., Ooi , Y. H., & Pede sen, L. H. (2012). Time se ies momen um. Jou nal o
Financial Economics, 104(2), 228-250. h ps://doi.o g/10.1016/j.j ineco.2011.11.003
Nakamo o, S. (2009). Bi coin: A Pee - o-Pee Elec onic Cash Sys em.
h ps://bi coin.o g/en/bi coin-pape
Na ang, R. K. (2009). Inside he black box: The simple u h abou quan i a i e ading (1
ed.). John Wiley& Sons.
Pisne , D. A., & Schnye , D. M. (2020). Chap e 6 - Suppo ec o machine. In D. A.
Pisne , D. M. Schnye , A. Mechelli , & S. Viei a (Eds.), Machine Lea ning (pp. 101-121).
Academic P ess. h ps://doi.o g/10.1016/B978-0-12-815739-8.00006-7
49
Rani, H. N. (2020). A STUDY ON FORECASTING OF SECURITY PRICES USING RELATIVE
STRENGTH INDEX (RSI) SELECTED COMPANIES IN INDIA. In e na ional Jou nal o
Managemen and Comme ce Inno a ions, 7(2).
h ps://www. esea chpublish.com/pape s/a-s udy-on- o ecas ing-o -secu i y-p ices-
using- ela i e-s eng h-index- si-selec ed-companies-in-india
Roza io, S., E ans, J., Hol , S., & Wes , J. (2020). A Decade o E idence o T end Following
In es ing in C yp ocu encies. doi:Roza io, E ans and Hol , Samuel and Wes , James and
Ng, Shaun, A Decade o E idence o T end Following In es ing in C yp ocu encies
(Sep embe 22, 2020). h p://dx.doi.o g/10.2139/ss n.3697981
Schölkop , B., Williamson, R., Smola, A., John , & Pla , J. (1999). Suppo Vec o Me hod
o No el y De ec ion, 12, pp. 582-588. h p://pape s.nips.cc/pape /1723-suppo -
ec o -me hod- o -no el y-de ec ion
Sha pe, W. F. (1998). The Sha pe Ra io (Fall 1994). S ee wise: The Bes o The Jou nal o
Po olio Managemen , 169-178. h ps://doi.o g/10.2307/j.c 1mjq wg.24
Singh, K., & Upadhyaya, S. (2012). Ou lie De ec ion: Applica ions And Techniques.
In e na ional Jou nal o Compu e Science Issues, 9.
h ps://www. esea chga e.ne /publica ion/267964435_Ou lie _De ec ion_Applica ions
_And_Techniques
Song, F., Guo, Z., & Mei, D. (2010). Fea u e Selec ion Using P incipal Componen
Analysis. 2010 In e na ional Con e ence on Sys em Science, Enginee ing Design and
Manu ac u ing In o ma iza ion, 1, pp. 27-30. Yichang, China.
h ps://doi.o g/10.1109/ICSEM.2010.14
So ino, F. A. & P ice, Lee N. (1994). Pe o mance Measu emen in a Downside Risk
F amewo k. The Jou nal o In es ing, 3(3), 59-64. h ps://www.pm-
esea ch.com/con en /iijin es /3/3/59
Sp enge , J., & Weinbe ge , N. (2021). Simpson’s pa adox. In E. N. Zal a (Ed.), The S an o d
Encyclopedia o Philosophy (Summe 2021 ed.). Me aphysics Resea ch Lab, S an o d
Uni e si y. h ps://pla o.s an o d.edu/a chi es/sum2021/en ies/pa adox-simpson/
50
an Engelen, J., & Hoos, H. (2020). A su ey on semi-supe ised lea ning. Machine
Lea ning, 109(2), 373-440. h ps://doi.o g/10.1007/s10994-019-05855-6
Hillme , S. C. (1991). Re iew o Time Se ies Analysis: Uni a ia e and Mul i a ia e Me hods.,
by William W. S. Wei. Jou nal o he Ame ican S a is ical Associa ion, 86(413), 245–246.
h ps://doi.o g/10.2307/2289741
Williams, O. G. (2006). Empi ical Op imiza ion o Bollinge Bands o P o i abili y. SSRN
Elec onic Jou nal. h ps://doi.o g/10.2139/ss n.2321140
Win e meye , L. (2021). Ins i u ional Money Is Pou ing In o The C yp o Ma ke And I s
Only Going To G ow. Fo bes.
h ps://www. o bes.com/si es/law encewin e meye /2021/08/12/ins i u ional-money-
is-pou ing-in o- he-c yp o-ma ke -and-i s-only-going- o-g ow/
Ye mack, D. (2015). Chap e 2 - Is Bi coin a Real Cu ency? An Economic App aisal. In D.
Ye mack, & D. K. Chuen (Ed.), Handbook o Digi al Cu ency (pp. 31-43). San Diego:
Academic P ess. h ps://doi.o g/10.1016/B978-0-12-802117-0.00002-3
Zakamulin, V. (2014). The eal-li e pe o mance o ma ke iming wi h mo ing a e age
and ime-se ies momen um ules. Jou nal o Asse Managemen , 15(4), 261-278.
h ps://doi.o g/10.1057/jam.2014.25
51
Appendix A
Appendix B
Appendix C
Appendix D
Lookback
T ades
Sha pe
So ino
MDD
APL
Ku osis
Skewed
Coun
4
2330
-1.8623
-0.0501
-0.8469
-0.000890
21.3508
-0.3753
5400
12
2329
-0.8744
-0.0243
-0.7899
-0.000370
20.0291
0.1157
5400
24
2328
-1.1593
-0.0304
-0.8042
-0.000518
19.6678
-0.2197
5400
S a egy
T ades
Sha pe
So ino
MDD
APL
Ku osis
Skewed
Coun
Momen um
2329
-1.8570
-0.0491
-0.8256
-0.000849
27.3525
-0.4492
5400
T end
2329
-1.1472
-0.0313
-0.8119
-0.000518
16.7198
-0.0361
5400
T end
Weigh ed
2329
-0.8918
-0.0244
-0.8034
-0.000410
16.9754
0.0061
5400
Ma ke
T ades
Sha pe
So ino
MDD
APL
Ku osis
Skewed
Coun
Bea
2258
-1.5059
-0.0378
-0.8497
-0.000834
27.1663
-0.1143
5400
Bull
3175
-1.3971
-0.0334
-0.9092
-0.000499
17.1102
-0.1734
5400
Neu al
1553
-0.9929
-0.0337
-0.6820
-0.000444
16.7713
-0.1915
5400
52
Appendix E
53