• No results found

Impact of key determinants on the profitability of pairs trading strategy.

N/A
N/A
Protected

Academic year: 2021

Share "Impact of key determinants on the profitability of pairs trading strategy."

Copied!
68
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Impact of key determinants on the profitability of

pairs trading strategy.

IB (EBB731B10)

______________________________________________________________________ Pavels Stecenko University of Groningen

S2985691 Faculty of Economics and Business Dierenriemstraat 193 Msc. Finance

9742 AG. Groningen June 8, 2017

P.Stecenko@student.rug.nl Supervisor prof. R. Wessels

(2)

2

__________________________________________________________

Abstract

This paper serves as a practical guide for pairs trading strategy application. It provides tools and guidelines for back testing different sets of pairs. The importance of key determinants is examined using multiple portfolios and provides robust outlook for choosing rules to increase profitability of the strategy. The paper finds that increasing the distance between opening and closing thresholds enhances profitability but the effect exhibits diminishing behaviour. The length of a period that serves as a reference for determining “normal” relationship has direct impact on the overall profitability. Moreover, transaction costs greatly reduce profits from the strategy. The biggest impact on the profitability lies within pairs selection process and can take various forms. As a result, the strategy showed profitability only in few of the back test, where all influencing factors had optimal values. The author expects that the reader will be able to optimise trading rules and perform his/her own tests using provided set of tools.

____________________________________________________________________________________

Key words: Statistical Arbitrage, pairs trading, quantitative finance, algorithmic trading

JEL Classification: G11, G12, G14

(3)

3

1. Introduction

Statistical arbitrage, as we know it, originated from a strategy called “pairs trading”, which was developed in 1982-1983 at Morgan Stanley. A group of mathematicians, physicists and computer scientists led by a Nunzio Tartaglia were working on a development of strategies which would generate and execute trades automatically. One of those strategies involved trading pairs of securities with tendencies of their prices to move together. Eventually, this trading strategy

became known as pairs trading. (Mayordomo, Pena and Romo, 2011)

The idea behind pairs trading is based on the assumption that stocks which historically has moved together, should maintain their long term relationship despite temporary deviations (Conrad and Kaul, 1989) (mean reverting process). For example, Pepsi and Coca-cola create similar products and share the same ups and downs of the market. Historical share prices of these companies are highly correlated. If price of Pepsi would suddenly rise, diverging from the historical equilibrium, one could assume as time passes by, either price of Pepsi stock would decrease, or price of Coca-cola would increase, restoring the historical relationship between their stock prices. The trader does not know the origin of mispricing and needs to take an advantage of all possible scenarios. First scenario: he assumes that Pepsi was mispriced (sudden rise) and price should fall restoring historical relationships. Second scenario: Coca-cola was mispriced (no rise) and the price should increase restoring the historical relationship. Third scenario: both stock prices were mispriced and should move to an intermediate value. In this situation Pairs trader would buy shares of Coca-cola and sell shares of Pepsi. This way profit is made either way as long as the historical relationships prevail (mean reverting) (Elliot, Van Der Hoek and Malcolm, 2005). The attractive feature of this strategy is self-financing, since a trader will use money gained from short selling to enter into a long position (Lederman 1996). This aspect of the strategy allows to maintain highly leveraged positions, magnifying potential returns, as well as losses.

(4)

4 used fundamental and technical analyses to find pairs for trading. Stocks were split on the industry level, compared by the multiples, checked for correlations and so on.

The first section of this study addresses finding an efficient way of selecting pairs for trading though theoretical literature review. The reader is introduced to two pairs selection procedures: Distance Method (DM) and Cointegration.

The strategy was designed as an automated process, so it should be able to run without traders supervision. Figure 1 shows the time frame t, where A and B are periods of time. In the first period A, pairs trading strategy determines historical/normal relationship between two stocks which are expressed as a mean and a standard deviation. The period A is backward looking (t - y) and is based on an already available data. Point B represents an actual date and corresponding stock prices. Current stock prices are then compared to the “normal” prices, which were determined in a period A and evaluated on a basis of how much they deviate from the original relationship. This way selected pairs are monitored, pending for the occurrence of a price shock, that sufficiently diverges from historical relationship. This window rolls forward as time progresses, measuring opportunities for entering into trades.

Period A B

t

Figure 1 Rolling window process

The length of a period A as well as the level of deviations from normal state that should trigger pairs purchasing process have direct impact on the final outcome of the strategy. Thus, the trading process and variables that are used in the study should be formally defined, which is done in the second section: Research method and Data collection. Furthermore, the second section shows the importance of the transaction costs, as well as the metrics that are used in the evaluation of the trading results.

(5)

5 value per industry. The third set has one portfolio of twenty pairs with the smallest SSD value. Lastly, the fourth portfolio is formed from two pairs per industry with the smallest SSD value. Each set of portfolios is tested with different thresholds for entering into the trades, as well as different periods for determining “normal” relationship between pairs. Back testing is performed with and without the transaction costs for two different pairs selection methods. Multiple sets of portfolios provide robust overview on the impact of key determinants that are used in the strategy. Finally, the results of back testing and the impact of key determinants on those results are presented.

The purpose of this paper, however, is practical rather than theoretical. The back testing process requires specialised software1 or programming skills. The specialised software can cost up to

1150 euros, depending on individuals status and application preferences. The programming skills are often neglected by the financial studies and as a results students find themselves unable to explore automated trading strategies. Most finance professionals heard about high frequency trading and great amount of automated programmes that use algorithms for trading in the stock market (Boehemer, Fong, and Wu, 2015), but what do they actually know about them? Fair guess is: not much. Thus, the paper focuses on providing a tool that would allow each and any to create and back test their unique pairs trading strategy.

The Appendix provides complete framework for obtaining the data and back testing any pair in any period of time using different key determinants of the strategy. This can be of interest to people who are less familiar with the pairs trading strategy but are interested in the subject.

1https://nl.mathworks.com/pricing-licensing.html?prodcode=ET MATLAB provides back testing for pairs trading

(6)

6

2. Literature review

According to Rad et al (2016) Pairs trading strategies should be broken down into two components: first, the criteria/model for finding a pair and second, trading process. Slight adjustments in each of the categories may result in an unexpected outcome for what may seem as an identical strategy. Thus, the brake down allows to avoid potential data mining criticism and highlight important aspects of the strategy.

Alexander, Giblin and Weddington (2001) in their paper emphasize that a profit from arbitrage strategies depends on a capability of correctly modelling stock price behaviour. Thus, authors suggest that the process of pairs selection should be centred on a model. The main goal of the model is to find pairs that will be traded by capturing long term relationship between stock prices and short run price shocks that will re-converge to the original relationship.

The first well known in depth analysis of the pairs trading strategy is addressed by Vidyamurthy (2004) in his book “Pairs Trading Quantitative methods and Analysis”. The book covers different models for finding pairs and trading processes, as well as, the differences between them. Vidyamurthy focuses on defining concepts of pairs trading and does not cross theoretical boundaries, providing no evidence that the pairs trading strategy can generate returns.

(7)

7 method of previously mentioned authors and extends it with an analysis of different opening/closing criteria on the Brazilian financial market in a period from 2000 to 2006. The author finds that adjustments in opening/closing rules have a direct impact on the number of total trades and their profitability. Jacobs and Weber (2015) in their recent paper use DM on 34 countries in a period from 2000 to 2013 and find that the strategy showed solid performance across different financial markets but returns tend to decline as time progresses, possibly due to increasing competition and widespread of the trading approach.

Do and Faff (2010) extend time period of Gataev et al (2006) to 2009 and find that profits from DM continue to decline at an increasing rate. Their paper provides additional factors that may influence decreasing returns from the strategy. Authors claim that great part of pairs stop convergence and establish new relationship. For example, one of the two companies that had similar returns may lose competitive advantage and underperform in relation to other company. Then the divergence between stock prices of these companies is not temporary but permanent. In a follow-up paper Do and Faff (2012) claim that after accounting for a transaction and short selling costs, DM strategy does not generate any excess returns in years 2002 to 2009.

The second most studied approach towards pairs selection is cointegration. The idea behind this method is similar to DM, to find stock that move in a similar matter and take advantage of situations where stocks temporarily diverge from their relationship. As long as the two time series are cointegrated they are considered suitable for trading. Lin, McCrae and Gulati (2006) were one of the first researchers, who in their study examine cointegration as a criteria for a pairs selection. The approach was tested on two listed Australian banks (ANZ and ADB). Despite the small time frame of the study from 2001 to 2002 (20 months) Lin et al (2006) provides evidence of positive returns from cointegration model.

(8)

8 Huck and Afawubo (2015) in their paper continued to compare DM and cointegration using components of S&P 500 in a period from 2000 till 2011. Both pairs selection method showed positive excess returns before accounting for the transaction costs. However, after taking in to account transaction costs only cointegration selection method showed positive returns. Huck et al (2015) found that cointegration pairs selection procedure greatly reduces number of traded pairs but increase overall profitability. This can be explained by the fact that DM gives relative comparison of the pairs, there will always be a pair that has minimum SSD value in relation to others. Cointegration, however, is a binomial constraint, if pairs failed cointegration test they will not be traded.

Finally, Rad, Kwong Yew Low and Faff (2016) reinforce findings of previous researchers by comparing DM and cointegration pairs selection methods on the US equity market from 1962 to 2014. Moreover, authors find evidence of higher performance during economic crisis periods for cointegration method.

All researches state that despite chosen pairs selection method they were not able to find evidence of correlation between market and the strategy returns, demonstrating the concept of market neutrality. Thus, any profit or loss from the pairs trading is associated with a relative movement between two assets and not the market. Futhermore, the researchers agree that the strategy is time dependant, it performs well in 2nd half of 20th century but gradually looses excess

returns, till it becomes unprofitable in the beginning of 21st century.

(9)

9

3. Research method and data collection

The pairs trading strategy is applied in many forms and variations. As already mentioned, small changes in trading procedures may drastically impact the overall results. Thus, this chapter defines and specifies the process which is used.

A. Data set

The data set is based on the most recent S&P500 index underlying companies that were publicly listed for the period of ten years. This ultimately means that the complete data set contains 2769 trading days starting at 1st January 2006 and ending at 30th December 2016. Since not all of the

companies were publicly listed for the specified time frame, only 465 companies are included in the final data set. The data is obtained from yahoo.finance by means of quantmod package in R software. The complete code for obtaining the data is provided in the Appendix 3. The pairs trading is sensitive to stock splits, dividends and new stock offerings. In order to account for those factors Adjusted closing prices are used in the study.

B. Market neutrality

As already mentioned one of the attractive sides of pairs trading strategy is market neutrality. However, market neutrality is not a requirement of the strategy but rather an additional feature that may or may not be present. Strategy is required to be dollar neutral. Whereby the value of long investment is offset by the equal value of a short position in a similar sector. This concept is a result of the fact that a trader assigns equal probability to the three possible scenarios of a stock price correction. It is important to understand that dollar neutral position is not the same as market neutral, although there are some similarities which are discussed in later chapters. Due to the fact that it is not known whether market neutrality is going to be present, it is checked ex post. For measuring the market neutrality correlation between strategy returns and S&P500 returns is examined. Moreover, simple linear regression is used for checking if returns from S&P500 are statistically significant in explaining returns from the pairs trading strategy. Three metrics are reported: correlation, R2, P-value of the regression. In order to better understand the concept of market neutrality it is defined in terms of one share consisting out of two similar stocks. From CAPM it follows that a return on an asset can be split into two components: systematic and non-systematic. More formally:

(10)

10 where, 𝑟𝑎 is return on the asset, 𝛽 is beta of the asset, 𝑟𝑚 is the return on market portfolio and

𝜀𝑎 is an error term representing non-systematic component. 𝑟𝑓 is a risk free rate, which is set to

0 in further calculations. The aim is to show difference between systematic and non-systematic components, 𝑟𝑓 in this case is not needed. The equation (1a) is commonly referred to as a

Security Market Line.

Based on the equation (1) returns of two portfolios (a and b) are defined as:

𝑟𝑎 = 𝛽𝑎 𝑟𝑚+ 𝜀𝑎 (1.2b) 𝑟𝑏= 𝛽𝑏 𝑟𝑚+ 𝜀𝑏 (1.2c)

Now, having two different portfolios with positive betas, joined portfolio is constructed. Where, “n” is a measure of quantity for short selling a portfolio “a” and purchase of a portfolio “b”. “n” in this case is needed in order to compensate for the difference between 𝛽 of two portfolios. This way the 𝛽 for the portfolio is equal to 0. It follows that return of such a portfolio should be equal to:

𝑟𝑏,𝑎= (𝛽𝑏− 𝑛𝛽𝑎)𝑟𝑚+ (𝜀𝑏− 𝑛𝜀𝑎) (1d) By definition 𝛽𝑏− 𝑛𝛽𝑎 is set to 0, meaning that (𝛽𝑏− 𝑛𝛽𝑎)𝑟𝑚= 0, which corresponds to market

neutrality concept. Vidyamurthy (2004)

Dollar neutrality, on the other hand, requires equal value of long and short positions. Thus, instead of aligning 𝛽 of two stock the amount of money invested in each position serves as a deciding factor. More formally:

(11)

11 concentrate on performance. For example, instead of investing 25$ leveraging them up to 100$ and maintaining long and short position of 50$ it is much easier to assume that it is possible to short sell 50$ and invest them into a long position, maintaining same value of 100$. Vast majority of the researches in the area of pairs trading use the same approach since the goal is to measure relative performance of the strategy.

It follows that return from the strategy is based on individual returns from long and short positions. More formally:

𝑟𝑠𝑡𝑟𝑎𝑡𝑒𝑔𝑦= 𝑟1 𝑆ℎ𝑎𝑟𝑒𝐵− 𝑟𝑛 𝑆ℎ𝑎𝑟𝑒𝑠𝐴 (2b)

Where 𝑟1 𝑆ℎ𝑎𝑟𝑒𝐵is a return from buying 1 share of a stock B and 𝑟𝑛 𝑆ℎ𝑎𝑟𝑒𝑠𝐴 is a return from “n”

shares from a short position in A. “n” compensates the stock price difference between A and B, ensuring equal value of positions. The profit and losses are reinvested trough time. For example, return from the first trade on a pair (x,y) is 0.10%, then 1.1% are invested into the next trade.

The hypothesis of the efficient markets according to Lamont and Thaler (2003) states that two identical companies should have same market prices. It is assumed that markets are efficient and relationship between two companies can be captured. There are several ways to capture the relationship between stock prices. Most common are:

 Linear regression between stocks A and B, where difference between predicted and actual value serves as a base for determining µ and σ of a “normal” relationship.  Difference between stock prices A and B (A-B), where difference serves as a base for

determining µ and σ of a “normal” relationship.

 Difference between Log prices of stocks A and B (LogA – LogB)  Price Ratio between stock prices A and B (A/B)

 Price Ratio between Log stock prices A and B (LogA / LogB)

(12)

12 B. This method is chosen since it is widely used in pairs trading webinars2 and online courses.

More formally:

𝑅𝑒𝑙𝑎𝑡𝑖𝑜𝑛𝑠ℎ𝑖𝑝𝑎,𝑏 = 𝑃𝐴 / 𝑃𝐵 (3)

The strategy assumes that the relationship follow a stationary process with a constant mean and variance. More formally:

𝑅𝑎𝑡𝑖𝑜𝑎,𝑏 = 𝜇𝑎,𝑏 , 𝜎𝑎,𝑏 (4) This way using equation (3) and (4) it is possible to express price of a company A in terms of a company B. Of course, companies may change and this way of predicting prices is not entirely accurate. It is known that companies fall under influence of variety of factors including market conditions, seasonality, and much more. Equation (3) and (4) provide most accurate results when companies A and B are influenced by the same factors. Thus, once again importance of finding suitable pairs for this strategy is highlighted. The µ and σ are particularly important since they give a reference to which degree current price ratio diverged from relationships that are captured. This is expressed through the Z score, which serves as a reference to determining current state of the relationship between stock prices. The Z score is defined as:

𝑍 𝑠𝑐𝑜𝑟𝑒 = 𝑟𝑎𝑡𝑖𝑜𝑡𝑜− 𝜇𝑟𝑎𝑡𝑖𝑜

𝜎𝑟𝑎𝑡𝑖𝑜 (5)

where 𝑟𝑎𝑡𝑖𝑜𝑡𝑜is current state of “relationship” between stock A and B, 𝜇𝑟𝑎𝑡𝑖𝑜 , 𝜎𝑟𝑎𝑡𝑖𝑜 are mean

and standard deviation of the ratio in a time window that is chosen for capturing “normal” state of the stock prices. Z score in this setting represent how far current stock prices diverge, in terms of standard deviations, from their previously observed values. In the further context trading rules for opening and closing positions are addressed in terms of standard deviations. Shares are bought and sold when the ratio deviates from its long-term average value assuming that as time progresses the shares prices will return to their average ratio.

C. Pairs selection

As previously mentioned implementation of the pairs trading strategy is performed in two stages. First, pairs are formed based on chosen model and second, trading rules and determinants are specified.

(13)

13 The total number of possible pairs can be calculated as follows:

𝑃𝑁= 𝑁∗(𝑁−1)2 (6)

From the formula it follows that 107880 pairs can be formed based on the data sample that was chosen for this study. The number of pairs that needs to be analysed is great. In order to make the process of pairs selection more feasible screening procedure is set up. According to Gatev et al (2006) traders use two rules of thumb when searching for pairs:

 stocks should have sufficient liquidity

 stock should be in the same industry

Indeed, pairs trading is an active strategy which requires opening and closing positions for different stocks simultaneously. If one stock is illiquid and obtaining or selling it cannot be aligned with opposite position in a second stock the strategy will not work. Thus, illiquid stocks should be excluded from the sample. Luckily, S&P500 has enough liquidity to mitigate this problem.

Splitting stocks on the industry level reduces number of pairs that needs to be examined and excludes stocks that may appear as similar when the measuring window is small. For example, most of the stock sharply declined in their value during the financial crisis, if relationship between stocks are calculated on a monthly basis (20 trading days) it may appear that the stocks exhibit similar behaviour when in reality they are driven by an external event. Two conclusion follow: stock should be restricted to the same industry and evaluated on a sufficiently large historical data set. Following industry sectors are used: Consumer Discretionary, Consumer Staples, Energy, Financials, Health Care, Industrials, Information Technology, Materials, Real Estate, Telecommunications Services, Utilities.

For this study two pairs selection approaches are chosen:

1. The Distance Method described by Gatev et al (2006) 2. The Co-integration described by Vidyamurthy (2004)

(14)

14 follows original methodology of previous researches as close as possible and examines how deviations from the theory will affect end result.

Second, opening and closing rules are selected for stock positions. There is a trade-off between good and bad opportunity when looking at the trading rules. For example, if stocks have crossed four standard deviation benchmark in their relationship should it be considered as a good opportunity for trading or a bad one? It is fair to say that both of the statements are true. This question is case specific and will yield different results for different pairs, some pairs will return to their historical averages which will result in a great profit, and some will not, ultimately resulting in a loss.

The following two sections are set up in such a way so that they answer following questions:

1. Which assets move together and thus, need to have short-long positions?

2. How big should be the anomaly in relationship between the assets to open positions? 3. When is it optimal to close position?

D. Distance method

The DM is straightforward in its implementation. Approach identifies stocks, which move together in a similar matter. The DM can be broken down in two steps. First, cumulative total returns are calculated for the selected stocks. Second, matching pairs are selected by minimalizing the sum of squared distance between the returns.

SSD is defined as:

𝑆𝑆𝐷 = ∑𝑛 (𝑟𝑎,𝑡− 𝑟𝑏,𝑡)2

𝑡=1 (7)

where 𝑟𝑎,𝑡 is return of stock 𝑎 at time 𝑡.

The short and long position for a stocks in this case are opened when:

(15)

15 Gataev et al (2006) and Bogomolov (2010) suggest that appropriate threshold for entering in to a trade is 𝜇 + 2𝜎, where µ and σ (4) are obtained through z score (5) in pre specified period, meaning that:

 if Z score is ≥ 2σ from its µ then trading signal is triggered, where stock A is sold and stock B is bought (8a, 8b)

 if Z score is ≤ -2σ from its µ then trading signal is triggered, where stock A is bought and stock B sold (8c, 8d)

For academic purposes 1σ, 1,5σ, 2σ, 2.5σ, and 3σ (in some cases 3.5σ, 4σ) thresholds are examined to study the effect on a trade-off between higher profits and more risk (higher deviation from the mean) and lower profits less risk (lower deviation from the mean)

Closing rules are determined in a similar matter with only difference that the threshold is set to +-0.5. This is done in order to account for the fact that the stocks may not fully converge to 0 level (historical relationship), which will result in a loss for a position that could have been profitable.

E. Cointegration method

Due to an extensive time frame of the study co-integration method is implemented as an additional constraint for pairs that were selected in DM. It is possible that some of the pairs will not be co-integrated for specific periods. This will imply that pairs which failed to reject H0: λ = 0 for ADF test in a period of 60 days will not be traded. However, if later on the pairs will show statistical signs of cointegration they will be traded again. Theory suggests that cointegration reduces number of pairs selected in contrast to the DM, due to its binomial nature. Testing cointegration on a same set of pairs as an additional constraint will serve either as an improvement or as a downgrade allowing for a robust evaluation between the selection methods.

(16)

16 𝑧𝑡 = 𝛼𝑧𝑡−1+ 𝜐𝑡 (9)

where, 𝑧𝑡 are time series and 𝜐𝑡 is an error term. This implies that if |𝛼| = 1 the process is

non-stationary. In order to account for autocorrelation which is hidden in an error term it is required to generalize AR(1) process to AR(p), which is defined as:

𝑧𝑡 = a𝑧𝑡−1+ 𝛽1∆𝑧𝑡−1+ ⋯ + 𝛽𝑝∆𝑧𝑡−𝑝−1+ 𝜐𝑡 (10)

It is common practice to select different values for p and choose one that provides smallest AIC or BIC. Finally, by substituting 𝛼 − 1 = 𝛾 and subtracting from both sides 𝑧𝑡− 1 in equation (10)

gives,

∆𝜀𝑡−1= γ𝜀𝑡−1+ 𝛽1∆𝜀𝑡−1+ ⋯ + 𝛽𝑝∆𝜀𝑡−𝑝−1+ 𝜐𝑡 (11)

The 𝐻0: the residuals are not stationary, 𝛾 = 0, is now tested. The test statistics is defined as:

𝐷𝐹𝜏 = 𝑆𝐸(𝛾̂)𝛾̂ (12) If the 𝐻0 is rejected, the test concludes that time series are cointegrated. Eagle and Granger

(1987)

F. Robustness check

In order to determine how outcomes of the analysis are impacted by the data manipulation, robustness check is set up. The results of the study are most sensitive to the pairs selection procedure. The issue relates to both pairs selection methods: SSD and Cointegration. Two pairs that have similar SSD score or are cointegrated in most of the cases yield different results in terms of overall profitability. The difference can be explained by the fact that the selection procedures heavily rely on relative price/return movements of the stock. As a result, other important factors like size, sensitivity to the market, industry specific characteristics are omitted. For example, googl&goog3 and foxa&fox have similar SSD values, but are companies from

different industries and are influenced by the different factors. Despite the fact, that those pairs most likely will show different performance in terms of returns, the trends from adjusting key determinants in the strategy rules should persist. For example, if increase in a period that is chosen for determining “stable” relationship between pairs improves overall performance of both pairs, then it can be considered as a robust measure. Thus, the key to the robustness in pairs trading lies in the use of multiple pairs in different combination. Besides the previously

(17)

17 mentioned industry split which allows to evaluate performance of the strategy per industry. The four sets of portfolios are created and tested. First set of portfolios will consist out of one pair per industry that showed best performance based on the selection method. Seconds set of portfolios will contain top five pairs per industry. Third set will consist of top twenty pairs regardless their industry. Finally, the last fourth set will have one portfolio combining top two pairs in each industry.

G. Rolling time window

The following figure illustrates decision process for opening and closing positions.

“t-2” represents the first 60 days of the back testing period which are skipped in order to get sufficient information for the further evaluation. Relationships between pairs are calculated on 30, 40, 50 and 60 days basis in order to study the effect of a longer information gathering period and denoted as “t-1”. It is expected that the longer period should result in a more accurate model for capturing relationships. Cointegration acts as a constraint that blocks trading when pairs are not cointegrated. At the period “t” current stock prices are compared to their expected values from “t-1”. Whenever an anomaly in pricing would appear, pairs will be traded with an expectation that an original relationship would prevail and prices will correct themselves. The time window rolls over for a period of 10 years. At the last date of back testing period all open positions are closed regardless of the signal, which may result in a systematic loss during the last trading day for multiple back tests.

H. Transaction costs

Algorithmic trading has an advantage of being able to execute much more trades than a human counterparty. However, this advantage is questionable since it is heavily dependent on the transaction costs. Do et al (2012) explicitly states that after accounting for transaction costs, DM pairs trading strategy becomes unprofitable after year 2002. In addition to the transaction costs, slippage costs should be accounted for. It is expected that a number of automated trading software’s are operating in the market and they are triggered by the similar thresholds, resulting in multiple simultaneous orders that create a discrepancy between expected and actual price at which trade is executed.

t - 2 t – 1 (30,40,50,60 days) t

(18)

18 Do et al (2010) proposes 28 basis points as an appropriate measure of transaction costs, however, the researchers do not agree on a specific value that should be used. Gatev et al (2006) in his research used 162 basis points as a value for the transaction costs. According Do et al (2012) the transaction costs have tendency to decrease due to automatization of the process and higher liquidity for stocks. For this study transaction costs are set up at 0.15% (15 basis points) which is in line with Bogomolov et al (2010) and slippage is set up as a 0.05% (5 basis points), resulting in total of 0.2% per trade. (20 basis points)

I. Return metrics

Despite the fact that the calculation of the returns in pairs trading strategy seems no different from other fields of finance it is conceptually more complex. It is crucial to keep in mind that assumption of zero sum investment, where one asset is sold in order to finance the purchase of the other asset, is made. Assumption simplifies computation of returns but implies that any loss or profit is potentially infinite. (Bogomolov et al, 2010) This, of course, is not the case in the real life and should be kept in mind.

The daily returns for a price series “a”, on a day “t” are defined as:

𝑟𝑎,𝑡 = 𝑎𝑡 − 𝑎𝑡−1

𝑎𝑡−1 (13a)

Following equation (13) returns are annualized by the following equation:

𝑟𝑎 = (1 + 𝑟𝑡)250− 1 (13b)

where, 250 corresponds to a number of trading days in a year and 𝑟𝑡 to a daily return.

Standard deviation is calculated as follows:

𝜎𝑟,𝑡 = √𝑁1∑𝑁 (𝑟𝑡− 𝑟̅)2

𝑡=1 (14a)

In the similar matter standard deviation is annualized as follows:

𝜎𝑎 = 𝜎𝑡∗ √250 (14b) Most of the financial papers use Sharpe ratio as a risk adjusted measure of investment returns. The ratio was introduced by William Sharpe (1994) and it accounts for the risk free rate as well as the volatility providing fair comparison in relation to the returns. The Sharpe ratio is used in order to account for risk and is defined as follows:

𝑆 = 𝑟̅̅̅−𝑟𝑎 𝑓

(19)

19 Despite wide use Eling (2008) critisizes Sharpe ratio due to the fact that the return series are not normally distributed, which implies that Sharpe ratio overestimates risk adjusted performance. Rad et al (2006) sugests using Maximum Drawdown as an alternative measure of risk, which is defined as:

(20)

20

4. Results

The results section is organized in the following matter. First, results of the SSD analysis on potential pairs for trading are presented. Next, four portfolio sets are described. Each set goes through the main findings and summarizes overall conclusions that were made from the performed tests. Due to the large amount of information not all of the used metrics are presented in the report, for in depth analysis of the trades please refer to the Appendix 4.

A. Pairs analysis and selection

Table 1 reports number of stocks and corresponding metrics from SSD analysis per industry level. Consumer Discretionary has the biggest number of stocks and as a result the highest number of possible pairs that were checked. The smallest industry is Telecommunications services, which has only five stocks.

Table 1 Industry split and corresponding metrics from SSD analysis

Nr. of stocks Nr. of pairs average min max skew kurt

Consumer Discretionary 71 2485 1.75 0.07 3.67 0.66 -0.03 Consumer Staples 31 465 1.44 0.23 3.13 0.48 -0.44 Energy 31 465 1.5 0.19 3.83 0.7 0.09 Financials 58 1653 1.64 0.45 7.37 1.69 4.18 Health Care 55 1485 1.54 0.33 4.45 0.93 0.73 Industrials 58 1653 1.6 0.33 6.24 1.57 3.57 Information Technology 56 1540 1.56 0.003 5.25 1.26 2.28 Materials 23 253 1.49 0.33 3.39 0.62 -0.25 Real Estate 30 435 1.62 0.3 9.18 2.16 8.35 Telecommunications Services 5 10 1.51 0.25 3.98 0.76 0.21 Utilities 27 351 1.03 0.12 1.58 -0.44 -0.64 Excluded 55 - - - - Total 500 10795 - - - - -

(21)

21 have direct connection to the first set of portfolios where best pairs per industry are tested. Thus, the pairs with minimum SSD value are the ones that are going to be used in the first portfolio set. It is expected that the smallest SSD value will provide highest returns, while the pair with highest SSD will have opposite effect on the returns. The smallest SSD attributes to the goog and google tickers, which are originally the same company that has different listed share classes. As a result, share prices are almost identical in their movements. Financial industry has the highest minimum SSD value and is expected to underperform in relation to other industries. The expectations, however, are based on the assumption that the SSD is the only criteria that influences results of pairs trading strategy.

Table 2 shows the number of mean reverting processes, when stocks cross opening and closing thresholds for the best pair per industry. (First portfolio set) Each mean reverting process will be transformed in to a trade when pairs will be back tested. Thus, Table 2 shows number of trades and their percentage change when opening criteria is increased with 0.5 standard deviations. For example, best pair in information technology industry will have only 5 trades when opening threshold is set to 2.5 standard deviations from the mean and ADF constrain needs to be satisfied. Five trades in a period of 10 years is a small number, however, if those trades prove to be profitable it may be worth considering real life application since strategy is automated and does not involve any manual input. As it can be seen the number of opportunities for triggering execution of trades decreases as the distance between opening and closing criteria widens. The finding is in line with Hossein et al (2016) observation that the number of large shocks in the stock price behaviour is lower than the number of smaller shocks. Same conclusions follows from the assumption that the returns are normally distributed. The average decrease in the number of possible trading opportunities is approximately 45% per 0.5 standard deviation increase in the distance for the opening threshold. However, in some cases the decrease reaches 80%.

(22)

22

Table 2 Nr. of trading opportunities per industry and opening criteria

SSD Industry 1.5σ 2.5σ Change 0.003817 Information Technology SSD 377 209 70 20 45% 67% 71% 0.003817 Information Technology SSD & ADF 36 16 10 5 56% 38% 50% 0.066922 Consumer Discretionary SSD 177 107 68 42 40% 36% 38% 0.066922 Consumer Discretionary SSD & ADF 162 99 50 22 39% 49% 56% 0.116414 Utilities SSD 131 82 53 36 37% 35% 32% 0.116414 Utilities SSD & ADF 124 76 36 13 39% 53% 64% 0.193636 Energy SSD 106 76 53 31 28% 30% 42% 0.193636 Energy SSD & ADF 106 60 25 5 43% 58% 80% 0.226102 Consumer Staples SSD 124 82 52 36 34% 37% 31%

0.226102 Consumer Staples SSD & ADF 108 62 23 11 43% 63% 52% 0.249772 Telecommunications Services SSD 117 77 59 44 34% 23% 25% 0.249772 Telecommunications Services SSD & ADF 120 65 27 14 46% 58% 48% 0.302252 Real Estate SSD 135 83 54 33 39% 35% 39%

0.302252 Real Estate SSD &

ADF 135 66 26 9 51% 61% 65% 0.326766 Industrials SSD 105 81 53 34 23% 35% 36% 0.326766 Industrials SSD & ADF 93 61 23 11 34% 62% 52% 0.331494 Health Care SSD 100 70 50 33 30% 29% 34%

0.331494 Health Care SSD &

(23)

23 B. First set

Table 3 Annualized returns per industry (First set)

Without transaction costs With transaction costs

Opening criteria 1 1.5 2 2.5 1 1.5 2 2.5 Method DM Consumer Discretionary 0.004 0.001 0.011 0.013 -0.059 -0.037 -0.014 -0.002 Consumer Staples -0.017 -0.004 -0.020 -0.022 -0.061 -0.033 -0.038 -0.035 Energy 0.042 0.033 0.029 0.011 0.002 0.005 0.010 0.000 Financials -0.020 -0.042 -0.048 -0.013 -0.063 -0.070 -0.067 -0.024 Health Care 0.000 0.020 0.018 -0.004 -0.036 -0.006 0.000 -0.016 Industrials -0.045 -0.049 -0.042 -0.074 -0.081 -0.077 -0.061 -0.086 Information Technology 0.005 0.006 0.004 0.006 -0.124 -0.068 -0.021 -0.002 Materials 0.032 0.037 0.024 0.019 -0.015 0.007 0.005 0.008 Real Estate 0.034 0.020 0.015 0.024 -0.016 -0.010 -0.005 0.012 Telecommunica tions Services 0.013 0.006 0.011 0.018 -0.029 -0.021 -0.011 0.002 Utilities 0.014 -0.009 -0.001 -0.023 -0.033 -0.038 -0.020 -0.036 DM + ADF Consumer Discretionary -0.008 -0.004 0.006 0.005 -0.065 -0.040 -0.012 -0.003 Consumer Staples -0.010 -0.015 0.003 -0.003 -0.049 -0.037 -0.005 -0.007 Energy 0.011 -0.002 -0.011 0.007 -0.027 -0.023 -0.020 0.005 Financials -0.033 -0.042 -0.019 -0.006 -0.077 -0.065 -0.029 -0.009 Health Care -0.003 0.012 -0.001 -0.004 -0.038 -0.013 -0.012 -0.008 Industrials -0.023 -0.023 -0.001 0.005 -0.056 -0.045 -0.010 0.001 Information Technology 0.001 0.003 0.002 0.001 -0.012 -0.003 -0.001 -0.001 Materials -0.007 0.017 -0.001 0.009 -0.049 -0.009 -0.013 0.006 Real Estate 0.018 0.005 0.001 -0.005 -0.031 -0.019 -0.009 -0.008 Telecommunica tions Services 0.006 0.008 -0.002 0.004 -0.037 -0.015 -0.012 -0.001 Utilities -0.019 -0.005 -0.003 -0.001 -0.062 -0.032 -0.016 -0.006

In the Table 3 Annualized returns for the best pairs per industry are presented. The back testing period contains 2769 trading days starting at 1st January 2006 and ending at 30th December 2016.

(24)

24 higher the difference between opening and closing rules the more profitable pair becomes. This can be explained by the fact that the small price movements are not enough to cover transaction costs and as a result drag overall returns from the pairs trading down. Wider spread between opening and closing criteria filters out all of the small movements that became negative due to the transaction costs.

After implementing ADF constraint returns from different industries became more concentrated around the 0, especially in case of the higher opening thresholds. Industries that performed quite poorly based on the DM method gained, while industries which performed well lost some of their profits. It can be seen that ADF constraint showed more stable performance, which is in line with findings of Huck (2015) and, Bruno, Caldeira and Guilherme (2014). Industrials pair, which showed worst result in the DM only method, without including the transaction costs, showed positive returns after ADF constraint implementation. The periods of non-normal behaviour were filtered out by the ADF test which improved overall performance for this particular pair.

When transaction costs are taken in to account, similarly as in the case without the transaction costs, ADF constrain narrows distribution of the final returns for a selected period. The effect of the changes in opening and closing criteria becomes clear and behaves in the same matter as in the case of DM. Figure 3 shows effect of opening criteria change on annualized returns per industry.

Figure 2 Annualized returns of DM + ADF with transaction costs (First set)

-0.090 -0.080 -0.070 -0.060 -0.050 -0.040 -0.030 -0.020 -0.010 0.000 0.010

1

1.5

2

2.5

(25)

25 It was expected that the Financial sector would show worst results in terms of annualized returns since it had highest SSD, however this is not the case. From the results it can be concluded that SSD is not the only factor that determines profitability of the pairs.

Key results of the first set:

1. Only four out of eleven industries showed positive annualized returns after accounting for the transaction costs with DM and three with DM + ADF.

2. DM + ADF showed stable performance with the biggest annualized loss of -0.01% while DM had -0.09%.

3. Opening threshold influences number of trading possibilities and profitability of the strategy when transaction costs are taken in to account.

4. SSD value is not directly translated in to profitability of the pair.

C. Second set

The purpose of the second set is to confirm whether particular industry has higher returns in relation to other. Moreover, most of the industries had small difference between smallest and the following SSD values. Thus, the second set serves as a robustness check for pairs selection.

Top five pairs per industry have the same dynamics as top one pair in the first test set. Introduction of the transaction costs highlights importance of opening and closing criteria. The ADF constraint narrows the distribution of the returns. The seconds set of portfolios showed overall higher returns than the first set (+0.0579% highest), without taking in to account the transaction costs. After introduction of the transaction costs returns showed negative dynamics in relation to the first set. The DM did not show any positive annualized returns per industry (-0.007% highest) and DM + ADF had only one non-negative return in Telecommunication services industry. (0.0081%) In relation to the first set of pairs returns decreased. Corresponding returns table can be seen in the Appendix 1.

Key results of the second set:

1. Increasing the number of traded pairs should be done with caution, since even small increase in SSD values may have large impact on overall profitability.

(26)

26 3. There is no evidence that particular industry shows higher than average returns in the first and the second sets. However, Financial and Industrial industries showed below average results in all tests so far.

D. Third set

Aim of the third set is to test whether SSD is the only criteria for finding profitable pairs. For this reason 20 pairs with smallest SSD were selected and traded. Utilities sub group had lowest SSD overall, resulting in 18 pairs from Utilities making into the top 20 portfolio. Table 4 shows Annualized returns for two opening thresholds and corresponding return metrics.

Table 4 Annualized returns and corresponding return metrics

With transaction costs and opening threshold 2 Return Sharpe Ratio Max Drawdown Total Trades Positive / Total Trades

Mean Median Std Max Min DM -0.384 -0.902 0.997 899 0.43 -0.005 -0.004 0.05 0.26 -0.30 DM +

ADF -0.306 -1.361 0.983 596 0.39 -0.006 -0.006 0.03 0.10 -0.21

Without transaction costs and opening threshold 2 Return Sharpe Ratio Max Drawdown Total Trades Positive / Total Trades

Mean Median Std Max Min DM -0.041 -0.096 0.779 899 0.52 0.001 0.000 0.05 0.26 -0.28 DM +

ADF -0.099 -0.451 0.757 596 0.48 -0.001 -0.001 0.03 0.11 -0.21

With transaction costs and opening threshold 2.5 Return Sharpe Ratio Max Drawdown Total Trades Positive / Total Trades

Mean Median Std Max Min DM -0.271 -0.775 0.976 556 0.44 -0.005 -0.004 0.05 0.22 -0.20 DM +

ADF -0.111 -0.834 0.730 252 0.39 -0.005 -0.006 0.03 0.13 -0.15

Without transaction costs and opening threshold 2.5 Return Sharpe Ratio Max Drawdown Total Trades Positive / Total Trades

Mean Median Std Max Min DM -0.058 -0.165 0.705 556 0.51 0.000 0.000 0.05 0.23 -0.19 DM +

ADF -0.018 -0.139 0.320 252 0.47 0.000 -0.001 0.03 0.13 -0.14

(27)

27 that there were equal number of positive and negative trades but loses were higher than the gains. Figure 4 provides closer look on the returns from trading with DM + ADF method.

Figure 3 DM + ADF including transaction costs Performance chart

As it can be seen the portfolio lost nearly 80% of its value in a duration of 10 years. First and Second trading sets showed that SSD value is not directly transferred to profitability, which is in line with findings of Krauss (2015). Portfolio consisting out of 20 pairs with smallest SSD value confirms this observation. Moreover, from the first two test it was found that the Utilities sub group is one of the worst performing industries, despite the lowest SSD.

Key results of the third set:

1. The SSD value is nor directly transferred in to profitability of the pair.

(28)

28 E. Fourth set

The last portfolio that is tested consists out of 22 pairs, which are combination of two pairs per industry with the smallest SSD values. The idea behind this portfolio lies in diversification. Moreover, it was established that besides the opening criteria, length of a period for determining “normal” relationships between pairs of stocks is important. Portfolio consisting out of different industries shows how changes in this period influences results of pairs trading. Finally, since portfolio is big enough it is possible to extend opening criteria to four standard deviation and have enough trades for inference. Table 5 shows results of trading fourth portfolio including the transaction costs.

Table 5 Annualized returns and corresponding metrics for fourth portfolio

Period for determining “normal” relationship: 30 days, opening threshold 3 Return Sharpe Ratio Max Drawdown Total Trades Positive / Total Trades

Mean Median Std Max Min DM -0.080 -0.262 0.825 374 0.43 -0.001 -0.004 0.05 0.37 -0.28 DM + ADF -0.029 -0.295 0.331 89 0.38 -0.003 -0.005 0.03 0.12 -0.18

Period for determining “normal” relationship: 40 days, opening threshold 3 Return Sharpe Ratio Max Drawdown Total Trades Positive / Total Trades

Mean Median Std Max Min DM -0.069 -0.188 0.891 368 0.45 0.000 -0.003 0.06 0.34 -0.43 DM + ADF 0.001 0.015 0.181 80 0.36 0.000 -0.004 0.03 0.13 -0.05

Period for determining “normal” relationship: 50 days, opening threshold 3 Return Sharpe Ratio Max Drawdown Total Trades Positive / Total Trades

Mean Median Std Max Min DM 0.056 0.137 0.714 350 0.46 0.004 -0.005 0.07 0.58 -0.22 DM + ADF 0.003 0.040 0.230 75 0.37 0.001 -0.004 0.03 0.13 -0.05

Period for determining “normal” relationship: 30 days, opening threshold 3 Return Sharpe Ratio Max Drawdown Total Trades Positive / Total Trades

Mean Median Std Max Min DM -0.032 -0.092 0.795 308 0.44 0.001 -0.006 0.07 0.30 -0.27 DM + ADF -0.007 -0.142 0.158 59 0.41 -0.001 -0.003 0.02 0.06 -0.06

(29)

29 bigger the distance, the higher is the potential to make a profitable trade, however the number of possible trades is decreasing resulting in less possibilities to make. Those two forces cancel out the effect of each other, if that would not be the case traders could have set up thresholds as high as possible in order to secure profits from the strategy.

Figure 4 DM including transaction costs with increased number of thresholds and different "relationship" determining periods

Due to this fact, when threshold is increased from 1 to 1.5 increase in profitability is much larger than when the trashed is increased from 2.5 to 3.

Second observation that follows from Figure 3, as well as the table 5, is that increase in a number of days that is used for determining “normal” relationship between pairs has positive effect on the profitability. Longer period allows to capture and model more accurate relationship between a pair of stocks. Thus, reacting to the deviations in more accurate manner.

DM + ADF shows stable performance, with a smaller spread between losses and gains, however, at the thresholds 3 to 4 DM shows higher annualized returns. The DM shows annualized return of 0.068% with 60 days as determining period and 4 standard deviations as an opening criteria. DM + ADF with all else hold constant has only 0.001% annualized return, which is much smaller.

-0.900 -0.800 -0.700 -0.600 -0.500 -0.400 -0.300 -0.200 -0.100 0.000 0.100 0.200

1&0.5 1.5&0.5 2&0.5 2.5&0.5 3&0.5 3.5&0.5 4&0.5

DM including transaction cost

(30)

30 Possible reason for underperformance is number of executed trades, which in case of DM + ADF is only 4 and 59 for the DM. Figures 6 and 7 show detailed returns series.

Figure 5 DM + ADF Performance chart including transaction costs, 60 days, threshold 4

(31)

31 Despite the better results on the higher thresholds DM is more risky than the DM + ADF. Table 6 shows corresponding metrics to Figures 4 and 5.

Table 6 Annualized returns and corresponding metrics, threshold 4, period 60 days

Return Sharpe Ratio Max Drawdown Total Trades Positive /

Total Trades Mean Median Std Max Min DM 0.068 0.401 0.244 59 0.53 0.015 0.004 0.07 0.28 -0.12 DM + ADF 0.001 0.142 0.019 4 0.75 0.003 0.008 0.02 0.02 -0.02

It can be seen that DM has higher maximum drawdown, higher biggest loss, lower percentage of successful trades, higher standard deviation of returns and lower median return. Despite underperformance in those metrics DM has higher Sharpe ration, which suggest that the trade-off between risk and reward is still better under those circumstances.

Key results from the fourth set:

1. Increase in the distance between opening and closing thresholds exhibits diminishing effect due to the decreasing number of trading opportunities.

2. The increase in the period that is used for establishing base relationship between a pair positively influences returns from the trading.

3. DM + ADF outperforms DM only method when opening criteria ranges from 1 till 2.5. When threshold is set to 3 and more, DM shows better performance.

4. The higher returns from DM come with an increase in risk profile.

F. Market neutrality

(32)

32 companies and their beta. However, if more constrains are imposed in pairs selection procedure, the chance of reducing market exposure increases. For example, additional requirement can be similar capitalisation of the companies or/and similar growth prospects, market share, etc. Ultimately, one can directly address betas when looking for pairs.

The table below shows correlation coefficients and, r squared and p value of the linear regression where returns of S&P500 serve as an explanatory variable for the returns from the strategy. The presented metrics correspond to the fourth set of portfolios, DM with transaction costs.

Table 7 Market neutrality metrics for Fourth set, DM including transaction costs

1σ 1.5σ 2σ 2.5σ 3σ 3.5σ 4σ Mean 60 Cor 0.000 0.001 0.012 0.019 0.014 0.054 0.003 R2 0.000 0.000 0.000 0.000 0.000 0.003 0.000 P value 0.988 0.960 0.539 0.312 0.465 0.004 0.882 Mean 50 Cor 0.019 0.019 0.004 0.054 0.037 0.025 0.004 R2 0.000 0.000 0.000 0.003 0.001 0.001 0.000 P value 0.330 0.314 0.834 0.005 0.050 0.189 0.847 Mean 40 Cor 0.004 0.022 0.029 0.021 0.015 0.004 0.047 R2 0.000 0.000 0.001 0.000 0.000 0.000 0.002 P value 0.846 0.246 0.122 0.277 0.423 0.816 0.013 Mean 30 Cor 0.007 0.004 0.019 0.053 0.043 0.013 0.019 R2 0.000 0.000 0.000 0.003 0.002 0.000 0.000 P value 0.729 0.844 0.327 0.005 0.025 0.488 0.310

The Table 7 shows that returns of the strategy and S&P500 are barely correlated. However, some of the regressions, despite low explanatory power, showed signs of statistical significance. This trend persist through all of the tests, but does not show any clear pattern. Figure 8 plots returns from Table 7, which are marked in red colour to see what is happening behind the numbers.

(33)

33

Figure 7 Returns from the strategy and SNP500 index (Fourth set, DM including trans. cost, mean 50, opening 2.5std)

Obvious anomaly that catches eye in the Figure 8, are abnormal returns in a period of global financial crisis. The trend persists in multiple test and can be seen clearly in the Appendix. The finding is in line with research paper of Sandoval and Franca (2011). The reason for abnormal return lies in the increased correlation between stocks and increased number of shocks that those stocks experience, creating great opportunities for earning excess returns.

(34)

34

5. Conclusions

The aim of this research is dual: to develop a tool for simulating pairs trading strategy and to study the impact of changes in key determinants on the overall profitability of the pairs trading strategy in US equity market starting from 1st January 2006 till 30th December 2016. This way

unfamiliar to pairs trading strategy readers would gain general understanding of the process behind pairs trading and may continue the study using provided tools.

While the main emphasis lies on the comparison between sum of squared distances and cointegration pairs selection procedures, influence of changes in opening thresholds, periods for determining “stable” relationship between pairs, transaction costs and industries are addressed.

Before accounting for the transaction costs he annualized returns, using DM method, range for the first set from -0.07% to 0.02% and the second set from -0.14% to 0.06% with an approximate 50/50 split between positive and negative outcomes for different pairs. The third set showed worst performance with returns ranging from -0.21% to -0.06%. The portfolio in the fourth set has on average 0.10% annualized return ranging from -0.14% to 0.21%, depending on the chosen trading rules. All four sets have low standard deviation of the returns, ranging from 0.01 to 0.07, and acceptable Sharpe ratios ranging from -0.2 to 0.53. It follows that despite similar SSD score pairs show different performance. Thus, closer look in to pairs selection procedure is required.

The ADF constraint narrows the distribution of the returns for the first set from -0.006% to 0.007%, second set from -0.03% to 0.02%, third set from -0.2 to -0.06 and forth set from -0.14 to 0.02, without taking in to account the transaction costs. Standard deviation does not exceed 0.04 for all of the performed tests and Sharpe ratio is, on average, smaller than in the case of the DM. ADF test, as a pairs selection criteria, shows stable performance than the DM due to it’s binomial nature. However, stability comes at a cost and reduces potential gains.

(35)

35 careful balance is required in order not to exclude profitable opportunities and cover the transaction costs.

After accounting for the transaction costs almost all of the first three tested sets become unprofitable. However, the difference between DM and ADF methods becomes much more obvious. In the first set the lowest annualized return for DM is 0.08%, while DM + ADF has -0.01%. In the second set the lowest return form DM is -0.2%, while form DM + ADF has -0.05%. The same trend persists through the third and fourth testing sets. The only exception, when DM outperforms DM + ADF is in the fourth set, with the opening threshold set above 3 standard deviations. A possible explanation for this could lie within the fact that with those opening rules DM + ADF has less than 20 trades, while the DM has approximately 130, which allows to get higher returns.

The third portfolio is based on only 1 criteria SSD, while forth has an additional factor of “Industry” incorporated next to the SSD score. The difference between performances of those two portfolios reveals that the SSD on a standalone basis heavily underperforms (80% of portfolio value lost). Therefore, ideal process for pairs selection should involve both quantitative and qualitative factors.

The fourth portfolio examines the effect of changes in period for determining “normal” relationships between pairs. From the multiple tests it follows that the increase of the period from 30 to 40 to 50 to 60 days has a positive correlation on the overall profitability. The longest period of 60 days showed the best results.

Pairs trading does not require to be market neutral, but returns from the strategy have low correlation with market returns. The reason lies in the strategy itself, more particular in its construction. Positions are open for a short amount of time, with a specific expectation, moreover, pairs selection procedure in most of the cases helps to reduce market exposure.

(36)

36

References

Avellaneda, M., and Jeong-Hyun, L., 2010. Statistical arbitrage in the US equities market.

Journal of Quantitative Finance 10, 761-782.

Alexander, C., Giblin, I., and Weddington, W., 2002. Cointegration and asset allocation: a new active hedge fund strategy. Journal of Financial Risk and Financial Risk Management 16, 65-89.

Andrade, Sandro C., Pietro, V., and Seasholes, Mark S., 2005. Understanding the Profitability of Pairs Trading. Working Paper.

Bogomolov, T., 2010. Pairs trading in the land down under. Finance and Corporate Governance Conference., working paper, University of South Australia.

Boehmer, E., Fong, Kingsley Y. L., and Wu, J., 2015. International Evidence on Algorithmic Trading., working paper, San Diego Meeting Paper.

Caldas B. B., Caldeira F. J., and Guilherme V. M., 2014. Is Pairs Trading Performance Sensitive to the Methodologies?: A Comparison., working paper.

Caldeira, J. F., and Moura, G.V., 2013 Selection of a Portfolio of Pairs Based on Cointegration: The Brazilian Case., working paper, Federal University of Rio Grande do Sul.

Conrad, J., and G. Kaul, 1989. Mean Reversion in Short-horizon Expected Returns. Review of

Financial Studies 2, 225–240.

Charoenrook, A., Daouk, H., 2005. A study of market-wide short-selling restrictions., working paper, Vanderbilt University.

Do, B., and Faff, R., 2010. Does Simple Pairs Trading Still Work? Financial Analyst Journal 66, 1-13.

Do, B., and Faff, R., 2012. Are Pairs Trading Profits Robust to Trading Costs? Journal of Financial

Research 35, 261-287.

Drakos, S., 2016. Statistical Arbitrage in S&P500. Journal of Mathematical Finance 6, 166-177.

(37)

37 Eling, M., 2008. Does the measure matter in the mutual fund industry? Financial Analysts

Journal 64, 1–13.

Engle, R. F., and Granger, C. W. J., 1987. Co-Integration and error correction: Representation, estimation, and testing. Journal of Econometrica 55, 251-276.

Elliott, R. J., Van Der Hoek, J., and Malcolm, W. P., 2005. Pairs trading. Journal of Quantitative

Finance 5, 271-276.

Gatev, E., Goetzmann, W. N., and Rouwenhorst, G. K., 2006. Pairs Trading: Performance of a Relative-Value Arbitrage Rule. Review of Financial Studies 19, 797-827.

Huck, N., and Afawubo, K., 2015. Pairs trading and selection methods: is cointegration superior? Journal of Applied Economics 47, 599-613.

Huck, N., 2015. Pairs trading: does volatility timing matter? Journal of Applied Economics 47, 6239-6256.

Hasbrouck, J., 2009. Trading costs and returns for U.S. equities: estimating effective costs from daily data. Journal of Finance 64, 1445–1477.

Rad, H., Low, R. K. Y., and Faff. R., 2016. The profitability of pairs trading strategies: distance, cointegration and copula methods. Journal of Quantitative Finance 16 , 1541-1558.

Jacobs, H., and Weber, M., 2015. On the Determinants of Pairs Trading Profitability. Journal of

Financial Markets 23, 1-43.

Krauss, C., 2017. STATISTICAL ARBITRAGE PAIRS TRADING STRATEGIES: REVIEW AND OUTLOOK. Journal of Economic Surveys 31, 513-545.

Kristoufek, L., and Vosvrda, M., 2014. Measuring capital market efficiency: Long-term memory, fractal dimension and approximate entropy. The European Physical Journal B 87, 1-9.

Yan-Xia, L., McCrae, M., and Gulati, C., 2006. LOSS PROTECTION IN PAIRS TRADING THROUGH MINIMUM PROFIT BOUNDS: A COINTEGRATION APPROACH. Journal of Applied

Mathematics & Decision Sciences 2006, 1-14.

Lamont, A., Thaler, R. H., 2003. Anomalies The Law of One Price in Financial Markets. Journal of

(38)

38 Lucas, A. 1997. Strategic and Tactical Asset Allocation and the Effect of Long-Run Equilibrium

Relations., working paper, Free University Amsterdam.

Lederman, J., and Klein. A., 1996. Market Neutral: Long/Short Strategies for Every Market Environment.

Lim, K. P., Brooks, R. D., and Kim. J., 2008. Financial crisis and stock market efficiency: Empirical evidence from Asian countries. International Review of Financial Analysis 17, 571 - 591.

Mayordomo, S., Pena, J. I., and Romo, J., 2011. A New Test of Statistical Arbitrage with Application of Credit Derivatives Market., working paper.

Modigliani, F., and Modigliani, L., 1997. Risk-adjusted performance. Journal of Portfolio

Management 23, 45-54.

Perlin, M.S., 2009. Evaluation of pairs-trading strategy at the Brazilian financial market. Journal

of Derivatives & Hedge Funds 15, 122– 136.

Patton, A. J., 2009. Are "Market Neutral" Hedge Funds Really Market Neutral? Review of

Financial Studies 22, 2495-2530.

Pontiff, J., 2006. Costly arbitrage and the myth of idiosyncratic risk. Journal of Accounting and

Economics 42, 35-52.

Engle, R. F., and Granger, C. W. J., 1987. Co-Integration and Error Correction: Representation, Estimation, and Testing. Journal of Econometrica 55, 251-276.

Sharpe, W. F., 1994. The Sharpe ratio. Journal of portfolio management 21, 49-58.

Schuhmacher, F., and Eling, M., 2011. Sufficient conditions for expected utility to imply drawdown based performance rankings. Journal of Banking and Finance 35, 2311– 2318.

Sandoval, L., and Franca I., 2011. Correlation of financial markets in times of crisis., working paper, Instituto de Ensino e Pesquisa.

(39)

39

Appendix 1 Second set Annualized return table

(40)

40

Appendix 2 HTML pages of tests and data used in the study

https://www.dropbox.com/sh/0mi4hkawtspgpgp/AADHOCsH8j55Y490RCkGiNXAa?dl=0 The link contains following:

HTML folder allows to see all performed test in details

Note: the test names are in Abbreviations: FS – First Set, SS – Second Set, TS – Third Set, FOS – Fourth Set. DM – Distance Method, DMADF – Distance Method with ADF Constraint, NT – No Transaction costs, T – Transaction costs (included). Download the folder and open html file.

Overview excel file contains all performed test results in excel format Pairs folder contains all pairs that were used in the study

RMD folder contain code for reproducing results of the study for each set SSD folder contains results of SSD analysis

(41)

Appendix 3 How to use the code

The code consists of multiple functions that needs to be loaded in R. This can be done through code_thesis.Rmd file.

From the code_thesis.Rmd file functions need to be loaded into the global environment of R. This can be done by following simple steps illustrated in the figure bellow:

Step 1: code_thesis is loaded into R.

1

(42)

42 Step 2: by pressing the green play sign, the function is loaded into the global environment.

Some of the functions have Note: #Changeme, the note means that variables need to be changed within the code. It is suggested to check the code trough text finding procedure (ctr+F) in order to easily spot all of the places that require individual adjustments. Next to the #Change note, small explanation of the variable that is required to be changed can be found.

(43)

43 Step 3: opening and closing criteria needs to be specified.

 1st line of the code loads SNP500 market returns to use as a reference for determining market neutrality

 2nd line of the code specifies opening threshold

 3rd line of the code specifies closing threshold

 4th line of the code creates a vector that stores returns from the strategy

Step 4: Selecting pair and remaining variables for back testing. Existing pairs can be used or new pairs can be created.  1st line of the code loads historical stock prices in the following format:

3

(44)

44  2nd line of the code gives general name “data” to the selected pair

 3rd line of the code uses function “runbacktest” on “data” (which is new name for historical stock prices of a selected pair). 50 is number of

days that is used for determining normal relationship (can be changed to any number). summary_trading = TRUE creates a graphs and return metrics, adf = F (for not using adf constraint), adf = TRUE (for using adf constraint)

 4th line of the code saves return vector in return list

 5th line of the code uses function market_neutr to calculate metrics of market neutrality

 6th line deletes the return list

(45)

45

Process behind the code

1. The historical stock price data.

2. Mean and Std which are based on the previous 50 days (relationship determining window).

3. Z score shows deviation of todays stock price ratio in relation to Mean and Std determined in previous 50 days. When the Z score reaches pre setup threshold (+- 2.5) signal is generated.

1

2

3 4 5

(46)

46 4. Signals are: 0 = do nothing; 1 = long 1 share A, short N shares B; -1 = long N shares B, short 1 share A. When Z score is in-between -2.5 and 2.5 the signal is 0. If Z score reaches this threshold the corresponding new signal is generated and maintained until Z score returns to -0.5 and 0.5 boundaries. This will trigger closing procedure and calculation of returns from the trades.

5. Net-zero investment.

6. Following day, price ratio returns to original relationship (within +- 0.5) resulting in a small Z score, which triggers closing of the deal. Returns are calculated for long/short position.

Referenties

GERELATEERDE DOCUMENTEN

For example, in Chapter 2 we show that overexpression of Hsp70 family members in different cell lines can have a different effect on SOD1 aggregation and this could be

conducting pulmonary rehabilitation and were likely encouraging ongoing exercise maintenance, but nothing was stated regarding specific training of health-care providers

Door er geen aandacht aan te besteden vallen zij echter toch onder de nieuwkomers binnen het fantasyveld die fantasyboeken goed vinden op basis van inherente

Met betrekking tot het toekennen van het beroep op noodweerexces door de Turkse rechter verwijst het EHRM naar artikel 18 van de Basic Principles waarin vastgesteld wordt

Maar het antwoord dat het meeste voor komt, is dat spiritualiteit iets is waar ze altijd mee bezig zijn en niet iets is ‘wat je er extra bij doet’.. Evelien zegt bijvoorbeeld dat

The current study contributes to alliance network theory by answering the question whether the performance of firms, who participate in alliance networks, is influenced by the

Here, the returns of Stellar and the lagged HE sentiment scores (for a number of different variants) produce relatively high correlations (as high as 0.09). The set of variables

2 Actively managed ETFs are not included in our sample.. The expense ratio consists of management fees, marketing and distribution costs, and because its exact