0% found this document useful (0 votes)
159 views13 pages

Cointegration Strategies for Forex Pair Trading

Uploaded by

keshav pareek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
159 views13 pages

Cointegration Strategies for Forex Pair Trading

Uploaded by

keshav pareek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Cointegration-Based Strategies in Forex Pair Trading

Tetiana Lemishko1 , Alexandre Landi2 , and Juliana Caicedo-Llano3

R
1
Balanced Research, [Link]@[Link]
2
IBM, alexandre.landi1@[Link]
3
Regent’s University London, [Link]-llano@[Link]

PE
May 25, 2024

Abstract

Pair trading involves exploiting pricing differentials between correlated assets. Cointegration is a

PA
statistical technique that can be used to identify long-term equilibrium relationships between non-
stationary time series data, providing a potential basis for pair trading strategies. In this paper, we re-
view existing approaches to pair trading and cointegration, and propose a methodology for developing
cointegration-based pair trading strategies in the Forex market. Our methodology involves a compre-
hensive analysis of trading strategies, incorporating a range of parameters such as training/testing win-
dows and z-score thresholds. We apply this methodology to a dataset of historical daily adjusted clos-
ing prices for seven major currency pairs, spanning a period of 17 years. Our results seem to demon-
strate the potential for cointegration-based pair trading strategies to generate Sharpe ratios of up to
0.9. In our conclusion, we discuss the implications of our findings for traders and researchers and sug-
G
gest avenues for future research in this area.

1 Introduction
IN

In the landscape of financial markets, traders are constantly seeking strategies to capitalize on market in-
efficiencies and exploit relative price movements. Among the diverse array of trading methodologies, pair
trading has emerged as a potentially profitable strategy. The interest in the pair trading theme arises from
its nuanced approach to leveraging pricing differentials among correlated assets — a pursuit made feasi-
K

ble by the dynamics within financial markets. At the heart of the strategy presented in our study lies the
concept of cointegration, a notion in econometrics that highlights the long-term equilibrium connecting
non-stationary time series data. Serving as a cornerstone, this principle elucidates how deviations from
established relationships can be exploited for profitable opportunities.
R

Cointegration permits the quantification of long-term equilibrium relationships between different assets.
This equilibrium underscores a stable co-movement over time, and any divergence from this state sig-
O

nifies a temporary imbalance. Such deviations, in the context of cointegration, are not merely random
fluctuations but rather indicators for potential trading opportunities. A critical facet of this research re-
volves around the practical implications of the findings. If cointegration is conclusively established among
selected pairs, it appears to pave the way for the application of a trading strategy rooted in the mean-
W

reversion theory.

The pair trading strategy involves simultaneously taking both long and short positions in two cointegrated
assets, with the goal of exploiting the likely convergence of their price movements to generate profits. This
methodology is founded on the principle that deviations from historical price synchronization are expected
to revert to a standard condition over time.

Electronic copy available at: [Link]


2 Existing Approaches
Krauss et al. [1] identify five streams of literature analyzing pair trading using different approaches. These
approaches include the Distance approach, Cointegration approach, Time-series approach, Stochastic con-
trol approach, and other approaches.

2.1 Distance Approach

R
Gatev et al. [2] introduce the Distance approach, focusing on two periods—formation and trading. This
method identifies security pairings that historically move prices in the same direction, utilizing distance
metrics. Traders then create signals based on observable distance measures, initiating trades when the

PE
spread between two securities deviates significantly from its historical norm. While the Distance approach
is straightforward and resistant to data snoops, the use of Euclidean squared distance as a measure has
analytical limitations.

2.2 Cointegration Approach


Vidyamurthy’s [3] framework forms the basis for the Cointegration approach, involving three phases: pre-

PA
selection of pairs, tradability analysis using a modified Engle-Granger cointegration test [4], and determi-
nation of entry and exit criteria through nonparametric approaches. Rad et al. [5] practically implement
the cointegration technique, selecting stocks with the smallest sum of Euclidean squared distance (SSD)
and using the Engle-Granger method to assess cointegration. The return behavior between the cointegra-
tion and distance methods is observed to be similar. Galenko et al. [6] introduce a statistical arbitrage
technique based on a multivariate cointegration framework, where the return process is a weighted sum
of asset returns determined by the cointegration vector. This approach demonstrates mean-reversion and
outperforms the benchmark in empirical applications with index exchange-traded funds (ETFs). However,
G
it involves a significant amount of data mining.

2.3 Time-Series Approach


IN

Elliott et al. [7] proposed a time-series approach, utilizing a Gaussian Markov chain settling back to its
mean value. This approach, based on a state space model, initiates pairs trades under specific conditions.
The advantages of this model include traceability, time model forecasting, and reliance on mean-reversion
theory.
K

2.4 Stochastic Control Approach


Jurek and Yang’s [8] study in the stochastic control approach considers two investor scenarios and offers
arbitrageurs the choice to invest in a mean-reversion spread or a risk-free product. Their model, incorpo-
R

rating uncertainty through the OU-process, provides closed form solutions for both value and policy func-
tions.
O

2.5 Other Approaches


Huck [9, 10] introduces studies involving three main steps: outranking, forecasting, and trading. Elman
neural networks are used for forecasting, and a multicriteria decision procedure is employed for outrank-
W

ing. Trading decisions are based on rankings rather than equilibrium theory.

3 Research Objectives
While existing literature has provided a rich array of methodologies for pair trading, there remains a no-
table gap in the application of these strategies within the context of the Forex market.

Electronic copy available at: [Link]


Cointegration permits the quantification of long-term equilibrium relationships between different assets.
This equilibrium underscores a stable co-movement over time, and any divergence from this state signifies
a temporary imbalance. Such deviations, in the context of cointegration, are not merely random fluctua-
tions but rather indicators for trading opportunities.

The proposed research focuses on the application of a cointegration-based pair trading strategy specifically
targeting the pairs that include different combinations of the most liquid currencies such as Euro to US
Dollar (EUR/USD), British Pound to US Dollar (GBP/USD), US Dollar to Japanese Yen (USD/JPY),

R
US Dollar to Swiss Franc (USD/CHF), US Dollar to Canadian Dollar (USD/CAD), Australian Dollar to
US Dollar (AUD/USD), New Zealand Dollar to US Dollar (NZD/USD).

Furthermore, we conducted a comprehensive study on trading strategies, which encompassed a range of

PE
parameters that included various combinations of training/testing windows and z-score thresholds. Such
variation aims to optimize pair trading strategies by identifying the most effective combinations of param-
eters and the best-performing pairs. Additionally, the study seeks to assess the robustness of these strate-
gies across various market conditions, conduct sensitivity analyses to understand parameter impacts, com-
pare different approaches for performance, and validate the strategies against historical data. Ultimately,
the objective is to enhance understanding and improve the profitability and risk management capabilities

PA
of pair trading strategies for traders.

Overall, this research aims to identify and capitalize on trading strategies and statistical arbitrage possibil-
ities by determining the existence of cointegration on selected pairs.

4 Methodology
G
4.1 Data Collection
We have collected historical daily adjusted closing prices of 7 most liquid currencies from Yahoo Finance
[11]: Euro/US Dollar (EUR/USD), British Pound/US Dollar (GBP/USD), Japanese Yen/US Dollar (JPY/USD),
IN

Swiss Franc/ US Dollar (CHF/USD), Canadian Dollar/ US Dollar (CAD/USD), Australian Dollar/US
Dollar (AUD/USD), New Zealand Dollar/US Dollar (NZD/USD). In this study, we transformed the pairs
to have a common denominator of USD. The overall study period spans 17 years from January 1, 2007, to
January 1, 2024, which is the longest period over which continuous data is available for the entire set of
selected currencies.
K

4.2 Cointegration Analysis


We conducted cointegration tests to determine whether a long-term relationship exists between the prices
R

of the paired assets. There are two main approaches to test for cointegration in time series: the Engle-
Granger test and the Johansen test. The Engel-Granger test is a widely used method for assessing the
presence of cointegration between two non-stationary time series variables. The Johansen test is a statis-
tical method used to determine the number of cointegrating relationships among multiple non-stationary
O

time series variables.

The Engle-Granger cointegration test offers several advantages over the Johansen test, particularly in
terms of simplicity and practical application. Firstly, the Engle-Granger test is easier to implement as it
W

involves a two-step approach: testing for unit roots in the individual series and then testing for a unit root
in the residuals of the long-run equilibrium regression. This simplicity makes it more accessible for prac-
titioners and those with less advanced econometric training. Additionally, the Engle-Granger test is less
computationally intensive, requiring fewer parameters to estimate. Moreover, it is straightforward to inter-
pret, providing clear insights into whether a cointegrating relationship exists between the variables. While
the Johansen test can handle multiple cointegrating relationships and offers a more sophisticated analy-
sis, the Engle-Granger test’s ease of use and interpretability make it a practical choice for many applied
econometric analyses.

Electronic copy available at: [Link]


Within the limited scope of this study, we chose to start our investigations with the use the Engle-Granger
test due to its advantages over the Johansen test. The Engle-Granger test consists of the following steps:

• Individual Augmented Dickey-Fuller (ADF) Tests: Begin by conducting Augmented Dickey-Fuller


tests on each of the two time series variables individually. The objective is to determine whether
each variable is individually non-stationary. The null hypothesis for the ADF test is that the vari-
able has a unit root, indicating non-stationarity. If the null hypothesis cannot be rejected, the vari-
able is considered non-stationary.

R
• Regression Analysis: If both variables are found to be individually non-stationary, proceed to the
next step by regressing one variable on the other. This regression should be conducted in levels, not
in first differences.

PE
• Residual Augmented Dickey-Fuller Test: Perform an Augmented Dickey-Fuller test on the residuals
from the regression obtained in the previous step. The null hypothesis for this test is that the resid-
uals contain a unit root, indicating non-stationarity. If the null hypothesis is rejected, it is assumed
that the residuals may be stationary.

• Cointegration Inference: If the residuals are assumed to be stationary, the results imply that there is

PA
evidence of cointegration between the two variables. Cointegration signifies a long-term equilibrium
relationship, presuming that any deviations from this equilibrium will eventually be corrected.

• Interpretation: The rejection of the null hypothesis in the residual ADF test suggests the presence of
cointegration. Conversely, if the null hypothesis cannot be rejected, it implies a lack of evidence for
cointegration.
G
4.3 Mean-Reversion Strategy Development
Based on the cointegration analysis, we developed a mean-reversion trading strategy. This involves estab-
lishing a threshold for the spread between the paired assets. The proposed strategy compares the loga-
IN

rithmic transformation of the prices of two assets represented by series1 and series2. The core steps of the
strategy can be summarized as follows:

4.3.1 Spread Calculation


The process described in 4.2 can be summarized in a simple mathematical representation. In the context
K

of cointegration, if we have two time series, yt and xt , we often regress one time series (e.g., yt ) on an-
other (e.g., xt ) to identify a long-term equilibrium relationship. The regression equation is typically formu-
lated as:
yt = β · xt + rt
R

where β is the coefficient estimating the relationship between xt and yt , and rt denotes the residuals. The
residuals, if found to be stationary through appropriate statistical tests (like the Augmented Dickey-Fuller
O

test), suggest cointegration, implying that deviations from this equilibrium relationship are temporary and
expected to revert to the mean.

Now we can express the residuals time series as:


W

rt = yt − β · xt

If yt and xt are not stationary and rt is stationary, then yt and xt are presumed to be cointegrated. This
means that although the individual time series may have trends, there exists a stable long-term relation-
ship between them. Here, the expression yt -β·xt represents the spread, and β is a cointegration coefficient
that measures the strength of the relationship between the two time series.

Electronic copy available at: [Link]


In this study, yt and xt are the logarithmic transformation of the prices of the considered pair of curren-
cies. The logarithmic transformation of the prices helps normalize the data, making it easier to compare
assets with significantly different price levels (e.g. the Euro versus the Japanese Yen). This is particularly
useful in pair trading, where the strategy is based on the relative movements between two assets.

Thus, in this study, we calculated the price spread by the following formula:

R
Spread = log(price currency1) − β · log(price currency2)

4.3.2 Mean and Standard Deviation Calculation

PE
We computed the mean and standard deviation of the prices spread over a specified training period pre-
ceding the corresponding testing period.

4.3.3 Z-Score Calculation


We calculated the z-score of the spread, representing the number of standard deviations the current spread

PA
is from its historical mean. We calculated the z-score for each day of the testing period by the following
formula:
Z-Score(t) = (Spread(t) – Mean Spread) / Standard Deviation of Spread
Here Spread(t) is the spread in currency prices obtained for the current day of the testing period, Mean
Spread and Standard Deviation of Spread are the mean and the standard deviation of the spread in cur-
rency prices obtained for the training period preceding the testing period.

4.3.4 Trading Signals


G
We generated trading signals based on the z-score. Therefore, enter a long position (buy) if the z-score is
below the negative threshold and enter a short position (sell) if the z-score is above the positive threshold.
IN

A z-score below the negative threshold indicates that the spread is below its historical average, suggesting
a potential long trading opportunity. A z-score above the positive threshold suggests that the spread is
above its historical average, indicating a potential short trading opportunity.

In essence, the strategy identifies times when the spread between the two assets deviates significantly from
K

its historical mean and generates trading signals to take advantage of the anticipated mean-reverting be-
havior. The chosen threshold serves as a sensitivity parameter, determining the level of deviation from the
mean required to trigger a trading signal.
R

4.3.5 Signal Application


To compute the daily returns of the strategy correctly, the signal should be applied with a shift of two
days. Thus, when the signal occurs at time t, the trade is executed at time t + 1. This approach ensures
O

a more robust and realistic simulation of trading conditions, providing a better reflection of potential real-
world trading outcomes.

To calculate the daily returns of a trading strategy, one should multiply the daily price change by the
W

trading signal from the previous day. This method assumes that the action to buy or sell is executed at
the closing price of the signal day, thereby affecting the return of the next day. The formula is as follows:

Daily Return(t) = Signal(t − 1) × Daily Price Change(t)

For example, if the signal on Monday evening is -1 (indicating a sell), the position is taken immediately at
the closing price of Monday. Consequently, the return for Tuesday is computed by multiplying Tuesday’s
price change by the signal from Monday.

Electronic copy available at: [Link]


The above calculation assumes the ability to execute the position exactly at the close of the day when the
signal is generated. However, in practical trading scenarios, executing trades precisely at the close can be
challenging due to various factors.

To address this issue and make the back-testing more robust, it is prudent to assume that the position is
entered at the close of the day following the signal generation. This means that if a signal is generated
on Monday evening, the position is taken at the close of Tuesday, not Monday. Therefore, the signal from
Monday affects the return of Wednesday, not Tuesday. This necessitates a shift of two days instead of one

R
when applying the signal in the calculation of daily returns. Thus, the formula calculating daily returns
takes the following form:

Daily Return(t) = Signal(t − 2) × Daily Price Change(t)

PE
4.4 Trading Strategy Parameters
4.4.1 Train-Test Split
The data were split into two distinct sets: a training set and a testing set. The primary purpose of the

PA
training set is to assess whether the time series exhibit cointegration. Upon confirming cointegration, we
proceeded to apply the proposed trading strategy.

Our approach involves utilizing various training and testing time windows shown in Figure 1. We imple-
mented the trading strategy using different combinations of these time windows for both training and test-
ing periods throughout the entire study period, ensuring continuity in the testing data. For instance, we
designated a train period of n days and a test period of m days. During the initial n days, we assessed
cointegration, followed by the application of the trading strategy over the subsequent m days of the test
G
period. Once the test period concludes at the Nth day (where N = m + n), we transition to a new test
period of m days starting from the (N+1)th day and ending at the (N + m)th day, while the preceding n
days serve as a new train period, starting from the (N-n)th day and ending at the Nth day. This iterative
process ensures a continuous evaluation of the trading strategy’s performance.
IN
K
R
O
W

Figure 1: Different combinations of time windows for training and testing periods implemented in this
study

4.4.2 Z-Score Threshold


Exploring different z-score thresholds allows us to understand how sensitivity to deviations from the mean
affects the performance and effectiveness of the trading strategy. Lower z-score thresholds, such as ± 1,
imply a more aggressive approach, where trading signals are triggered by smaller deviations from the mean,

Electronic copy available at: [Link]


potentially leading to more frequent trades. On the other hand, higher z-score thresholds, like ± 2 or ± 3,
indicate a more conservative strategy, where trades are initiated only when significant deviations occur,
possibly resulting in fewer trades. We have studied the implementation of the trading strategy with differ-
ent z-score thresholds of ± 1, ± 2, and ± 3.

For simplicity, we are going to refer to the considered z-score thresholds as 1, 2, and 3.

4.5 Strategy Implementation

R
In this study, we examined 7 distinct currencies, as outlined in Section 4.1. Considering that cointegra-
tion is not symmetrical, we generated a total of 42 unique pair combinations. Subsequently, we applied the
trading strategy to all 42 pairs and aggregated the returns obtained from each pair over the entire study

PE
period with different parameter settings discussed in Section 4.4. The business metrics were then calcu-
lated based on the total returns accrued throughout the study period. We analyzed the trading perfor-
mances of portfolios based on different pairs/windows/z-score thresholds cross-sections. Then we intro-
duced the trading strategy based on the filtering parameters defined by the cross-sectional analysis.

To evaluate the performance of the proposed strategy, we calculated the aggregate business metrics. First,

PA
we computed the total returns series by summarizing the individual returns series. Then, we calculated
the standardized returns series by dividing the total returns series by the number of selected combina-
tions. This yields small average returns and volatility. A practitioner who wants to implement a similar
strategy may scale their positions by taking on some leverage to ensure their position sizing complies with
their risk objectives, whether in terms of volatility, maximum drawdown, value at risk, conditional value
at risk, or any other measure of the risk of their choice. For example, if the historical performance metrics
show an annualized return of 1% and an annualized volatility of 1%, the trader could adjust the number of
lots accordingly based on their risk objective. In our study, we assumed an arbitrary scaling such that the
G
trader would use a leverage of 10.

4.6 Performance Metrics


IN

We used the Sharpe ratio as an evaluating criterion for the trading performances of portfolios based on
different pairs/windows/z-score thresholds cross-sections. We evaluated the performance of the proposed
strategy by using the following metrics as suggested in [12, 13]: annualized return, annualized volatility,
Sharpe ratio, Sortino ratio, Calmar ratio, and maximum drawdown. To plot the cumulative returns graph
with more representative drawdowns, we used the non-exponential form for calculating
Pn the cumulative re-
K

Pn
turns series ( i=1 returnsi ) instead of the exponential form of this equation (exp ( i=1 returnsi )). In this
case, when plotting the resulting cumulative returns series, we did not subtract 1.
R

5 Results
5.1 Cross-Sectional Analysis
O

Tables 1, 2, and 3 show the Sharpe ratios calculated for the aggregate trading performances of all 42 cur-
rency pairs at different parameter settings.
W

Table 1: Sharpe ratios calculated for the portfolios based on all the windows combinations across all pairs
and all z-score thresholds

Training / Testing windows 1 5 21 63 128


63 -0.32 -0.14 -0.26 NA NA
128 0.11 0.21 0.05 -0.03 NA
257 0.17 0.15 0.54 0.11 0.08

Electronic copy available at: [Link]


Table 2: Sharpe ratios calculated for portfolios based on all the windows combinations across all pairs and
all z-score thresholds, listed in descending order of the Sharpe ratio

Training window Testing window Sharpe ratio


257 21 0.54
128 5 0.21
257 1 0.17
257 5 0.15

R
128 1 0.11
257 63 0.11
257 128 0.08

PE
128 21 0.05
128 63 -0.03
63 5 -0.14
63 21 -0.26
63 1 -0.32

PA
From the results presented by Tables 1 and 2, one can notice that across all pairs and z-score thresholds,
the highest Sharpe ratio (0.54) was obtained for the trading strategy executed with a training window of
257 days and a testing window of 21 days. The lowest Sharpe ratio (-0.32) was obtained for the trading
strategy executed with a training window of 63 days and a testing window of 1 day.

Table 3: Sharpe ratios calculated for the portfolios based on all the z-score thresholds across all pairs and
all windows combinations, listed in descending order of the Sharpe ratio
G
z-score threshold Sharpe ratio
1 0.10
3 0.03
IN

2 -0.05

The results presented in Table 3 show that across all pairs and windows combinations, the highest Sharpe
ratio was observed at the z-score threshold of 1, while the lowest Sharpe ratio was obtained at the z-score
K

threshold of 2. Tables 4 and 5 show the Sharpe ratios calculated for the trading performances of each of
the 42 currency pairs across all the windows combinations and z-score thresholds.

Table 4: Sharpe ratios of all pairs across all windows combinations and all z-score thresholds
R

AUDUSD EURUSD GBPUSD NZDUSD JPYUSD CHFUSD CADUSD


AUDUSD NA -0.18 -0.44 -0.42 0.10 -0.02 -0.08
EURUSD 0.06 NA 0.08 -0.09 -0.16 0.13 -0.36
O

GBPUSD -0.38 0.05 NA 0.05 0.24 0.29 0.35


NZDUSD -0.24 -0.03 0.45 NA 0.05 0.31 -0.15
JPYUSD 0.04 0.05 -0.36 -0.09 NA 0.07 -0.32
W

CHFUSD -0.04 0.17 0.10 0.09 0.13 NA 0.19


CADUSD -0.10 -0.05 0.19 -0.003 -0.15 0.04 NA

Electronic copy available at: [Link]


Table 5: Sharpe ratios calculated for all pairs across all windows combinations and all z-score thresholds,
listed in descending order of the Sharpe ratio

Currency 1 Currency 2 Sharpe ratio


NZDUSD GBPUSD 0.45
GBPUSD CADUSD 0.35
NZDUSD CHFUSD 0.31
GBPUSD CHFUSD 0.29

R
GBPUSD JPYUSD 0.24
CADUSD GBPUSD 0.19
CHFUSD CADUSD 0.19
CHFUSD EURUSD 0.17

PE
CHFUSD JPYUSD 0.13
EURUSD CHFUSD 0.13
AUDUSD JPYUSD 0.10
CHFUSD GBPUSD 0.10
CHFUSD NZDUSD 0.09
EURUSD GBPUSD 0.08

PA
JPYUSD CHFUSD 0.07
EURUSD AUDUSD 0.06
GBPUSD EURUSD 0.05
GBPUSD NZDUSD 0.05
JPYUSD EURUSD 0.05
NZDUSD JPYUSD 0.05
JPYUSD AUDUSD 0.04
CADUSD CHFUSD 0.04
G
CADUSD NZDUSD -0.003
AUDUSD CHFUSD -0.02
NZDUSD EURUSD -0.03
CHFUSD AUDUSD -0.04
IN

CADUSD EURUSD -0.05


AUDUSD CADUSD -0.08
EURUSD NZDUSD -0.09
JPYUSD NZDUSD -0.09
CADUSD AUDUSD -0.10
K

CADUSD JPYUSD -0.15


NZDUSD CADUSD -0.15
EURUSD JPYUSD -0.16
R

AUDUSD EURUSD -0.18


NZDUSD AUDUSD -0.24
JPYUSD CADUSD -0.32
JPYUSD GBPUSD -0.36
O

EURUSD CADUSD -0.36


GBPUSD AUDUSD -0.38
AUDUSD NZDUSD -0.42
W

AUDUSD GBPUSD -0.44

It was mentioned above that across all pairs and z-score thresholds the highest Sharpe ratio was obtained
for the strategy executed at the training window of 257 days and the testing window of 21 days. This
choice of windows is frequently used in pair trading. Thus, we fixed this parameter and calculated the
performance of the strategies for the individual pairs across all z-score thresholds at the training/testing
windows of 257/21 (see Table 6). In addition, we calculated the performance of the strategies executed at
each z-score threshold at fixed training/testing windows of 257/21 across all pairs (see Table 7).

Electronic copy available at: [Link]


Table 6: Sharpe ratios calculated for the trading of all pairs executed at the training window of 257 days
and the testing window of 21 days across all z-score thresholds, listed in descending order of the Sharpe
ratio

Currency 1 Currency 2 Sharpe ratio


EURUSD JPYUSD 0.46
GBPUSD JPYUSD 0.46
NZDUSD GBPUSD 0.39

R
EURUSD GBPUSD 0.38
JPYUSD EURUSD 0.35
GBPUSD CADUSD 0.32
CHFUSD NZDUSD 0.32

PE
EURUSD CADUSD 0.31
NZDUSD CHFUSD 0.31
GBPUSD EURUSD 0.29
NZDUSD JPYUSD 0.27
JPYUSD AUDUSD 0.23
NZDUSD EURUSD 0.23

PA
JPYUSD NZDUSD 0.23
GBPUSD CHFUSD 0.21
AUDUSD JPYUSD 0.20
EURUSD CHFUSD 0.20
CADUSD GBPUSD 0.20
CHFUSD GBPUSD 0.19
GBPUSD NZDUSD 0.17
CHFUSD JPYUSD 0.17
G
CHFUSD EURUSD 0.17
JPYUSD CHFUSD 0.16
AUDUSD CADUSD 0.15
CADUSD NZDUSD 0.10
IN

NZDUSD AUDUSD 0.09


AUDUSD NZDUSD 0.08
NZDUSD CADUSD 0.07
EURUSD AUDUSD 0.05
AUDUSD CHFUSD 0.03
K

CADUSD CHFUSD 0.01


GBPUSD AUDUSD -0.002
JPYUSD GBPUSD -0.03
R

CHFUSD CADUSD -0.04


EURUSD NZDUSD -0.10
CADUSD AUDUSD -0.11
CADUSD EURUSD -0.12
O

CADUSD JPYUSD -0.13


AUDUSD EURUSD -0.22
CHFUSD AUDUSD -0.23
W

AUDUSD GBPUSD -0.27


JPYUSD CADUSD -0.43

The results presented in Table 6 show that across all windows combinations and all z-score thresholds, the
Sharpe ratios range from -0.43 to 0.46. The highest Sharpe ratios were observed for the following pairs:
EURUSD/JPYUSD, GBPUSD/JPYUSD, NZDUSD/GBPUSD, EURUSD/GBPUSD, and JPYUSD/ EU-
RUSD.

10

Electronic copy available at: [Link]


Table 7: Sharpe ratios calculated for the portfolios based on all the z-score thresholds across all pairs and
all windows combinations, listed in descending order of the Sharpe ratio

z-score threshold Sharpe ratio


1 0.55
3 0.44
2 0.41

R
The results presented in Table 7 show that the values of the Sharpe ratios obtained for the strategies ex-
ecuted at different z-score thresholds and the fixed windows of 257/21 across all pairs do not vary sig-

PE
nificantly. The highest Sharpe ratio of 0.55 was observed at the z-score threshold of 1, while the lowest
Sharpe ratio of 0.41 was obtained at the z-score threshold of 2.

5.2 Proposed Strategy


The optimal parameters identified in Section 5.1 can be employed as filtering criteria to develop a robust
and efficient trading strategy. Thus, we proposed a strategy based on the following filters:

PA
1. We fixed the training and testing windows at 257 and 21 days respectively.

2. We fixed the z-score threshold at 1.

3. We selected 20 best-performing pairs at this windows/z-score threshold setting.

Table 8 shows the performance of the resulting strategy.


G
Table 8: Aggregate business metrics for the strategy based on the pre-defined filtering parameters

Metrics Value
IN

Annualized return (%) 8.50


Annualized volatility (%) 9.40
Sharpe ratio 0.90
Sortino ratio 1.02
Calmar ratio 0.51
K

Maximum drawdown (%) -16.57


R
O
W

11

Electronic copy available at: [Link]


R
PE
PA
Figure 2: Cumulative returns obtained for the strategy based on the pre-defined filtering parameters

From the results presented in Table 8 and Figure 2, one can estimate the performance of the strategy
G
based on the filtering parameters pre-defined by the cross-sectional analysis. The cumulative return curve
exhibits a clear upward trend, indicating viable performance of the proposed strategy. The annualized re-
turn stands at 8.50%, accompanied by a slightly higher annualized volatility of 9.40%. The Sharpe and
Sortino ratios are reported at viable values of 0.90 and 1.02, respectively, indicating viable risk-adjusted
IN

performance. Nevertheless, this strategy results in a Calmar ratio of 0.51, due to a maximum drawdown of
-16.57%. Overall, the strategy based on the filtering parameters pre-defined by the cross-sectional analysis
shows viable performance.

6 Conclusions
K

In summary, this study delves into the integration of the cointegration-based pair trading strategies for
various currency pairs. By leveraging the stable co-movement indicated by cointegration, the research
R

identifies trading opportunities based on deviations from long-term equilibrium relationships. Through a
comprehensive analysis of trading strategies, encompassing different parameters such as testing/training
windows and z-score thresholds, the study seeks to optimize pair trading strategies. Subsequently, we
developed a robust and thus reliable strategy based on the filtering parameters pre-defined by the cross-
O

sectional analysis. This strategy showed overall good performance with decent annualized returns at a rea-
sonable level of risk. The proposed strategy resulted in values of Sharpe and Sortino ratios of 0.90 and
1.02, respectively.
W

12

Electronic copy available at: [Link]


7 References
1. Krauss, C. (2017). Statistical arbitrage pairs trading strategies: Review and outlook. Journal of
Economic Surveys, 31(2), 513-545.

2. Gatev, E., Goetzmann, W.N., & Rouwenhorst, K.G. (2006). Pairs trading: Performance of a relative-
value arbitrage rule. Review of Financial Studies, 19(3), 797–827.

R
3. Vidyamurthy, G. (2004). Pairs Trading: Quantitative Methods and Analysis. Hoboken, NJ: John
Wiley & Sons.

4. Engle, R.F., & Granger, C.W.J. (1987). Co-Integration and Error Correction: Representation, Esti-

PE
mation, and Testing. Econometrica, 55(2), 251–276.

5. Rad, H., Low, R.K.Y., & Faff, R.W. (2015). The profitability of pairs trading strategies: Distance,
cointegration, and copula methods. Working paper, University of Queensland.

6. Galenko, A., Popova, E., & Popova, I. (2012). Trading in the presence of cointegration. The Journal

PA
of Alternative Investments, 15(1), 85–97.

7. Elliott, R.J., Van Der Hoek, J., & Malcolm, W.P. (2005). Pairs trading. Quantitative Finance, 5(3),
271–276.

8. Jurek, J.W., & Yang, H. (2007). Dynamic portfolio selection in arbitrage. Working paper, Harvard
University.

9. Huck, N. (2009). Pairs selection and outranking: An application to the S&P 100 index. European
G
Journal of Operational Research, 196(2), 819–825.

10. Huck, N. (2010). Pairs trading and outranking: The multi-step-ahead forecasting case. European
Journal of Operational Research, 207(3), 1702–1716.
IN

11. Yahoo Finance. (n.d.). Home page. Retrieved from [Link]

12. Zhang, Z., Zohren, S., & Roberts, S. (2020). Deep Reinforcement Learning for Trading. Journal of
Financial Data Science, 2(2), 25–40.
K

13. Lim, B., Zohren, S., & Roberts, S. (2019). Enhancing Time-series Momentum Strategies Using Deep
Neural Networks. Journal of Financial Data Science, 1(4), 19-38.
R

14. Landi, A., Portfolio Theory in Practice (2023). Available at SSRN: [Link]
4667204 or [Link]
O
W

13

Electronic copy available at: [Link]

Common questions

Powered by AI

The methodology for developing cointegration-based pair trading strategies involves several steps: performing statistical tests to identify cointegrated asset pairs, employing the Engle-Granger test for cointegration verification, and setting entry and exit criteria through nonparametric methods. After identifying pairs, the strategy focuses on exploiting their deviations from long-term equilibrium using mean-reversion principles. This process is further enhanced by analyzing historical data to fine-tune parameters such as training/testing windows and z-score thresholds for optimal trading performance .

The use of the Sharpe ratio as a performance metric in Forex pair trading strategies is valuable as it provides a measure of risk-adjusted returns, allowing traders to evaluate the effectiveness of trading strategies across different parameter settings such as windows and z-score thresholds. A higher Sharpe ratio indicates better performance, balancing return with risk. In the document, the highest Sharpe ratio observed was 0.54, indicating a favorable outcome for those specific trading conditions .

The document suggests handling risk and volatility in Forex pair trading strategies by employing leverage to scale positions in compliance with specific risk objectives. Risk measures, such as volatility, maximum drawdown, value at risk, and conditional value at risk, are utilized to inform position sizing decisions to ensure that trades align with the trader's risk tolerance. This approach allows practitioners to manage their exposure while potentially optimizing the returns from the trading strategy .

The primary benefit of using cointegration in Forex pair trading strategies is the ability to identify long-term equilibrium relationships between non-stationary time series data, allowing traders to exploit deviations from this equilibrium to generate trading signals. This approach is based on the concept that correlated assets will revert to a long-run equilibrium, providing opportunities for profitable trades from temporary price imbalances .

Two key limitations of the Distance approach in pair trading are its analytical limitations when relying on Euclidean squared distance as a measure and its potential vulnerability to data snooping, despite being straightforward and resistant to certain types of data manipulation .

The Engle-Granger cointegration test simplifies the analysis for practitioners by providing an easier two-step approach: testing for unit roots in individual series and then testing for a unit root in the residuals of a long-run equilibrium regression. This reduces computational intensity and parameter estimation requirements, making it more accessible to those without advanced econometric training .

Leveraging in pair trading can significantly alter performance outcomes by scaling the position sizes to align with specific risk objectives, such as desired volatility levels or maximum drawdown targets. By adjusting the leverage, a trader can amplify returns; however, this also increases potential losses. In the analysis, an arbitrary leverage of 10 was used to ensure compliance with risk measures, allowing for greater exposures and possibly higher returns, albeit with increased risk .

Mean-reversion in cointegration-based pair trading strategies plays a critical role as the core principle driving the strategy. When deviations from a long-term equilibrium relationship (identified through cointegration) occur between the prices of two correlated assets, it creates a trading signal under the assumption that prices will eventually revert to the historical equilibrium. This expected convergence allows traders to take long and short positions simultaneously to capitalize on predicted movements back towards the equilibrium .

The Time-Series approach to pair trading, as outlined in the document, involves using a Gaussian Markov chain to model pairs trading based on mean-reversion principles. This approach facilitates traceability and time model forecasting, offering traders tools to initiate trades under specified conditions that anticipate the reversion of asset prices to their mean values .

Two analytical advantages of the Johansen test over the Engle-Granger test are its capability to handle multiple cointegrating relationships and offering a more sophisticated analysis of the data. While the Engle-Granger test is simpler and less computationally intensive, the Johansen test provides greater depth and complexity in exploring the interrelations among variables, making it more suitable for cases involving multiple assets .

You might also like