scieee Science in your language
[en] (orig)

Pairs Trading using a Cointegration Approach: An Empirical Investigation using US Stock Market data

Abstract

This dissertation will study the return of a pairs trading strategy in the US stock market. Pairs trading is a market-neutral trading strategy that exploits the price movements between two historically correlated securities. The purpose of this thesis is to evaluate the performance of the cointegration approach in this market-neutral strategy and to assess if it has an edge over other strategies. This research employs a quantitative approach, using historical price data of 50 securities from various sectors over 8 years. The study applies a cointegration approach to identify pairs and execute trades, with the approach done with the Engle-Granger method. Performance metrics such as returns, Sharpe ratio, and maximum drawdown are analyzed. The findings in this study indicate that pairs trading can generate consistent returns with relatively low volatility in stable market conditions. However, the strategy's performance deteriorates during periods of high market volatility. This study observed that the pairs trading strategy had better returns with cointegrated pairs and contributed to the existing literature on the cointegration approach by offering a complete evaluation of pairs trading performance and returns with US stock market data.

Read accessible full text

Pairs Trading using a Cointegration Approach: An Empirical Investigation using US Stock Market data

Author: Lourenço, Samuel Tomé Alexandre
Year: 2024
Source: https://run.unl.pt/bitstream/10362/175046/1/TEGI3341.pdf
Mas e Deg ee P og am in
S a is ics and In o ma ion Managemen
Pai s T ading using a Coin eg a ion App oach
An Empi ical In es iga ion using US S ock Ma ke da a
Samuel Tomé Alexand e Lou enço
Mas e Thesis
p esen ed as pa ial equi emen o ob aining he Mas e Deg ee in S a is ics and In o ma ion Managemen
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
MEGI
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
Pai s T ading using a Coin eg a ion App oach
An Empi ical In es iga ion using US S ock Ma ke da a
by
Samuel Tomé Alexand e Lou enço
Mas e Thesis p esen ed as pa ial equi emen o ob aining he Mas e ’s deg ee in S a is ics
and In o ma ion Managemen , wi h a specializa ion in isk managemen .
Supe ised by
P o . Dou o Jo ge Miguel Ven u a B a o, PhD
NOVA IMS & Uni e si é Pa is-Dauphine PSL
June, 2024
i
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 acknowledged he Rules o
Conduc and Code o Hono om he NOVA In o ma ion Managemen School.
[Lisboa, 2024]
ii
ACKNOWLEDGEMENTS
Fi s o all, I wan o hank all my amily, who had suppo ed me all along his jou ney and
opened my eyes o eali y, when i was necessa y. P ima ily I wan o hank my b o he , who
has been a ole model o me since I was bo n, suppo ing me in e e y s ep ha I ook. Then, a
hank o my sis e Ru e, who is a ema kable s uden and a e y kind and esilien pe son, made
me a be e pe son in ha aspec oo. Thank my sis e Luísa who e e y day shows me wha is
he will o li e, despi e e e y ad e si y. Las ly, I hank my pa en s who ga e me he bes
educa ion hey could and made me who I am oday. Thank you o my a he who is my idol,
being he mos ha dwo king pe son I know, and o my mo he , he kindes pe son I know, who
is always he e o me.
Secondly, I wan o hank all my iends and my gi l iend, who suppo ed me in his hesis,
gi ing me he s eng h o no gi e up, and comp ehension in he momen s ha I could no be
p esen in he las mon hs.
Finally, hanks o my supe iso , P o esso Dou o Jo ge B a o, who helped me along he way
and was pa ien and lexible wi h me.

iii
ABSTRACT
This disse a ion will s udy he e u n o a pai s ading s a egy in he US s ock ma ke . Pai s
ading is a ma ke -neu al ading s a egy ha exploi s he p ice mo emen s be ween wo
his o ically co ela ed secu i ies. The pu pose o his hesis is o e alua e he pe o mance o
he coin eg a ion app oach in his ma ke -neu al s a egy and o assess i i has an edge o e
o he s a egies. This esea ch employs a quan i a i e app oach, using his o ical p ice da a o
50 secu i ies om a ious sec o s o e 8 yea s. The s udy applies a coin eg a ion app oach o
iden i y pai s and execu e ades, wi h he app oach done wi h he Engle-G ange me hod.
Pe o mance me ics such as e u ns, Sha pe a io, and maximum d awdown a e analyzed. The
indings in his s udy indica e ha pai s ading can gene a e consis en e u ns wi h ela i ely
low ola ili y in s able ma ke condi ions. Howe e , he s a egy's pe o mance de e io a es
du ing pe iods o high ma ke ola ili y. This s udy obse ed ha he pai s ading s a egy had
be e e u ns wi h coin eg a ed pai s and con ibu ed o he exis ing li e a u e on he
coin eg a ion app oach by o e ing a comple e e alua ion o pai s ading pe o mance and
e u ns wi h US s ock ma ke da a.
KEYWORDS
Pai s T ading ; Coin eg a ion ; Leas Squa es ; Ma ke -neu al s a egy ; S a is ical A bi age
i
TABLE OF CONTENTS
1. In oduc ion .................................................................................................................. 1
2. Li e a u e e iew........................................................................................................... 3
3. Me hodology ................................................................................................................. 6
3.1. Coin eg a ion App oach ........................................................................................ 6
3.2. Dis ance App oach ................................................................................................ 8
3.3. O he App oaches .................................................................................................. 9
3.4. Selec ion o App oach ......................................................................................... 10
3.5. Leas Squa es Reg ession .................................................................................... 10
3.6. Risks .................................................................................................................... 12
3.7. Da a...................................................................................................................... 12
4. Empi ical S udy .......................................................................................................... 13
4.1. Resea ch Ques ions ............................................................................................. 13
4.2. Assump ions ........................................................................................................ 13
4.3. Coin eg a ion es s ............................................................................................... 13
4.4. Leas Squa es eg ession o pai s ading ........................................................... 16
4.5. Sp ead and Z-sco e .............................................................................................. 18
4.5.1. T ading he sp ead ........................................................................................ 19
4.5.2. Pe o mance o he s a egy .......................................................................... 21
4.6. Risk-Adjus ed Pe o mance Me ics ................................................................... 25
4.6.1. Capi al Asse P icing Model (CAPM) .......................................................... 25
4.6.1.1. Be a .................................................................................................... 26
4.6.2. Sha pe Ra io ................................................................................................. 27
5. Resul s and discussion ................................................................................................ 28
5.1. Coin eg a ion esul s ............................................................................................ 28
5.2. Risk-Adjus ed Pe o mance Me ics Resul s....................................................... 30
5.3. Pai s ading s a egy esul s ................................................................................ 31
6. Conclusions and u u e wo ks .................................................................................... 34
Bibliog aphical Re e ences ............................................................................................. 37
Appendix A ..................................................................................................................... 40
i
LIST OF FIGURES
Figu e 1: Coin eg a ion Resul s................................................................................................ 15
Figu e 2: S ock P ices .............................................................................................................. 17
Figu e 3: Leas Squa es Reg ession ......................................................................................... 18
Figu e 4: Sp ead om no malized po olio ............................................................................ 19
Figu e 5: Z-sco e ...................................................................................................................... 20
Figu e 6: Z-sco e and ading signal ........................................................................................ 21
Figu e 7: Re u n o aded sp ead ............................................................................................. 22
Figu e 8: P&L o aded sp ead wi h ein es men .................................................................. 23
Figu e 9: D awdown ................................................................................................................. 24
Figu e 10: T ading signal and cumula i e P&L ....................................................................... 24
Figu e 11: Equi alen po olio app oach code ........................................................................ 25
Figu e 12: Lib a y´s used ......................................................................................................... 43
Figu e 13: Coin eg a ion Code ................................................................................................. 43
Figu e 14: P ices Loading ........................................................................................................ 43
Figu e 15: T aining se and LS eg ession ............................................................................... 44
Figu e 16: Sp ead Equa ion ...................................................................................................... 44
Figu e 17: No malized Po olio and No malized Sp ead ....................................................... 44
Figu e 18: Z-sco e code ............................................................................................................ 45
Figu e 19: Sp ead S anda d De ia ion ..................................................................................... 45
Figu e 20: Z-sco e and ading signal code .............................................................................. 45
Figu e 21: Re u n o aded sp ead code .................................................................................. 46
Figu e 22: P&L o aded sp ead wi h ein es men code ....................................................... 46
Figu e 23: D awdown code ...................................................................................................... 46
Figu e 24: T ading signal wi h Z-sco e code ........................................................................... 46
Figu e 25: Equi alen po olio app oach ................................................................................ 46
5
o 12 mon hs o iden i y equi y pai s using he dis ance me hod, ollowed by a ading pe iod
whe e posi ions a e opened when p ices di e ge by mo e han wo s anda d de ia ions and
closed when hey con e ge.
S udies like Pe lin (2007) and Papadakis and Wysicki (2008) ha e u he explo ed pai s ading
ac oss di e en ma ke s and condi ions, showing a ied p o i abili y and ac o s in luencing
e u ns. Engelbe g, Gao, and Jaganna han (2009) added in o ma ional e en s o he s a egy,
inding ha di e ences in how quickly new in o ma ion is inco po a ed can a ec p o i abili y.
Recen esea ch, such as F anco (2014) and Ribei o (2015), con i ms a signi ican dec ease in
pai s ading pe o mance in he las decades, pa icula ly du ing high ansac ion cos pe iods.
Howe e , hey also sugges ha he s a egy emains p o i able unde ce ain condi ions, such
as du ing ma ke c ises o when limi ed o same-indus y pai s.
O e all, pai s ading emains a obus and in iguing s a egy, hough i s p o i abili y has been
challenged by ma ke changes and inc eased compe i ion om hedge unds. Li e a u e
con inues o e ol e wi h new me hodologies and inno a ions, keeping he academic and ading
communi ies engaged.

6
3. METHODOLOGY
The me hodology is based on coin eg a ion app oach and leas squa es eg ession. The ime
ho izon is 8 yea s, om 2016 o 2024. The e will be analyzed 25 pai s, so 50 s ocks om he
US s ock ma ke . The e a e some pai s whe e he ime ho izon is no he abo e since some
companies made hei IPO a e ha da e. The objec i e he e is o demons a e ha he s a egy
in pai s ha a e coin eg a ed has a be e pe o mance han he ones ha a e no .
3.1. COINTEGRATION APPROACH
Fo ecas ing s ock ma ke p ices and e u ns is pa icula ly di icul , gi en he nonlinea i y,
ola ili y, and complexi y o he ime se ies and he gene ally accep ed, semi-s ong o m o
ma ke e iciency (Fama, 1970; B a o, 2024). P e ious esea ch iden i ies se e al uni a ia e o
mul i a ia e echniques conside ing he lagged alues o he ime se ies, and undamen al and
echnical analysis ac o s, conside ing bo h s a is ical lea ning and a i icial in elligence
me hods, including model combina ion app oaches (B a o e al. 2020, 2021, 2023; Asho eh e
al. 2021, 2022). Coin eg a ion is an econome ic model which eplies o he long- un
equilib ium be ween economic ime se ies. I we ha e wo o mo e ime se ies ha a e
nons a iona y, bu a linea combina ion o hem is s a iona y, hen hey a e p obably
coin eg a ed (Wei, 2006).
The concep o s a iona i y is co ela ed o he p ope ies o hese s ochas ic p ocesses. I he
da a a e assumed o be s a iona y i he means, a iances, and co a iances o he se ies a e
independen o ime, a he han he en i e dis ibu ion we assume weak s a iona i y.
Nons a iona i y in a ime se ies occu s when he e is no cons an mean o no cons an a iance,
howe e , he mos impo an one is he uni oo .
Rega ding he uni oo , a sequence ha has one o mo e speci ic oo s ha a e equal o one is
named a uni oo p ocess. The simple model ha should ha e a uni oo is he AR(1) model.
In he empi ical esul s, o he p og amming phase in Rs udio, I´ e used he package, egcm,
ha compu es he Engle-G ange coin eg a ion es , and many o he uni - oo es s, like
Augmen ed Dickey-Fulle (ADF) Tes , Phillips-Pe on (PP) Tes , Johansen's T ace Tes (JOT)
and o he s.
Rega ding he Engle-G ange me hod (Engle-G ange , 1987), i is based on he ac ha
eg essing non-s a iona y se ies on o he se ies, can lead o misleading esul s. Howe e , i all
a iables a e ound o ha e a uni oo (i.e., hey a e in eg a ed o o de one, I(1), he eg ession
7
can s ill be signi ican i he a iables a e coin eg a ed. Then o check o coin eg a ion, we
es ima e he leas squa es eg ession equa ion ( ha I will alk abou la e ) and analyze he
esiduals o a uni oo . I he esiduals a e s a iona y, I(0) indica es ha he a iables a e
coin eg a ed and sha e a long- e m equilib ium ela ionship. The Engle-G ange me hod uses
his app oach, so i es s o no coin eg a ion by examining he s a iona i y o he eg ession
esiduals. This me hod uses he o dina y leas squa es (OLS) o es ima e he ela ionship
be ween he a iables and apply uni oo es s o he esiduals o check o s a iona i y. I he
null hypo hesis o a uni oo is ejec ed, i suppo s coin eg a ion.
Rega ding he uni oo es s, he Augmen ed Dickey-Fulle (ADF), one o he mos popula
ones, de eloped by (Dickey and Fulle , 1979), es s o he exis ence o a uni oo in a ime
se ies sample, which helps de e mine i he se ies is non-s a iona y. The me hodology elies on
he ac ha he ADF es augmen s he basic Dickey-Fulle es by including lagged di e ences
o he dependen a iable o accoun o highe -o de co ela ion and, secondly, he null
hypo hesis. Due o he in alidi y o he DF s a is ic in he p esence o se ial co ela ion, he es
is ypically applied in i s augmen ed o m. (𝐻0) is ha he se ies has a uni oo (i.e., i is non-
s a iona y) and las ly al e na i e hypo hesis (𝐻1) is ha he se ies is s a iona y.
In e p e a ion o his es depends on whe he he p- alue is less han he signi icance le el (e.g.,
0.05), i i ´s less han he signi icance le el, we ejec 𝐻0 and conclude ha he se ies is
s a iona y. I he p- alue exceeds he signi icance le el, we ail o ejec 𝐻0 and conclude ha
he se ies is non-s a iona y.
Ano he es is he Phillips-Pe on (PP) Tes . I is simila o he ADF es , he PP es checks o
a uni oo in a ime se ies sample. Rega ding he me hodology, he PP es adjus s o se ial
co ela ion and he e oskedas ici y in he e o s by modi ying he es s a is ics. I uses non-
pa ame ic s a is ical me hods o accoun o he au oco ela ion and he null hypo hesis (𝐻0) is
ha he se ies has a uni oo (i.e., i is non-s a iona y). In e p e a ion is he same. Cheung, Y.
W., & Lai, K. S. (1997).
Conce ning he Pan ula, Gonzales-Fa ias and Fulle (PGFF) Tes , is ano he app oach o es ing
o uni oo s and de e mining s a iona i y in a ime se ies. The PGFF es in ol es es ing he
p esence o a uni oo by conside ing bo h le el and end s a iona y al e na i es. This es can
accoun o s uc u al b eaks in he ime se ies da a and he null hypo hesis (𝐻0) is ha he se ies
has a uni oo .
8
The Ellio , Ro henbe g, and S ock DF-GLS (ERSD) Tes is a mo e e icien e sion o he
ADF es o es ing o a uni oo in a ime se ies. I applies a Gene alized Leas Squa es (GLS)
de ending p ocedu e o he da a be o e pe o ming he Dickey-Fulle es . The null hypo hesis
(𝐻0) is ha he se ies has a uni oo .
Johansen's T ace Tes (JOT) is used o de e mine he numbe o coin eg a ion ec o s in a
mul i a ia e ime se ies. The es is based on a Vec o Au o eg essi e model and assesses he
ank o he coin eg a ion ma ix. I es s he null hypo hesis ha he numbe o coin eg a ion
ec o s is less han o equal o a gi en numbe agains he al e na i e hypo hesis o mo e
coin eg a ion ec o s. In his es , i he es s a is ic is g ea e han he c i ical alue, we ejec
𝐻0 and conclude ha he e a e mo e coin eg a ion ec o s. I he p- alue is less han he
signi icance le el, i indica es he p esence o coin eg a ion.
Las ly, he Schmid and Phillips Rho (SPR) Tes is ano he me hod o es o uni oo s in a
ime se ies. I is an ex ension o he Phillips-Pe on es and adjus s o po en ial se ial
co ela ion in he e o e ms and he null hypo hesis (𝐻0) is ha he se ies has a uni oo .
These es s a e designed o check o uni oo s (s a iona i y s. non-s a iona i y) and
coin eg a ion in ime se ies da a. They a e essen ial ools in econome ics o unde s anding he
p ope ies o ime se ies and o building eliable models. Each es has i s s eng hs and
weaknesses, and o en mul iple es s a e used oge he o make a mo e obus conclusion abou
he da a.
3.2. DISTANCE APPROACH
The dis ance app oach is a popula and ela i ely s aigh o wa d me hod used in pai s ading
popula ized in he esea ch o Ga e e al. (2006). I ocuses on he p ice di e ence o sp ead
be ween wo co ela ed asse s, usually s ocks, o iden i y ading oppo uni ies based on he
assump ion ha he sp ead will e e o a his o ical mean. This me hod le e ages he concep
o mean e e sion, which is cen al o many pai s ading s a egies. In he dis ance app oach,
ade s iden i y pai s o s ocks ha ha e shown a s able long- e m ela ionship. The basic
p emise is ha while he p ices o he wo s ocks migh di e ge empo a ily due o a ious
ma ke ac o s, hey will e en ually con e ge again because o hei unde lying co ela ion.
9
The app oach is spli in o wo phases. The e is a o ma ion pe iod in which likewise mo ing
pai s a e selec ed and hen a ading pe iod in which ading signals a e c ea ed and used o ake
a posi ion in he s ocks and consequen ly o close hem.
(Ga e e al., 2006) use daily da a om 1962 o 2002 on all liquid US s ocks. Fo e e y s ock,
a cumula i e o al e u n index is o med and no malized o he 12 mon hs o ma ion pe iod in
he o ma ion pe iod
In ha esea ch, i is s a ed ha he Top 20 pai s ha ha e he smalles his o ic dis ance o he
12-mon h o ma ion pe iod a e now selec ed o he ollowing 6-mon h ading pe iod. In
addi ion o ha , hey also applied sec o il e c i e ia o il e ou pai s ha belong o he same
indus y, c i e ia ha I will apply in my selec ion o pai s. Du ing he ading pe iod, he p ice
se ies o he secu i ies a e no malized again on he i s day. Posi ions a e opened when he
his o ic sp ead o he pai s di e ges by mo e han wo s anda d de ia ions om hei mean and
a e closed once hey e e o he his o ic mean. This me hod adds a quali a i e elemen o he
quan i a i e app oach.
3.3. OTHER APPROACHES
Like he coin eg a ion and dis ance app oaches, he ime se ies app oach in pai s ading elies
on s a is ical me hods o iden i y and exploi ela ionships be ween wo secu i ies. In ime se ies
analysis, ade s ypically use s a is ical models o o ecas u u e p ice mo emen s based on
his o ical da a. The ime se ies app oach can be in eg a ed in o pai s ading by ocusing on
modeling and o ecas ing he sp ead be ween wo co ela ed asse s, Pa e son, K. D. (2000).
The s ochas ic con ol app oach e e s o a me hodology used in inancial modeling and
decision-making unde unce ain y, Mudchana ongsuk, e al (2008). I in ol es u ilizing
ma hema ical echniques om s ochas ic analysis and con ol heo y o op imize decision-
making p ocesses in si ua ions whe e ou comes a e in luenced by andom a iables. This
app oach is pa icula ly ele an in inance, whe e ma ke dynamics a e o en unp edic able and
subjec o s ochas ic p ocesses. By applying s ochas ic con ol echniques, p ac i ione s aim o
de ise s a egies ha maximize desi ed objec i es while accoun ing o he inhe en
andomness and unce ain y p esen in inancial ma ke s.
10
Las ly, he copula app oach is a s a is ical me hod used o model he dependence s uc u e
be ween mul iple a iables, pa icula ly in inance and isk managemen . The objec i e o he
copula app oach is o apply he op imal copula be ween wo s ock e u ns and de ec ela i e
posi ions be ween pai s, Liew and Wu (2013). I in ol es sepa a ing he ma ginal dis ibu ions
o indi idual a iables om hei join dis ibu ion, allowing o a lexible and comp ehensi e
analysis o hei in e ela ionships. Copulas a e unc ions ha link he ma ginal dis ibu ions o
he join dis ibu ion, cap u ing he dependence pa e ns ega dless o he speci ic dis ibu ions
o he indi idual a iables. This app oach is aluable o assessing and managing a ious ypes
o isk, such as ma ke isk, c edi isk, and ope a ional isk, by accu a ely modeling he
dependency be ween di e en ac o s and asse s. Addi ionally, copulas a e used in po olio
op imiza ion, p icing o complex inancial p oduc s, and measu ing sys emic isk in inancial
sys ems.
3.4. SELECTION OF APPROACH
K auss (2017) conduc ed a s udy ha compa ed he pe o mance o a ious pai s ading
s a egies. Fo he dis ance app oach, he annualized e u n o equi ies anges be ween 7% and
11%. Al hough Vidyamu hy's (2004) pape , which is he mos equen ly ci ed o he
coin eg a ion app oach, does no p o ide empi ical esul s, Caldei a and Mou a (2013) epo
an annualized e u n o 16,38% o he coin eg a ion me hod in equi ies despi e he esea ch
only examine he pe iod om 2005 o 2010 o B azilian s ocks.
Despi e his, se e al indica o s sugges ha he coin eg a ion app oach may be supe io o he
dis ance app oach. The dis ance app oach in ol es a simple me hodology, me ely measu ing
he dis ance be ween p ice indices. In con as , he coin eg a ion app oach, which in ol es
eg ession analysis and s a iona i y es s o selec adeable pai s, is conside ed mo e obus
om an econome ic pe spec i e, consequen ly, I will use in his s udy he coin eg a ion
app oach.
3.5. LEAST SQUARES REGRESSION
As s a ed be o e, pai s ading is a ep esen a i e ma ke -neu al ading s a egy ha
simul aneously, longs an unde alued s ock and sho s an o e alued s ock. This s a egy is a
o m o s a is ical a bi age ading ha assumes he mo emen s o he p ices o he wo asse s

11
will be like p e ious ends. I ollows he hypo hesis ha p ices will e u n o he long- e m
equilib ium. This s a egy s a ed om he idea ha a bi age oppo uni ies exis when he p ice
gap be ween wo asse s expands o o pas a ce ain le el. I is also based on he belie ha
his o ical p ice mo emen s will no change signi ican ly in he u u e. Ga e , e al. (2006).
Leas Squa es Reg ession is a me hod used o es ima e he ela ionship be ween wo a iables
by i ing a line ha minimizes he sum o he squa ed di e ences be ween he obse ed alues
and he alues p edic ed by he line. Bjö ck, Å. (1990). In he con ex o pai s ading, i is used
o model he linea ela ionship be ween he p ices o wo asse s. The basic o m o he
eg ession model is:
𝑦𝑖 =𝛽0+ 𝛽1𝑥𝑖+𝜖𝑖
(1)
Equa ion (1) de ines he simple linea eg ession model. I is also called he wo- a iable linea
eg ession model o bi a ia e linea eg ession model because i ela es he explana o y (𝑥) and
explained (𝑦) a iables. The a iable 𝜖, called he esidual e m o dis u bance in he
ela ionship, ep esen s ac o s o he han 𝑥 ha a ec 𝑦 (Woold idge, 1996).
The Engle-G ange wo-s ep me hod di ec ly uses leas squa es eg ession as i eg esses 𝑦𝑡
on 𝑥𝑡 using o dina y leas squa es (OLS) o ob ain he esiduals 𝜖𝑡. Then i es s he esiduals
𝜖𝑡 o s a iona i y using a uni oo es , like he Augmen ed Dickey-Fulle es . I he esiduals
a e ound o be s a iona y, he se ies 𝑥𝑡 and 𝑦𝑡 a e conside ed coin eg a ed.
Rega ding i s di ec implica ion in he pai s ading s a egy, i ´s e y impo an in he s ep o
calcula ing he sp ead. So, he mechanism is he ollowing, i s , a pai o s ocks wi h simila
ends is iden i ied. Second, eg ession analysis such as o dina y leas squa es (OLS), o al leas
squa es (TLS), and e o co ec ion models (ECM) is used o calcula e he sp ead o hese
s ocks. Finally, i he sp ead hi s p ese bounda ies, in es o s will open a po olio ha akes a
long posi ion on he unde alued s ock and sho s he o e alued s ock. Subsequen ly, i he
sp ead e e ses o he mean, in es o s will close he po olios ha a e opposi e posi ion o he
open po olio. In his case, he in es o ob ains an a bi age p o i by execu ing his s a egy.
Howe e , he e is a isk when he sp ead does no e e se o he mean. In such a si ua ion,
in es o s a e a high isk because hey canno close he po olio.
12
3.6. RISKS
Pai s ading can be ela i ely low isk i pai s a e well-selec ed and he ela ionships uly a e
mean e e ing, so ha ´s because my hesis is based on he coin eg a ion app oach. I can also
be neu al o o e all ma ke mo emen s, ocusing only on he ela ionship be ween he pai .
By se ing a s op-loss bounda y, in es o s can hedge he isk. Many esea che s ha e applied
a ious s a is ical me hods o imp o e he e iciency and pe o mance o pai s ading. They
ocused on using he sp ead as a ading signal. The challenges ha I will ha e he e in ol e
model isk (inco ec model o pa ame e s), highe d awdowns ha may lead o ex ended non-
ealized losses, and he b eakdown o his o ical ela ionships due o s uc u al ma ke changes,
i a black swan e en occu s in one o hem, like aud o some simila e en like he En on
case ha leads o bank up cy. This isk is why he e u ns on indi idual s ocks canno be aken
as s a iona y. Howe e , as we a e sho in he o e alued s ock, his isk is diminished.
3.7. DATA
The da a consis s o i y s ocks om he S&P500, o ming wen y- i e pai s ha will be
analyzed. The da a is om 01-01-2020 o 30-04-2024 and i was ob ained h ough Yahoo
Finance. I was adjus ed o spli s and o he co po a e ac ions. The s ocks ha I chose we e
based on he c i e ia ha hey mus be om he same sec o o acili a e coin eg a ion. The e
a e i y s ocks bu ha shouldn’ be a p oblem as Alexande e al. (2002) p o e, e icien long-
sho hedge s a egies can be accomplished wi h ela i ely ew s ocks, he e o e his is no a
p oblem. Fu he mo e, hedge unds usually only use pai s ha belong o he same ac i i y
sec o , and I will do ha oo. I ha e chosen ma ke da a om he US s ock ma ke because i is
he s ock ma ke wi h highe liquidi y, mo e da a, and mo e eliable nowadays.
13
4. EMPIRICAL STUDY
4.1. RESEARCH QUESTIONS
In his hesis on pai s ading using he coin eg a ion app oach, i is essen ial o o mula e
esea ch ques ions ha guide he in es iga ion in o he me hodology, e ec i eness, and
applica ion o his ading s a egy. The e o e, o s a he empi ical s udy, his pape will ocus
mainly on he ollowing esea ch ques ions:
How does he pai s ading s a egy wi h he coin eg a ion app oach pe o m, using US s ock
ma ke da a, in he cu en inancial ma ke s en i onmen ?
Wha is he isk-adjus ed e u ns, Sha pe a ios, and o he pe o mance me ics o pai s ading
using coin eg a ion?
Who p o ides a be e e u n, coin eg a ed o non-coin eg a ed pai s?
4.2. ASSUMPTIONS
Fi s o all, he assump ions made in his wo k we e made o make his a be e esea ch and o
bes se e his wo k.
The ansac ion cos s we e assumed a 0, due o he di icul y o quan i ying hem. Then, he
be a was assumed o be 0, as his is a ma ke -neu al s a egy, o a s a is ical a bi age, in my
poin o iew, he be a a 0 makes sense due o he absence o isk. Wi h he be a a 0, he CAPM
will be he alue o he isk- ee a e, which I assumed o be he 10-yea easu y bond on 30
Ap il 2024, which s ands a 4,69%.
Rega ding he capi al in es ed, he e u ns a e shown wi h only 1 uni , so I will no assume in
his wo k ha money was in es ed, I will wo k wi h uni s and pe cen ages.
4.3. COINTEGRATION TESTS
As s a ed be o e, he e is a e y con enien package, egcm, ha compu es he Engle-G ange
coin eg a ion es and many o he uni - oo es s. In pa icula , gi en wo se ies 𝑥(𝑡) and 𝑦(𝑡), i
sea ches o pa ame e s 𝛼, 𝛽, and 𝜌 such ha
𝑦𝑡 =𝛼 + 𝛽𝑥𝑡+𝑟𝑡
(2)
𝑟𝑡 =ρ𝑟𝑡−1 +𝜖𝑡
(3)
14
whe e 𝑟𝑡 is he eg ession esidual and 𝜖𝑡 he inno a ion. I |ρ|<1, hen 𝑥𝑡 and 𝑦𝑡 a e
coin eg a ed (i.e., 𝑟𝑡 doesn’ con ain a uni oo ). O cou se, he di icul y is in assessing exac ly
how much smalle han 1 he alue o |𝜌| has o be. This is he ask o he uni - oo es . The
mos common example o a uni - oo es is he Augmen ed Dickey-Fulle (ADF) es as I s a ed
be o e in he me hodology, which conside s a null hypo hesis ha a uni oo is p esen and an
al e na i e hypo hesis ha he se ies is s a iona y (so a small p𝑝- alue means an indica ion o
s ong s a iona i y). Complemen a y es s o he Augmen ed Dickey-Fulle (ADF) app oach
include o ins ance Kwia kowski e al. (1992).
Ano he in e es ing quan i y o measu e mean- e e sion is he hal -li e, de ined as he ime i
akes o he sp ead o mean- e e hal o i s dis ance a e ha ing di e ged om he mean o
he sp ead.
The egcm lib a y in R is designed o he es ima ion and es ing o coin eg a ing ela ionships
be ween pai s o inancial ime se ies. egcm s ands o "Engle-G ange Coin eg a ion Models,"
as s a ed be o e, which e e s o he s a is ical me hodology used o iden i y coin eg a ed pai s.
This package simpli ies he p ocess o inding and es ing coin eg a ed pai s, which is
pa icula ly use ul in pai s ading s a egies.
Le ´s check i Visa and Mas e ca d a e coin eg a ed. In Figu e 1 below, he p ice se ies shows
a eg ession model o Visa in o Mas e ca d because he s ock p ice o Mas e ca d is highe .
Residual se ies is he di e ences in p ices, so he sp ead and he inno a ions a e he changes in
esiduals.
21
posi ion is closed i he Z-sco e is non-nega i e, and i a sho posi ion is held (signal[ -1] = -
1), he posi ion is closed i he Z-sco e is non-posi i e.
Figu e 6: Z-sco e and ading signal
4.5.2. PERFORMANCE OF THE STRATEGY
Finally, we can compu e he e u n p o i and loss o he s a egy. A simple way o doing his
is di ec ly om he sp ead and he ading signal. Acco ding o Figu e 21, he sp ead e u n is
compu ed as he di e ence be ween consecu i e alues o he sp ead. The aded e u n is
calcula ed by mul iplying he sp ead e u n by he lagged signal. The lag(signal) shi s he signal
by a one- ime s ep o align he posi ion wi h he subsequen e u n. This ensu es ha he posi ion
aken a ime -1 a ec s he e u n a ime . In Figu e 7 below, i ´s possible o analyze his e u n
p o i and loss o he s a egy, hus he e u n o he sp ead be ween wo s ocks. Some spikes
indica e he ola ili y in he ma ke s a ha momen , as a he beginning o 2019 and Ma ch
2020, wi h he COVID-19 c isis.

22
Figu e 7: Re u n o aded sp ead
Conce ning he weal h o cumula i e p o i and loss, he e a e wo di e en ways o compu e
i . Wi h ein es men o no compounded. The same ini ial budge o , say, only 1€ is in es ed
e e y ime a new ade. Wi h ein es men , all he exis ing weal h a each ime is ully
ein es ed. I will only show he compounded way because as we will see la e , i is he mos
p o i able, howe e , he no compounded is mo e eliable because e u ns on indexes like
S&P500 a e no compounded. In Figu e 8 he e is he plo o he cumula i e p o i and loss o
he aded sp ead, showing esilience in he esul s, e en a e he end o he aining pe iod,
showing obus esul s on his s a egy and mo e speci ically in his coin eg a ed pai .
23
Figu e 8: P&L o aded sp ead wi h ein es men
We can obse e ha weal h inc eases s eadily du ing he aining pe iod and in his case, i
con inues o ise a e ha . Howe e , in some cases, i la ens ou du ing he es o ou -o -
sample pe iod, which is he one ha coun s.
The same plo s can be ob ained wi h he package Pe o manceAnaly ics, and he
a gumen geome ic de e mines whe he i is compounded o no . Howe e , I ha e used his
lib a y o plo he d awdowns o he aded sp ead e u ns.
The below Figu e 9 shows he d awdown o he s a egy. This plo shows pa o he isk
associa ed wi h his s a egy. La ge d awdowns indica e highe isk as hey can lead o
ex ended non- ealized losses in some pe iods, he e o e, a s a egy wi h smalle and sho e
d awdowns is conside ed less isky. I ´s no able he co ela ion be ween he d awdown and he
imes ha he e a e no any mean e e ing sp ead. Fo example, in 2021 we see a big d awdown
and he z-sco e eaches a s anda d de ia ion o 3.
24
Figu e 9: D awdown
Now I will inpu he ading signal wi h he z-sco e. The e is a wo-panel plo o isualize he
Z-sco e wi h ading signals and he cumula i e p o i and loss o he aded sp ead.
In Figu e 10 we can see he Z-sco e and ading signal wi h he cumula i e p o i and loss o
aded sp ead. This p o ides a clea iew o he s a egy's p o i abili y and g ow h o e he
selec ed pe iod. I helps o assess he long- e m iabili y o he ading s a egy. We can see he
ela ion be ween ading signals and he p o i and loss o he s a egy. In he pe iod om July
2021 o Janua y 2022, only one ading signal was gene a ed, esul ing in a ime o declining
e u ns.
Figu e 10: T ading signal and cumula i e P&L
A mo e e icien way o igu e ou he e u n and P&L o he s a egy is ia he equi alen
po olio. The p e ious way o calcula ing he P&L di ec ly om he sp ead can lead o w ong
esul s i γ o μ change o e ime. I ha happens, hen he sp ead may look e y nice bu i ’s
no ealis ic because once I am in a ade, shouldn’ change 𝛾 o 𝜇. Le ’s use now he equi alen
25
po olio app oach. Fi s , I combine he no malized po olio weigh s wi h he lagged ading
signal o c ea e he po olio weigh s. A e ha , un he log e u ns om he log-p ices and
calcula e he po olio e u ns by applying he po olio weigh s o he log- e u ns.
The plo shows he Z-sco e again and he cumula i e p o i and loss o he aded sp ead. Figu e
11 shows ha wi h his equi alen po olio app oach, he pe o mance o his pai s ading
s a egy is be e , accumula ing p o i s om 1 o o e 1.8. Wi hou his app oach, he e u ns
we e sligh ly abo e 1.6, as shown in Figu e 10.
Figu e 11: Equi alen po olio app oach code
4.6. RISK-ADJUSTED PERFORMANCE METRICS
4.6.1. CAPITAL ASSET PRICING MODEL (CAPM)
Rega ding isk-adjus ed pe o mance me ics, I ha e used some well-known me ics, sha pe
a io, and CAPM. The Capi al Asse P icing Model (CAPM) de eloped by William Sha pe,
John Lin ne , and Jan Mossin in he 1960s, ep esen s a pi o al de elopmen in inancial
economics, Sha pe (1964) and Lin ne (1965). I is a inance model ha es ablishes a linea
ela ionship be ween he equi ed e u n on in es men and isk. CAPM ex ends he p inciples
o po olio heo y by Ha y Ma kowi z, p o iding a amewo k o quan i y he ela ionship
be ween sys ema ic isk and expec ed e u n o asse s, Ma kowi z (1959), who a gues ha
in es o s a e isk a e se and will choose a po olio by ading o be ween isk and e u n o
one in es men pe iod. The e o e, in es o s will choose e icien po olios ha minimize he
26
a iance o po olio e u n, gi en a speci ic le el o expec ed e u n, o maximize expec ed
e u n, gi en a speci ic le el o a iance.
In heo y, he capi al asse p icing model is employed o se he in es o equi ed a e o e u n
on a isky secu i y gi en he non-di e si iable i m-speci ic isk, as he sys ema ic isk will be
elimina ed in a well-di e si ied po olio.
The CAPM equa ion acco ding o Sha pe and Lin ne 's assump ions o isk- ee bo owing and
lending is exp essed as ollows:
𝐸(𝑅𝑖) = 𝑅𝑓+𝛽𝑖[𝐸 (𝑅𝑚)−𝑅𝑓] (8)
Whe e E(Ri) is he expec ed e u n on asse I, 𝑅𝑓 is he isk- ee a e, βi is he be a o asse I
and E(Rm) is he expec ed e u n o he ma ke po olio
Whe e ma ke Be a:
𝛽𝑖 = 𝐶𝑂𝑉 (𝑅𝑖;𝑅𝑚)
𝜎² (𝑅𝑚) (9)
Whe e 𝐶𝑂𝑉(𝑅𝑖,𝑅𝑚) is he co a iance be ween he e u n o he s ock (Ri) and he e u n o
he ma ke (Rm) and
𝜎² (𝑅𝑚) is he a iance o he ma ke e u n.
4.6.1.1. BETA
The be a o a pai s ading s a egy is ypically e y low and o en close o ze o. This is because
pai s ading is a ma ke -neu al s a egy, meaning i is designed o be independen o he o e all
ma ke mo emen s. The s a egy in ol es aking simul aneous long and sho posi ions in wo
co ela ed s ocks, wi h he expec a ion ha hei p ice mo emen s will con e ge, i espec i e
o ma ke di ec ion.
The key poin o be a in pai s ading is ma ke neu ali y since pai s ading aims o hedge ou
ma ke isk by aking opposi e posi ions in wo co ela ed s ocks. This neu alizes he e ec o
b oade ma ke mo emen s on he s a egy's pe o mance. Then, he e u ns o he pai s ading
s a egy a e d i en by he ela i e p ice changes be ween he wo s ocks a he han he o e all
ma ke mo emen s, he be a o he s a egy wi h espec o he ma ke index is usually e y low,
close o ze o and he sho posi ion in one s ock o se s he ma ke isk o he long posi ion in
he o he s ock, which con ibu es o he low be a.
The be a o a pai s ading s a egy is usually close o ze o, highligh ing i s ma ke -neu al
cha ac e is ic. This indica es ha he s a egy's pe o mance is independen o o e all ma ke
mo emen s, elying ins ead on he ela i e p ice mo emen s o he pai ed s ocks.

27
To conclude, I will conside be a as 0 since his is a ma ke -neu al s a egy, being he alue o
CAPM he cu en isk- ee a e. Fo ha I will assume he 10-yea easu y a e as o 30 Ap il
2024 as a isk- ee a e, ha is 4,69% and i will be used as a benchma k o compa e he esul
o he pai s ading s a egy.
4.6.2. SHARPE RATIO
Roy (1952) was he i s o sugges a isk- ewa d a io o e alua e a s a egy’s pe o mance.
Sha pe (1966) applied Roy’s ideas o Ma kowi z’s mean- a iance amewo k, in wha has
become one o he bes known pe o mance e alua ion me ics.
Sha pe a io has become he ‘gold s anda d’ o pe o mance e alua ion. Sha pe a ios a e
g ea ly a ec ed by some o he s a is ical ai s inhe en o hedge und s a egies in gene al. The
Sha pe a io compa es how well an equi y in es men pe o ms o he a e o e u n on a isk-
ee in es men , such as U.S. go e nmen easu y bonds o bills. When compa ing unds o
po olios, in es o s should conside bo h absolu e e u ns and isks. While one po olio o
und could ha e highe e u ns, i is only a good in es men i hose highe e u ns do no come
wi h addi ional isk. The o mula o he sha pe a io is he ollowing:
Sha pe Ra io =
𝑅𝑝−𝑅𝑓
𝜎𝑝
(10)
Whe e 𝑅𝑝 is he po olio e u n, 𝑅𝑓 is he isk- ee a e and 𝜎𝑝 is he s anda d de ia ion o he
po olio.
A good Sha pe Ra io la gely depends on he in es o 's isk ole ance and in es men objec i es.
Gene ally, any alue g ea e han 1 is conside ed accep able, while a a io highe han 2. is
conside ed e y good, and a a io o 3 o highe is conside ed excellen . Howe e , i 's impo an
o no e ha a highe Sha pe Ra io may no always be be e , as i could be a esul o aking on
excessi e isk. Ul ima ely, in es o s should e alua e hei po olios based on hei unique
in es men goals and isk ole ance, using he Sha pe Ra io as one o many ools o making
in o med in es men decisions.
Fo he Sha pe Ra io calcula ion, I ha e used he annual e u n wi h ein es men as he
po olio e u n, he isk- ee a e is he 10-yea easu y a e and I ha e es ima ed he s anda d
de ia ion in Rs udio o e e y pai o s ocks.
28
5. RESULTS AND DISCUSSION
5.1. COINTEGRATION RESULTS
Fo ins ance, le ´s check he case o Visa and Mas e ca d. Based on he p o ided eg ession and
uni oo es s, I need o assess whe he he e is a coin eg a ion ela ionship be ween MA and V
based on he in o ma ion abou he esiduals.
Reg ession Model and Residuals
The gi en eg ession model:
MA[i]=1.8454×V[i]−47.0284+R[i]
whe e R[i] =0.9660R[i−1]+ϵ[i],ϵ[i]∼N(0,2.23422)
sugges s ha MA is eg essed on V and he esiduals R[i] a e supposed o ollow an AR(1)
p ocess. Howe e , he e's a wa ning ha he esiduals do no exhibi a pe ec AR(1) s uc u e.
Now, le 's e iew he uni oo es s applied o he esiduals ha can be seen in Table 1 below:
V-MA
S a is ics
P-Value
-5.618
0.00010
-63.894
0.00010
0.963
0.00010
-4.203
0.00219
-38.439
0.00010
-50.648
0.00372
Table 1: Uni oo es s
Rega ding he Augmen ed Dickey-Fulle (ADF), ha is he es ha I will ely mo e on since i
es s he abili y o accoun o highe -o de au oco ela ion, has lexibili y in modeling di e en
ypes o ime se ies da a, and i s well-es ablished p esence in he li e a u e and i s ease o use,
make a good choice o ely on es ing o uni oo s. I has a es s a is ic o -5.618 and a p-
alue o 0.00010, which indica es s ong e idence agains he null hypo hesis o a uni oo ,
sugges ing ha he esiduals a e s a iona y. The P- alue is smalle han he mos common
signi icance le el o 0.05, and i ´s e en mo e mino han he 0.01 le el. Rega ding he s a is ics,
he alue o -5.618 is smalle han he c i ical alue o he ADF es o he signi icance le el
o 0.01 which is -3.43. The c i ical alues o he ADF es a e in he ollowing Table 2,
acco ding o Cook (2001). In his esea ch, Cook used se e al sample sizes. I will use he 80-
sample size, e en i mine is only 50. Fo all sample sizes (including I = o) and a all le els o
29
signi icance, he MK c i ical alues a e g ea e in absolu e alue han hose o Cheung and Lai
(1995). Consequen ly, he MacKinnon alues u he exagge a e he low powe p oblem
associa ed wi h ADF es s. Howe e , MacKinnon used o calcula e c i ical alues o any
sample size, and his has become s anda d p ac ice in empi ical wo k, so I will use i oo.
On he le , we ha e he signi icance le el, and on he igh , he ma ched c i ical alue o his
es .
Signi icance Le el
C i ical Value
1%
-4,076
5%
-3,466
10%
-3,159
Table 2- C i ical alues
A mo e nega i e es s a is ic alling in he ejec ion egion means we ha e s a is ically
signi ican e idence o conclude ha he se ies is s a iona y and does no ha e a uni oo .
By ocusing on mo e nega i e alues, hese es s help iden i y when a ime se ies is likely o be
s a iona y, which is c ucial o making meaning ul in e ences and a oiding alse eg essions in
ime se ies analysis.
Fo he coin eg a ion es s, a p- alue less han 0.05 indica es s ong e idence agains he null
hypo hesis, allowing me o ejec i and I will ely on ha alue. Howe e , a p- alue less han
0.01 indica es e en s onge e idence agains he null hypo hesis. I i ´s g ea e han 0.05 and
less han 0.10, he e idence is weak, and I will no ha e con idence in ha da a. Rega ding he
coin eg a ion es s, i ´s no usual o a pai o wo s ocks o pass on e e y uni oo es , so I will
accep ha a pai is coin eg a ed i 3 o he 5 es s a e below he 0.05 p- alue (95% con idence).
Rega ding he o he es s, he Phillips-Pe on (PP) es also con i ms he s a iona i y o he
esiduals wi h a s a is ic o -63.894 and a p- alue o 0.00010. Then Pan ula, Gonzales-Fa ias,
and Fulle 's (PGFF) es unusually shows a s a is ic o 0.963 bu a e y low p- alue o 0.00010,
ypically sugges ing ejec ion o he null hypo hesis o a uni oo , hough he in e p e a ion
migh need con ex . Ellio , Ro henbe g, and S ock DF-GLS (ERSD) es wi h a s a is ic o -
4.203 and a p- alue o 0.00219 also sugges s ha he esiduals a e s a iona y. Johansen's T ace
Tes (JOT) and Schmid and Phillips Rho (SPR): Bo h o hese coin eg a ion-speci ic es s
indica e no uni oo , suppo ing he p esence o coin eg a ion. Rega ding he case o he PGFF
es ha has a posi i e s a is ic, I will dis ega d ha and conside an ou lie , ega ding he o he
decen alues o ejec he null hypo hesis.
30
The e o e, despi e he wa ning ha he esiduals a e no pe ec ly au o eg essi e (AR(1)),
almos all uni oo es s on he esiduals s ongly sugges ha hey a e s a iona y. The e o e, i
can be concluded ha Mas e ca d and Visa a e coin eg a ed.
Rega ding he coin eg a ion es s, we can conside ha 8 pai s ha e some so o
coin eg a ion, so a p- alue smalle han he signi icance le el o a s a is ic smalle han he
c i ical alue. We ha e o he pai s ha a e no coin eg a ed bu ha e shown a good
pe o mance. Bu in he nex s ep, we will see he esul s.
5.2. RISK-ADJUSTED PERFORMANCE METRICS RESULTS
We ha e o check he isk o he po olio. The isk pe o mance me ics o he in es men
po olio we e calcula ed o he pe iod om Janua y 1, 2016, o Ap il 30, 2024. These me ics
p o ide insigh s in o he isk-adjus ed e u ns and o e all ola ili y o he po olio. The key
me ics conside ed include he Sha pe Ra io, s anda d de ia ion, and CAPM.
As I s a ed be o e, o he Sha pe Ra io calcula ion, I ha e used he annual e u n wi h
ein es men as he po olio e u n, he isk- ee a e is he 10-yea easu y a e, which s ands
a 4,69% and hen I ha e es ima ed he s anda d de ia ion in Rs udio o e e y pai o s ocks.
The s anda d de ia ion was calcula ed om he sp ead o his s a egy in each pai . The sp ead
is how much he p ice o wo s ocks will de ia e om each o he , so i will de he s anda d
de ia ion o he s a egy. As men ioned be o e, I ha e assumed he be a a 0 o his pai s ading
s a egy, so he alue o CAPM will be he isk- ee a , which s ands a 4,69% on 30 Ap il
2024. Fo he coin eg a ed pai s, in Table 3, we can see ha he pai wi h he bes Sha pe Ra io,
so, he pai wi h he bes pe o mance and less isk, was Visa and Mas e ca d (V-MA). The pai
wi h he lowes Sha pe Ra io was he NVO-LLY, wi h a alue o 0,05. This shows he
co ela ion be ween s anda d de ia ion and Sha pe a io, as his pai had he highes alue in
s anda d de ia ion and he lowes in Sha pe a io, being a pai wi h highe isk han he
emaining ones.
Table 3: Sha pe Ra io
Coin eg a ed Pai s
Annual e u n
wi h/ ein es men %
S anda d De ia ion
Sha pe
Ra io
PYPL-SQ
11,20%
8,16%
0,80
V-MA
10,71%
1,42%
4,24
ADBE-ADSK
16,73%
5,12%
2,35
SPGI-MCO
13,25%
2,05%
4,17
NVO-LLY
4,88%
8,27%
0,02
KO-PEP
7,54%
2,65%
1,07
Mean
10,72%
4,61%
2,11
37
BIBLIOGRAPHICAL REFERENCES
Alexande , C., Giblin, I., & Wedding on, W. (2002). Coin eg a ion and asse alloca ion: a new
ac i e hedge und s a egy. Resea ch in In e na ional Business and Finance, 16(5), 65-90.
Asho eh, A., B a o, J. M. (2021). A Conse a i e App oach o Online C edi Sco -ing. Expe
Sys ems Wi h Applica ions, Volume 176, p. 1-16, 114835.
Asho eh, A., B a o, J. M., Ayuso, M. (2021). A No el Laye ed Lea ning App oach o
Fo ecas ing Respi a o y Disease Excess Mo ali y du ing he COVID-19 pandemic. A as da 21ª
Con e ência da Associação Po uguesa de Sis emas de In o mação 2021, CAPSI 2021, Volume
2021-Oc obe , Code 183080.
Asho eh, A., B a o, J. M., Ayuso, M. (2022). A New Ensemble Lea ning S a egy o Panel
Time-Se ies Fo ecas ing wi h Applica ions o T acking Respi a o y Disease Ex-cess Mo ali y
du ing he COVID-19 pandemic. Applied So Compu ing, 128, 109422.
Bjö ck, Å. (1990). Leas squa es me hods. Handbook o nume ical analysis, 1, 465-652.
Bowen, D. A., & Hu chinson, M. C. (2016). Pai s ading in he UK equi y ma ke : Risk and
e u n. The Eu opean Jou nal o Finance, 22(14), 1363-1387.
B a o, J. M. (2024). Ensemble me hods o S ock Ma ke P edic ion. In Meo, R. & Sil es i,
F. (edi o s). Machine Lea ning and P inciples and P ac ice o Knowledge Disco e y in
Da abases. In e na ional Wo kshops o ECML PKDD 2023, Tu in, I aly, Sep embe 18–22,
2023, Re ised Selec ed Pape s, Pa V. MIDAS - The 8 h Wo kshop on MIning DA a o
inancial applica ionS
B a o, J. M. (2020). Longe i y-Linked Li e Annui ies: A Bayesian Model Ensemble P icing
App oach. CAPSI 2020 P oceedings. 29. h ps://aisel.aisne .o g/capsi2020/29.
B a o, J. M. (2021). Fo ecas ing Longe i y o Financial Applica ions: A Fi s Expe imen wi h
Deep Lea ning Me hods. In: Kamp M. e al. (eds) Machine Lea ning and P inciples and P ac ice
o Knowledge Disco e y in Da abases. ECML PKDD 2021. Communica ions in Compu e and
In o ma ion Science, ol 1525. Sp inge , Cham. 232–249.
B a o, J. M. (2022). P icing Pa icipa ing Longe i y-Linked Li e Annui ies: A Bayesian Model
Ensemble app oach. Eu opean Ac ua ial Jou nal, 12, 125–159.
B a o, J. M., & Asho eh, A. (2023). Ensemble Me hods o Consume P ice In la ion
Fo ecas ing. CAPSI 2023 - 23 d Con e ence o he Po uguese Associa ion o In o ma ion
Sys ems (23ª Con e ência da Associação Po uguesa de Sis emas de In o mação), pp. 317-336.
DOI: 10.18803/capsi. 23.317-336
B a o, J. M., Ayuso, M. (2021a). Linking Pensions o Li e Expec ancy: Tackling Concep ual
Unce ain y h ough Bayesian Model A e aging. Ma hema ics, 9(24): 3307, p. 1-27.

38
B a o, J. M., Ayuso, M., Holzmann, R., Palme , E. (2021). Add essing he Li e Expec ancy
Gap in Pension Policy. Insu ance: Ma hema ics and Economics, 99, 200-221.
B a o, J. M., Ayuso, M., Holzmann, R., & Palme , E. (2023). In e gene a ional Ac ua -ial
Fai ness when Longe i y Inc eases: Amending he Re i emen Age. Insu ance: Ma hema ics
and Economics, 113, 161-184.
B a o, J. M., El Mekkaoui, N. (2022). Sho -Te m CPI In la ion Fo ecas ing: P obing wi h
Model Combina ions. In: Rocha e al. (eds) In o ma ion Sys ems and Technolo-gies.
Wo ldCIST 2022. Lec u e No es in Ne wo ks and Sys ems, ol 468. Sp inge , Cham, pp. 564–
578. h ps://doi.o g/10.1007/978-3-031-04826-5_56
Caldei a, J., & Mou a, G. V. (2013). Selec ion o a po olio o pai s based on coin eg a ion: A
s a is ical a bi age s a egy. A ailable a SSRN 2196391.
Cheung, Y. W., & Lai, K. S. (1997). Bandwid h selec ion, whi ening, and he powe o he
Phillips-Pe on es . Econome ic Theo y, 13(5), 679-691.
Cook, S. (2001). Fini e-sample c i ical alues o he Augmen ed Dickey-Fulle s a is ic: a no e
on lag o de . ECONOMIC ISSUES-STOKE ON TRENT-, 6(2), 31-46.
Dickey, D. A., & Fulle , W. A. (1979). Dis ibu ion o he es ima o s o au o eg essi e ime
se ies wi h a uni oo . Jou nal o he Ame ican S a is ical Associa ion, 74(366a), 427-431.
Ellio , R. J., Van De Hoek*, J., & Malcolm, W. P. (2005). Pai s ading. Quan i a i e
Finance, 5(3), 271-276.
Engelbe g, J., Gao, P., & Jaganna han, R. (2009, No embe ). Ana omy o pai s ading: he ole
o idiosync a ic news, common in o ma ion, and liquidi y. In Thi d Singapo e In e na ional
Con e ence on Finance.
Engle, R. F., & G ange , C. W. (1987). Co-in eg a ion and e o co ec ion: ep esen a ion,
es ima ion, and es ing. Econome ica: jou nal o he Econome ic Socie y, 251-276.
Fama, E. F. (1970). E icien ma ke hypo hesis: A e iew o heo y and empi ical
wo k. Jou nal o Finance, 25(2), 28-30.
Ga e , e al. (1998). Pai s ading: Pe o mance o a ela i e alue a bi age ule.
Technical epo , Wo king Pape s ysm26, Yale School o Managemen .
Ga e , e al. (2006). Pai s ading: Pe o mance o a ela i e- alue a bi age ule. The Re iew
o Financial S udies, 19(3), 797-827.
Hend y, D. F. (1995). Dynamic econome ics. Ox o d Uni e si y P ess.
James, G., Wi en, D., Has ie, T., & Tibshi ani, R. (2013). An in oduc ion o s a is ical
lea ning (Vol. 112, p. 18). New Yo k: sp inge .
39
K auss, C. (2017). S a is ical a bi age pai s ading s a egies: Re iew and ou look. Jou nal o
Economic Su eys, 31(2), 513-545.
Kwia kowski, D., Phillips, P. C., Schmid , P., & Shin, Y. (1992). Tes ing he null hypo hesis o
s a iona i y agains he al e na i e o a uni oo : How su e a e we ha economic ime se ies
ha e a uni oo ? Jou nal o Econome ics, 54(1-3), 159-178.
Lin ne , J. (1965). Secu i y p ices, isk, and maximal gains om di e si ica ion. The jou nal o
inance, 20(4), 587-615.
Ma kowi z, H. M. (1991). Founda ions o po olio heo y. The jou nal o inance, 46(2), 469-
477.
Mudchana ongsuk, S., P imbs, J. A., & Wong, W. (2008). Op imal pai s ading: A s ochas ic
con ol app oach. In 2008 Ame ican con ol con e ence (pp. 1035-1039). IEEE.
Nicholas, J. G. (2000). Ma ke neu al in es ing. P ince on, NJ: Bloombe g P ess.
Pa e son, K. D. (2000). An in oduc ion o applied econome ics: a ime se ies app oach (Vol.
1). New Yo k: Palg a e.
Sha pe, W. F. (1966). Mu ual und pe o mance. The Jou nal o business, 39(1), 119-138.
Vidyamu hy, G. (2004). Pai s T ading: quan i a i e me hods and analysis (Vol. 217). John
Wiley & Sons.
Wei, L., & Keogh, E. (2006). Semi-supe ised ime se ies classi ica ion. In P oceedings o he
12 h ACM SIGKDD in e na ional con e ence on Knowledge disco e y and da a mining (pp.
748-753).
Whis le , M. (2004). T ading pai s: cap u ing p o i s and hedging isk wi h s a is ical a bi age
s a egies (Vol. 216). John Wiley & Sons.
Woold idge, J. M. (1996). In oduc o y Econome ics: A Mode n App oach 3 d ed.
40
APPENDIX A
PYPL-SQ
V-MA
ADBE-ADSK
Uni Roo Tes s o Residuals
S a is ics
P-Value
S a is ics
P-Value
S a is ics
P-Value
Augmen ed Dickey-Fulle (ADF)
-2,899
0,13613
-5.618
0.00010
-3,664
0,02055
Phillips-Pe on (PP)
-22,654
0,03519
-63.894
0.00010
-25,024
0,02152
Pan ula, Gonzales-Fa ias and Fulle (PGFF)
0,988
0,04338
0.963
0.00010
0,989
0,05725
Ellio , Ro henbe g and S ock DF-GLS (ERSD)
-2,995
0,01597
-4.203
0.00219
-3,033
0,0143
Johansen's T ace Tes (JOT)
-19,739
0,06185
-38.439
0.00010
-15,624
0,19575
Schmid and Phillips Rho (SPR)
-33,325
0,01401
-50.648
0.00372
-28,89
0,02589
JPM-GS
MRK-ABBV
BK-FAF
KO-PEP
F-GM
S a is ics
P-Value
S a is ics
P-Value
S a is ics
P-Value
S a is ics
P-Value
S a is ics
P-Value
-2,034
0,50211
-2,096
0,47323
-2,273
0,39057
-3,686
0,01945
-2,048
0,49574
-8,245
0,48574
-8,589
0,46715
-13,704
0,19541
-29,821
0,00926
-8,338
0,48073
0,996
0,40222
0,996
0,38186
0,994
0,21177
0,985
0,02218
0,996
0,48476
-1,434
0,34067
-1,912
0,16419
-1,73
0,21792
-3,498
0,00733
-1,141
0,46227
-8,208
0,80636
-12,234
0,44343
-11,835
0,47306
-18,578
0,08778
-15,236
0,22084
-6,062
0,71896
-10,637
0,42453
-10,385
0,43614
-29,358
0,02426
-6,354
0,69717
GOOG-META
JNJ-PFE
NVDA-AMD
AVGO-QCOM
INTC-MU
S a is ics
P-Value
S a is ics
P-Value
S a is ics
P-Value
S a is ics
P-Value
S a is ics
P-Value
-2,151
0,44741
-1,695
0,65842
-0,672
0,94361
-1,584
0,70978
0,686
0,99659
-8,454
0,47444
-9,256
0,4311
-2,316
0,91346
-5,552
0,69044
1,509
0,99732
0,996
0,39396
0,995
0,36028
0,999
0,84704
0,997
0,57235
1,001
0,99385
-1,662
0,24618
-1,537
0,29792
-0,941
0,54731
-1,34
0,3797
1,23
0,99021
-15,726
0,19171
-8,802
0,75189
-33,024
0,00275
-16,98
0,14181
-7,926
0,82765
-9,48
0,47778
-8,209
0,55888
-2,528
0,95851
-5,097
0,79092
-6,644
0,67555
PANW-CRWD
BMBL-MTCH
SPGI-MCO
AAPL-MSFT
NVO-LLY
S a is ics
P-Value
S a is ics
P-Value
S a is ics
P-Value
S a is ics
P-Value
S a is ics
P-Value
-1,558
0,71967
-2,395
0,32847
-3,9
0,00977
-1,241
0,83804
-3,406
0,04135
-4,629
0,76381
-11,064
0,33452
-45,294
0,00123
-7,561
0,53288
-37,15
0,00546
0,996
0,62086
0,986
0,27946
0,969
0,00134
0,995
0,32028
0,981
0,00673
-0,798
0,61468
-1,596
0,27805
-2,306
0,0781
-1,049
0,5007
-2,684
0,03395
-5,442
0,96755
-20,057
0,05603
-30,662
0,00495
-11,318
0,51443
-44,254
0,0001
-2,99
0,92651
-6,166
0,71848
1,569
0,99987
-4,616
0,82614
-11,688
0,3762
41
WFC-C
BKNG-ABNB
WMT-COST
XOM-CVX
NFLX-DIS
S a is ics
P-Value
S a is ics
P-Value
S a is ics
P-Value
S a is ics
P-Value
S a is ics
P-Value
-2,712
0,19101
-2,117
0,45953
-2,145
0,45032
-2,438
0,31329
-1,924
0,55317
-9,384
0,42424
-10,031
0,3902
-10,195
0,38041
-8,532
0,47025
-7,522
0,53596
0,996
0,46758
0,986
0,24303
0,995
0,29086
0,997
0,60348
0,995
0,37004
-1,195
0,43992
-2,015
0,14009
-1,333
0,38261
-0,81
0,60412
-1,642
0,25461
-8,559
0,77487
-7,64
0,85199
-14,887
0,24671
-9,388
0,69665
-10,371
0,60385
-12,801
0,32498
-7,331
0,63864
-6,474
0,6882
-12,989
0,31634
-7,06
0,64452
Pai s ading s a egy in es men e u n
Wi hou
ein es men
Wi h
ein es men
Annual e u n
wi hou / ein es men
%
Annual e u n
wi h/ ein es men
%
PANW-CRWD
1,1260
1,0096
1,51%
0,11%
BMBL-MTCH
1,7645
1,9060
9,17%
10,87%
AAPL-MSFT
1,5186
1,6185
6,22%
7,42%
JPM-GS
1,3031
1,3187
3,64%
3,82%
MRK-ABBV
1,2509
1,2147
3,01%
2,58%
BK-FAF
1,7390
1,8721
8,87%
10,46%
F-GM
1,2961
1,2389
3,55%
2,87%
GOOG-META
1,6795
1,7873
8,15%
9,45%
JNJ-PFE
1,4594
1,5277
5,51%
6,33%
NVDA-AMD
1,1729
0,9781
2,07%
-0,26%
AVGO-QCOM
1,3188
1,2692
3,83%
3,23%
INTC-MU
1,4681
1,3729
5,62%
4,47%
WFC-C
1,3251
1,2977
3,90%
3,57%
BKNG-ABNB
1,7176
1,9196
8,61%
11,04%
WMT-COST
1,4191
1,4653
5,03%
5,58%
XOM-CVX
1,1179
1,0967
1,41%
1,16%
NFLX-DIS
1,7015
1,7702
8,42%
9,24%
MCD-SBUX
1,2849
1,2797
3,42%
3,36%
PM-MO
1,4333
1,4806
5,20%
5,77%
PYPL-SQ
1,7868
1,9335
9,44%
11,20%
V-MA
1,6485
1,8925
7,78%
10,71%
ADBE-ADSK
1,9520
2,3942
11,42%
16,73%
SPGI-MCO
1,7584
2,1041
9,10%
13,25%
NVO-LLY
1,4232
1,4064
5,08%
4,88%
KO-PEP
1,5030
1,6280
6,04%
7,54%
Mean
1,6787
1,8931
5,84%
6,62%
Table 8: Pai s ading s a egy in es men e u n
MCD-SBUX
PM-MO
S a is ics
P-Value
S a is ics
P-Value
-1,8
0,60997
-2,918
0,1305
-8,632
0,46482
-16,456
0,12084
0,995
0,31055
0,992
0,14275
-1,702
0,22963
-2,851
0,02235
-9,989
0,63993
-12,069
0,45568
-4,053
0,8671
-19,296
0,11709
Table 7: Uni Roo es o esiduals
42
Coin eg a ed
Pai s
Wi hou
ein es men
Wi h
ein es men
Annual e u n
wi hou / ein es men
%
Annual e u n
wi h/ ein es men
%
PYPL-SQ
1,7868
1,9335
9,84%
11,20%
V-MA
1,6485
1,8925
8,11%
10,71%
ADBE-ADSK
1,9520
2,3942
11,90%
16,73%
SPGI-MCO
1,7584
2,1041
9,48%
13,25%
NVO-LLY
1,4232
1,4064
5,29%
4,88%
KO-PEP
1,5030
1,6280
6,29%
7,54%
Mean
1,6787
1,8931
8,48%
10,72%
Non Coin eg a ed
Pai s
Annual e u n
wi h/ ein es men %
S anda d
De ia ion
Sha pe
Ra io
PANW-CRWD
0,12%
8,72%
-0,52
BMBL-MTCH
11,33%
8,66%
0,77
AAPL-MSFT
7,73%
5,87%
0,52
JPM-GS
3,98%
7,89%
-0,09
MRK-ABBV
2,68%
10,54%
-0,19
BK-FAF
10,90%
8,74%
0,71
F-GM
2,99%
9,96%
-0,17
GOOG-META
9,84%
4,61%
1,12
JNJ-PFE
6,60%
4,38%
0,44
NVDA-AMD
-0,27%
18,32%
-0,27
INTC-MU
4,66%
7,85%
0,00
BKNG-ABNB
11,49%
4,99%
1,36
WMT-COST
5,82%
3,86%
0,29
XOM-CVX
1,21%
10,12%
-0,34
NFLX-DIS
9,63%
12,63%
0,39
MCD-SBUX
3,50%
6,80%
-0,18
PM-MO
6,01%
6,43%
0,20
Mean
5,17%
7,39%
0,21
Table 10: Sha pe Ra ion non-coin eg a ed pai s
Table 9: Pai s ading e u n o coin eg a ed pai s

43
Figu e 14: P ices Loading
Figu e 12: Lib a y´s used
Figu e 13: Coin eg a ion Code
44
Figu e 15: T aining se and LS eg ession
Figu e 16: Sp ead Equa ion
Figu e 17: No malized Po olio and No malized Sp ead
45
Figu e 18: Z-sco e code
Figu e 19: Sp ead S anda d De ia ion
Figu e 20: Z-sco e and ading signal code
46
Figu e 22: P&L o aded sp ead wi h ein es men code
Figu e 23: D awdown code
Figu e 24: T ading signal wi h Z-sco e code
Figu e 25: Equi alen po olio app oach
Figu e 21: Re u n o aded sp ead code