Abstract
Pairstrading is a popular trading strategy that tries to take advantage of market inefficiencies in order to obtain profit. The idea is simple: find two stocks that move together and take long/short positions when they diverge abnormally, hoping that the prices will converge in the future. From the academic point of view of weak market efficiency theory, pairstrading strategy should not present positive performance, as, according to it, the actual price of a stock reflects its past trading data, including historical prices. This leaves us with a question: does pairstrading strategy present positive performance for the Brazilian market? The main objective of this research is to verify the performance and risk of pairstrading in the Brazilian financial market for different frequencies of the database: daily, weekly and monthly prices for the same time period. The main conclusion of this simulation is that pairstrading strategy was a profitable and marketneutral strategy at the Brazilian market. Such profitability was consistent over a region of the strategy's parameters. The best results were found for the highest frequency (daily), which is an intuitive result.
INTRODUCTION
The market efficiency theory has been tested by different types of research. Such a concept postulates, on its weak form, that the past trading information of a stock is reflected in its value, meaning that historical trading data have no potential for predicting future behaviour of an asset's prices. The main theoretical consequence of this concept is that no logical rules of trading based on historical data should have a significant positive excessive return over some benchmark portfolio.
In opposition to the market efficiency theory, several papers have shown that past information is able, to some extent, to explain future stock market returns. Such predictability can appear in different ways, including time anomalies (day of the weak effect^{1}) and correlation between the asset's returns and other variables.^{2} A more substantial review of the market efficiency subject can easily be found in the literature.^{3, 4}
A respectable amount of papers have tried to use quantitative tools in order to model the market and build trading rules. The basic idea of this type of research is to look for some kind of pattern in the historical stock price behaviour, and, using only historical information, take such a pattern into account for the creation of long and short trading positions.
One of the most popular approaches to model the market and infer logical rules is technical analysis.^{5} Such a technique is based on quantitative indicators (moving averages, among others) and also visual patterns (head and shoulders, triple top, and so on) in order to identify entry and exit points on the shortterm behaviour of stock prices. The popularisation of technical analysis lead to a number of tests, the objective of which was to verify whether such tools were profitable or not. It is worth stating that even though the majority of papers has shown that technical analysis is profitable, several problems can be addressed with such studies, including datasnooping problems, transaction costs and liquidity. All this incompleteness of the research makes technical analysis a subject to be studied further.^{6}
With the advent of computer power in the late 1990s, more sophisticated mathematical methods could be employed in the case of trading rules. One example is the use of the nearest neighbour (NN) algorithm in trading strategies.^{7, 8, 9, 10} The NN algorithm is a nonparametric method of modelling time series in which the main principle is that the series copies its own behaviour in a fractal way, that is, we find similar pieces of data from the past and use them as a benchmark to forecast the future observations. The main conclusion drawn from the results presented on the predictability potential of this method is that it is able to predict correct market direction for most of the forecasted financial observations. But it is important to state that the evidence was not strong in all studies.
For the case of trading strategies based on parametric models,^{11, 12} these referenced papers based the forecasts on the regimeswitching model, where the results indicated that the method can predict the financial time series researched in each case. Others types of strategies using quantitative formulations include timing the market with fundamentals or statistical models^{13, 14}and momentum strategies.^{15, 16} The results from these papers are also positive.
A popular strategy that gained a reputation in the early 1980s is the socalled pairstrading. This methodology was designed by a team of scientists from different areas (mathematics, computer sciences, physics, and so on), which were brought together by the Wall Street quant Nunzio Tartaglia. The main objective of this team was to use statistical methods to develop computerbased trading platforms, where the human subjectivity had no influence whatsoever in the decisionmaking process of buying or selling a particular stock. Such systems were quite successful for a period of time, but the performance was not consistent after a while, and the team was dismantled after a couple of periods of bad performance. More details about the origins of pairstrading can be found at Vidyamurthy^{17} and Gatev.^{18}
Basically, the central idea of pairstrading is to take advantage of market inefficiencies. The first step is to identify two stocks that move together and trade them every time the absolute distance between the price paths is above a particular threshold value. If the stocks, after the divergence, return to the historical behaviour of symmetry, then it is expected that the one with highest price will have a decrease in value and the one with the lowest price will have an increase. All long and short positions are taken according to this logic. The specific details about choosing pairs and defining the threshold value in pairstrading are given in the scope of this paper.
The main objective of this research is to investigate the profitability and risk of the pairstrading strategy for Brazilian stock market. This trading rule presented a positive performance in past studies,^{18, 19} and this is one of the motivations of this study, along with the fact that this type of research has not yet been applied to the Brazilian market. In order to reach the objective, data from three different frequencies (daily, weekly and monthly) are used, and all returns from the logical rules are compared against a naÃ¯ve strategy of buyandhold and also against a bootstrap method of random trading. The systematic risk and the filtered constant return (Jensen's Alpha) of such strategies are also part of the analysis.
This paper is organised as follows: the first part is related to the main guidelines of the methodology, including the way the pairs are formed, the logical rules of trading and performance assessment. Second, the results are presented and discussed, followed by some concluding remarks.
METHODOLOGY
The methodology of this research involves two points: (1) How to trigger a long/short position based on pairstrading strategy in each stock and (2) How to evaluate the performance of the trading signals. All the calculations for this paper were conducted at Matlab. All the functions used for execution and evaluation of the strategy are available at http://www.mathworks.com/matlabcentral/fileexchange/ (keywords: â€˜pairs tradingâ€™). The steps of each algorithm are covered as follows.
Pairs selection
In the pairsformation phase, the basic idea is to bring all assets' prices to a particular unit, and then search two stocks that move together. Quantitatively speaking, this can be carried out in many different ways. The approach used in this paper is the minimum squared distance rule, meaning that, for each stock, there will be a search for a corresponding pair that offers the minimum squared distance between the normalised price series.
The reason for the unit transformation is straightforward. The use of original prices (without normalisation) would be a problem for the case of minimum squared distance rule, as two stocks can move together yet have a highsquared distance between them. After the normalisation, all stocks are brought to the same standard unit and this permits a quantitatively fair formation of pairs.
The transformation employed is the normalisation of the price series based on its mean and standard deviation, equations (1).
The value of P_{ it }^{*} is the normalised price of asset i at time t, E(P_{ it }) is just the expectation of P_{ it }, in this case the average, and Ïƒ_{ i } is the standard deviation of the respective stock price. Both indexes were calculated within a particular moving window of the time series. With the use of equation (1), all prices are transformed to the same normalised unit, which will permit the use of the minimum squared distance rule.
The next step is to choose, for each stock, a pair that has minimum squared distance between the normalised prices. This is a simple search on the database, using only past information up to time t. The normalised price for the pair of asset i is now addressed as p_{ it }^{*}. After the pair of each stock is identified, the trading rule will create a trading signal every time the absolute distance between P_{ it }^{*} and p_{ it }^{*} is higher than d. The value of d is arbitrary, and it represents the filter for the creation of a trading signal. The value can neither be very high, otherwise only a few trading signal will be created, nor can it be too low, or the rule will be too flexible, and this will result in too many trades and, consequently, high value of transaction costs.
After a trading sign is created, the next step is to define the positions taken on the stocks. According to the pairstrading strategy, if the value of P_{ it }^{*}is higher (lower) than p_{ it }^{*}, then a short (long) position is kept for asset i and a long (short) position is made for the pair of asset i. Such a position is kept until the absolute difference between the normalised price is lower than d. This may sound counterintuitive, as, using continuous price behaviour, if one buys when the distance is d and sells it when the distance is again d, there is no profit. But remember that the prices were in discrete time, meaning that the buying price occurs when the distance is higher than d, and therefore the expected profit is positive. For the case of pairstrading at approximate continuous time (for example, 5â€‰min quotes), this can be easily adapted by setting a gap between the threshold for the buying operation and for the selling operation.
The main logic behind the expected profits of pairstrading strategy is if the correlated movement between the pairs continues in the future, then, when the distance between an asset and its pair is higher than a particular threshold value (d), there is a good possibility that such prices will converge in the future, and this can be explored for profit purposes. If the distance is positive, then the value of P_{ it }^{*}, according to the logic expressed earlier, probably will reduce in the future (short position for asset i), and the value of p_{ it }^{*} will probably increase (long position for the pair of i). The same logic is true for the cases where the distance is negative. The situations where pairstrading fails to achieve profit are an increase in the distance between P_{ it }^{*} and p_{ it }^{*}, where the market goes the opposite way of the expectation, and also a decrease (increase) on the price of the long (short) position.
As an example, Figure 1 shows the pairstrading strategy for weekly prices of asset TNLP4 and its pair, TNLP3.
In Figure 1, TNLP3 is the found pair of TNLP4 based on the minimum squared distance criteria. It is possible to see that both normalised prices have a similar behaviour. On the points that have a blue circle or red triangle the absolute difference in the normalised prices has crossed the value of d, meaning that a trade has taken place. The blue circles (red triangles) are the short (long) positions created. This happens every time the absolute distance is higher than 1 and the value of the analysed asset is higher (lower) than its pair. Every time the absolute difference uncrosses the value of d, the positions are closed. If the assets, after the opening of a position, move back to the historical relationship, then the one with the higher price should have a decrease in the prices and the one with the lower price should have an increase. As a short position was made for the first asset and a long position for the second, then, if both prices behave historically, a profit will arise from this trading case; this is the whole idea behind pairstrading â€“ making profits out of market corrections.
Assessing performance of the strategy
One of the aims of this study is to evaluate the performance of pairstrading strategy against a naÃ¯ve approach. For this purpose, two methods are employed here. The first is the computation of the excessive return of the strategy over a properly weighted portfolio, and the second is the use of bootstrap methods for evaluating the performance of the trading rule against the use of random pairs for each stock.
Calculation of strategy's returns
The calculation of the strategy total return is executed according to the following formula, equation (2):
where
 R _{ it } :

Real return of asset i on time t, calculated by ln(P_{ it }/P_{itâˆ’1}).
 I _{ it } ^{L&S} :

Dummy variable that takes value 1 if a long position is created for asset i, value âˆ’1 if a short position is created and 0 otherwise. When a long position is made at time t, this variable is addressed as I_{ it }^{L} and as I_{ it }^{S} for short positions.
 W _{ it } :

Weighting variable that controls for portfolio construction at time t. In this particular paper, the simulated portfolio is equal weight, meaning that each trading position will have the same weight at time t, that is, W_{ it }=1/(âˆ‘_{I=1}^{n}âˆ£I_{ it }^{L&S}âˆ£). Naturally, the sum of W_{ it } for all assets is equal to 1 or zero (no trading position at time t).
 Tc _{ it } :

Dummy variable that takes value 1 if a transaction is made for asset i on time t and zero otherwise. It is important to distinguish the values of I_{ it }^{L&S} (long and short positions) from Tc_{ it } (transaction dummy). The values of Tc_{ it } are derived from the vector I_{ it }^{L&S}, but they are not equal. For example, suppose a long position is created for asset i on time tâˆ’1 and also on time t, only. The vector of I_{ it }^{L} will have values of 1 to time tâˆ’1 and t, but the vector of Tc_{ it } has only value 1 for time tâˆ’1, as for t, the asset was already in the portfolio, and thus there is no need to buy it again. The same is true for short positions.
 C :

Transaction cost per operation (in percentage).
 T :

Number of observations on the whole trading period.
For equation (2), the basic idea is to calculate the returns from the strategy accounting for transaction costs. The first part of (1), âˆ‘_{t=1}^{T}âˆ‘_{i=1}^{n}R_{ it }I_{ it }^{L&S}W_{ it } calculates the total raw return of the strategy. Every time a long and short position is created for asset i, the raw return of the simulated portfolio on time t is âˆ‘_{i=1}^{n}R_{ it }I_{ it }^{L&S}W_{ it }, that is, the prospected returns multiplied by their corresponding weight in the portfolio. As t goes from 1 to T, it is necessary to sum such returns, which gives the final result for the first part of (1), âˆ‘_{t=1}^{T}âˆ‘_{i=1}^{n}R_{ it }I_{ it }^{L&S}W_{ it }.
The second part of equation (2) has the objective of accounting for transaction costs. For example, suppose that the trading cost of buying and selling stock is C, which is expressed as a percentage of the transaction price. If a stock is purchased at price P_{ B } and sold at price P_{ S }, then the real buying and selling prices, including transaction costs, are P_{ B }(1+C) and P_{ S }(1âˆ’C). Taking the logarithm return of the operation results in the formula R=ln(P_{ S }(1âˆ’C)/P_{ B }(1+C)). Using logarithm properties, the previous equation becomes R=ln(P_{ S }/P_{ B })+ln((1âˆ’C)/(1+C)). It is possible to see from this result that the return for this operation has two separate components: the logarithm return from the difference between the selling and buying prices, and the term ln((1âˆ’C)/(1+C)), which accounts for the transaction cost on the whole operation. This exemplified result basically states that the transaction cost for one operation (buy and sell) is ln((1âˆ’C)/(1+C)).
Returning to the analysis of the second part of equation (1), as ln((1âˆ’C)/(1+C)) is the transaction cost of one operation, logically the term (âˆ‘_{t=1}^{T}âˆ‘_{i=1}^{n}Tc_{ it }) is just the number of operations made by the trading strategy. Is important to note that as (1âˆ’C)/(1+C) is always less than one because C is always positive and higher than zero, then the value of ln((1âˆ’C)/(1+C)) is always negative, meaning that the transaction costs are subtracted from the strategy's returns, which is an intuitive result.
Evaluation of strategy's returns
In order to evaluate the performance of the strategy, it is necessary to compare it to a naÃ¯ve approach. If the strategy performs significantly better than an outofskill investor, then such a trading rule has value. This is the main idea that will develop both methods used in this research in order to evaluate the performance of pairstrading strategy for the Brazilian financial market. The approaches described here are computation of excessive return over a naÃ¯ve buyandhold rule and the more sophisticated bootstrap method of random trading.
Computation of excessive return of a naÃ¯ve portfolio:
The calculation of excessive return is the simplest approach to evaluating a trading strategy. The idea is quite simple: verify how much of the returns from the strategy tested exceeds a naÃ¯ve rule. In this case, the naÃ¯ve rule is the buyandhold of a properly weighted portfolio for comparison with the long positions and a â€˜sellandunholdâ€™ for the short positions.
The return of the naÃ¯ve approach, over the whole number of assets, is based on the following formula, equation (3):
For equation (3), the value of P_{ i }^{L} and P_{ i }^{S} is only the proportion of days, related to the whole trading period, that the strategy created long and short positions for asset i. Formally, P_{ i }^{L}=((âˆ‘_{t=1}^{T}I_{ it }^{L})/T) and P_{ i }^{S}=((âˆ‘_{t=1}^{T}I_{ it }^{S})/T). Note that, in the calculation of P_{ t }^{S}, the sum of the short positions is always negative or equal to zero, as I_{ it }^{S} takes values âˆ’1 and 0, only.
As pairstrading strategy uses two different types of position in the stock market, long for the hope of a price increase and short for the hope of a price decrease, it is necessary to construct a naÃ¯ve portfolios that also makes use of such positions. This is the function of the terms âˆ‘_{i=1}^{n}P_{ i }^{L}âˆ‘_{t=1}^{T}R_{ it } and âˆ‘_{i=1}^{n}P_{ i }^{S}âˆ‘_{t=1}^{T}R_{ it } where the first simulates a buyandhold (long positions) of a properly weighted portfolio and the second simulates a â€˜sellandunholdâ€™ (short positions) scheme for another properly weighted portfolio. The weights in both terms are derived from the number of long and short positions taken on each asset, as shown before. The higher the number of long and short signals a strategy makes for asset i, the higher the weight that such a stock will have on the simulated portfolio. It is clear from equation (3) that, if P_{ i }^{S}=P_{ i }^{L}, which is a perfectly hedged position for asset i in the benchmark portfolio, the terms âˆ‘_{i=1}^{n}P_{ i }^{L}âˆ‘_{t=1}^{T}R_{ it } âˆ‘_{i=1}^{n}P_{ i }^{S}âˆ‘_{t=1}^{T}R_{ it } null each other and the contribution of accumulated return for this respective asset in the benchmark portfolio is only the transaction cost for setting up the portfolios.
It should be noted that the calculation of return in equation (3) does not include the W_{ it } variable as in equation (2). This occurs because the refereed equation is calculating the sum of expected returns of a naÃ¯ve long and short position for all assets, and not the return of the simulated portfolio over time (equation (2)).
As can be seen from equation (3), one of the premises of the research is that the transaction cost per operation is the same for long and short positions. The last term of (3) is the transaction costs for opening positions (making the portfolio) and trading them at the end of the period. In this case, the number of trades required to form and close the two portfolios is 2n where n is the number of researched assets.
The excessive return for the strategy is given by the difference between (2) and (3), which forms the final formula for computing excessive return: equation (4).
Analysing equation (4), the maximisation of R_{ E }^{*}, which is the objective of any trading strategy, is given by the maximisation of âˆ‘_{i=1}^{n}âˆ‘_{t=1}^{T}R_{ it }I_{ it }^{L&S}, minimisation of âˆ‘_{i=1}^{n}P_{ i }^{L}âˆ‘_{t=1}^{T}R_{ it } and âˆ‘_{i=1}^{n}P_{ i }^{S}âˆ‘_{t=1}^{T}R_{ it } and minimisation of (âˆ‘_{i=1}^{n}âˆ‘_{t=1}^{T}Tc_{ it }âˆ’2n), as [ln((1âˆ’C)/(1+C))] is a constant. The conclusion about this analysis is intuitive because the strategy will only be successful if it efficiently creates long and short positions on the stocks, keeping the transaction costs and the benchmark returns at low values. In short, make more money with fewer trades.
Bootstrap method for assessing pairstrading performance:
The bootstrap method represents a way to compare the trading signals of the strategy against pure chance. The basic idea is to simulate random entries in the market, save the total returns for each simulation and count the number of times that those random entries were less than the return obtained in the tested strategy. Such an approach is similar to the ideas of Patrick Burns.^{20, 21} It should be noted that each trading strategy takes a different number of long and short positions and for a different number of days. Such information is also taken into account in the random simulations.
The steps are as follows:

1
Separately, for long and short position, calculate the median number of days (nDays_Long and nDays_Short) that the strategy has been trading in the market, and also the median number of assets (nAssets_Long and nDays_Short).

2
With the values of the nDays and nAssets for long and short, define nDays random entries in the market for nAssets number of assets. Again, making it clear, this procedure should be repeated for each type of trading position (long and short).

3
Repeat Steps 1 and 2 m number of times, saving the accumulated raw return (total return minus transaction costs) for each time.
After a considerable number of simulations, for example m=5000, the result for the bootstrap method will be a distribution of returns. The test here is to verify the percentage of returns that the tested strategy has beaten compared with the use of random trading.
As an example, next is the histogram of the accumulated returns from the use of the bootstrap algorithm for the daily database with options m=5000, nDays_Long=400, nDays_Long=250, nAssets_Long=5, nAssets_Short=3, and with zero transaction cost.
Figure 2 shows that, considering the options given to the algorithm, an outofskill investor would earn, on average, a total raw return of approximately 10 per cent. The best case for the naÃ¯ve investors is approximately 74 per cent and the worst is âˆ’70 per cent.
The next step in using this bootstrap approach is to count the number of times that the accumulated return from pairstrading is higher than the accumulated return from the random trading signal, and divide that by the number of simulations. The result is a percentage showing how many random signals the tested strategy has beaten. If such a strategy has value, it would produce something close to 90 per cent. If it is just a case of chance, it would give a percentage close to 50 per cent, and if the strategy does not present any value, it would result in a percentage close to 10 per cent, meaning that, in this case, it is possible to obtain higher returns by using only a random seed to select assets and days to trade.
One way of analysing the result of the bootstrap algorithm is to compare the selections made by the trading strategy, that is, the days and assets to trade, against an expected return for the same days and number of trades over the entire researched data.
Database for the research
The database for this research is based on the 100 most liquid stocks from the Brazilian financial market between 2000 and 2006.
The study aims to assess the performance and risk of pairstrading for different frequencies of the data: daily, weekly and monthly prices. As there are some liquidity problems for a few cases, the database had to be reconfigured for each frequency. The rule here is to select the stocks that have at least 98 per cent of valid closing prices. The resulting number of stocks after the application of the filter is shown in Table 1.
For Table 1, the major decrease in the researched database is for daily frequency, where only 57 stocks were selected after filtering for stocks with less than 98 per cent of closing prices. For weekly and monthly prices, such filtering was not a problem, and most of the stocks from the original database were kept. For the cases of missing prices, they were simply replaced by the past price, which sets the logarithm return in that date to zero.
Every test of trading strategy has two phases in the research data: the training period and the trading period. For this study, the training period is a moving window composed of approximately 2 years of data for all frequencies. For daily prices, such a moving window has a length of 494, for weekly prices of 105 and for annual frequency of 24.
Another issue in executing the pairstrading strategy over data is that each stock may change its pairs over time. In order to assess such a possibility, the pair of each stock is updated at each month for all tested frequencies. For instance, for daily data, at each 25 observations the pairs are recalculated.
It is important to note that the algorithm does not use future observation to build the trading rules. All aspects of the strategy are calculated using only past information, which is a necessary assumption for a realistic assessment of a quantitative trading strategy performance.
Results
Table 2 presents the returns obtained from the pairstrading strategy at the different researched frequencies, with C=0.1 per cent. This value of transaction cost is realistic for the Brazilian equity market, and can be easily achieved with a moderate amount of invested capital.
Before the analysis of Table 2, an important observation is that the total return is not only the sum of the returns from the long and short positions. For the excessive and raw returns, if the column â€˜Long Positionsâ€™ was summed with the column â€˜Short Positionsâ€™, it will not equal the column â€˜Totalâ€™. This occurs because one asset can be having a buy sign and also a sell sign for the same time t, as such stock can be the pair of other stock. If only short or long positions are analysed, the respective trading positions are valid, but when analysing the total return from both, a buy and sell sign, for the same asset at the same time, null each other. As can be seen, the difference is quite high, meaning that such an event has occurred very often.
For the case of raw return, Table 2, which is simply the clean return of the strategy minus the transaction costs, it can be seen that the long positions were far more profitable than the short positions in all tested frequencies. This was expected, as the period of the study was clearly an upwardtrending market, meaning that a short position would not make much money, as can be seen in the raw returns for the short signals, at different frequencies.
Analysing the excessive returns of Table 2, it can be seen that the pairstrading strategy was able to beat a properly weighted naÃ¯ve portfolio in most of the cases. Such a result is more consistent for the daily frequency in the interval of d between 1.5 and 2, and also for the monthly frequency in the whole tested interval of d.
Verifying the relationship between d and number of trades, it is very clear that they are negatively correlated, as in the execution of the trading rules high (low) values of d presented a low (high) number of transactions. This can be easily explained by the fact that d is the threshold variable that controls when a price divergence is not considered normal. As d grows, fewer and fewer abnormal divergences are found, which consequently reduces the number of transactions made by the strategy.
The bootstrap method presented at Table 2 shows that pairs trading is superior to the use of random trading signals (percentages of beaten random portfolios higher than 90%) in just a few cases, more precisely for the data with daily frequency and with threshold value ranging from 1.5 to 2. There are also indications of positive performance of the bootstrap method over the monthly data with 2.6â©¾dâ©¾3. But, given that only a few trades were made for this particular interval (4.08 per cent â€“ 3 observations), the result cannot be taken seriously regarding the performance of the pairstrading strategy. A much clearer picture of positive performance is given in Panel A.
Another piece of information provided in Table 2 is that the bootstrap method is much more restrictive for positive performance than the benchmark portfolio approach. Whereas the last presented positive excess return for almost all values over the different panels, the last only resulted in positive performance for a couple of cases. It could be argued that the benchmark method is a static way of assessing performance, and the bootstrap method is superior in the sense that the way to assess naÃ¯ve performances is much more dynamic, and therefore superior.
The best case in Table 2, when comparing returns and bootstrap methods, is for daily frequency, where the total raw returns presented a high percentage of beaten random portfolios, and also a positive and consistent excessive return at a particular domain of d. The performance of pairstrading for weekly prices was not very consistent for different values of d and, for monthly prices, positive values of excessive returns were found, but the simulation of random portfolios showed that most of the raw returns obtained at this frequency were simply a case of chance, and not skill.
The result of the superiority of higher frequencies in the pairstrading framework is logically consistent, as the objective of pairstrading is to take advantage of market corrections, and such inefficiency would, as expected, occur more often at high frequencies. The next step in this type of research could be to study the performance of pairstrading at highfrequency data (intraday quotes), and check whether, again, the performance is higher at higher frequencies of the data.
The next analysis pursued in the paper is the evaluation of the risk in the tested strategies (Table 3).
Regarding the Jensen's Alphas in Table 3, which should be positive and statistically significant if the strategy has good performance independently of market conditions, it can be seen that, for Panel A, most of them are positive but not statistically significant. This particular result shows that pairstrading strategy has a positive constant return after filtering for market conditions, but such a coefficient is not statistically significant.
Another aim of this study relates to the risk of pairstrading strategy. The values of systematic risk (beta) in Table 3 are very close to zero, and only one of them is statistically significant at 10 per cent. Such a result corroborates with the fact that pairstrading is often called a marketneutral rule, meaning that the returns from such a strategy usually does not follow the market behaviour. This is intuitive because, in the pairstrading framework, the number of long positions is equal to the number of short positions when there is no overlapping (short and long at the same time), which creates a natural hedge against the market movements.
After the analysis of the information shown in Tables 2 and 3, it is possible to state that, for the Brazilian financial market, the positions created by the pairstrading were a moderately profitable strategy in the past and, at the same time, neutral to the marketsystematic movements. The best results were found at the database with daily frequency. For this particular database, the excessive returns obtained were consistent over a particular region of d, and the raw returns cannot be considered a simple case of chance. The conclusion about the profitability of pairstrading corroborates with the previous research on the topic (Gatev^{18} and Nath^{19}).
Conclusions
The main objective of this research was to verify the performance (return) and also the risk of classical pairstrading in the Brazilian financial market at different time frequencies (daily, weekly and monthly). Such analysis was also carried out considering different values for the threshold parameter d.
In order to achieve this objective, the returns from the strategies were compared against a properly weighted portfolio made with long and short positions at the beginning of the trading period, and also against a variant of the bootstrap method for assessing performance. The risk of the trading signals was obtained with the analysis of the systematic risk (beta) of the strategies.
The main conclusion of this paper is that pairstrading had a good performance when applied to the Brazilian financial market, especially for the daily frequency. The tests performed showed that the market rules presented betas very close to zero and not statistically significant at 10 per cent, which means that pairstrading may be called a marketneutral rule. Regarding profitability, the best case was for daily frequency, where the interval of d between 1.5 and 2 presented consistent values of excessive return over a benchmark portfolio. The bootstrap approach also showed that the raw returns for this particular set of parameter were not given by chance, but by skill.
However, it is also important to address a weakness of the research. The framework used in the study did not allow for liquidity risk of the strategy, which may be a negative factor affecting the realisable (and not measurable) returns. Given this fact, the results of positive performance can only be assessed given the constraints of the research.
References
French, K. (1980) Stock returns and the weekend effect. Journal of Financial Economics 8 (March): 55â€“69.
Fama, E. and French, K. (1992) The crosssection of expected stock returns. Journal of Finance 47 (2): 427â€“465.
Fama, E. (1991) Efficient capital markets: II. Journal of Finance 46: 1575â€“1617.
Dimson, E. and Mussavian, M. (1998) A brief history of market efficiency. European Financial Management 4: 91â€“193.
Murphy, J. (1999) Technical Analysis of the Financial Markets. New York: New York Institute of Finance.
Park, C. and Irwin, C. (2004) The Profitability of Technical Analysis: A Review. AgMAS Project Research Report, No. 04.
FernandezRodrigues, F., SosvillaRivero, S. and Felix, J.A. (2002) Nearest Neighbor Predictions in Foreign Exchange Markets. Working Paper No. 05, FEDEA.
FernandezRodrigues, F., SosvillaRivero, S. and GarciaArtiles, M. (1997) Using nearest neighbor predictors to forecast the spanish stock market. Investigaciones EconÃ³micas 21: 75â€“91.
FernandezRodrigues, F., SosvillaRivero, S. and GarciaArtiles, M. (2001) An Empirical Evaluation of NonLinear Trading Rules. Working Paper No. 16, FEDEA.
Perlin, M.S. (2006) Non Parametric Modelling in Major Latin America Market Indexes: An Analysis of the Performance from the Nearest Neighbor Algorithm in Trading Strategies. Proceedings of the Conference on Latin American Studies; June. Lima, Peru: BALAS â€“ The Business Association of Latin American Studies.
Efetkhari, B. (1997) The Markov Regime Switching model as Trading Tool. Working Paper, University of Cambridge.
Dueker, M.J. and Neely, C.J. (2006) Can Markov Switching Models Predict Excess Foreign Exchange Returns?. Working Paper, Federal Reserve Bank of St. Louis.
Brooks, C., Katsaris, A. and Persand, G. (2005) Timing is Everything: A Comparison and Evaluation of Market Timing Strategies. Working Paper. Available at SSRN: http://ssrn.com/abstract=83448.
Anderson, K. and Brooks, C. (2006) Decomposing the priceearnings ratio. Journal of Asset Management 6: 456â€“469.
Siganos, A. and ChelleySteeley, P. (2006) Momentum profits following bull and bear markets. Journal of Asset Management 6: 381â€“388.
Balsara, N. and Zheng, L. (2006) Profiting from past winners and losers. Journal of Asset Management 6: 329â€“344.
Vidyamurthy, G. (2004) Pairs Trading: Quantitative Methods and Analysis. New York: John Wiley & Sons.
Gatev, E., Goetzmann, W.N. and Rouwenhorst, K.G. (1999) Pairs Trading: Performance of a Relative Value Arbitrage Rule. Working Paper, Yale School of Management. Available at SSRN: http://ssrn.com/abstract=141615.
Nath, P. (2003) High Frequency Pairs Trading with US Treasury Securities: Risks and Rewards for Hedge Funds. Working Paper, London Business School.
Burns, P. (2004) Performance Measurement via Random Portfolios. Working Paper, Burns Statistics.
Burns, P. (2006) Random Portfolios for Evaluating Trading. Working Paper, Burns Statistics.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Perlin, M. Evaluation of pairstrading strategy at the Brazilian financial market. J Deriv Hedge Funds 15, 122â€“136 (2009). https://doi.org/10.1057/jdhf.2009.4
Received:
Revised:
Published:
Issue Date:
DOI: https://doi.org/10.1057/jdhf.2009.4