Questions tagged [pairs-trading]

Pairs trading is a market-neutral trading strategy enabling traders to profit from virtually any market conditions: uptrend, downtrend, or sideways movement. This strategy is categorized as a statistical arbitrage and convergence trading strategy.

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

Price spread or ratio for mean reversion pair trading

I am slightly confused as to whether I should use price spread or ratio for mean reversion in pair trading. I have seen some work on testing stationarity for the price spread and then use the price ...
user70121's user avatar
0 votes
0 answers
39 views

Closed cycle of pairs in pairs trading

Suppose I am trading cointegrated pairs $A_1A_2, A_2A_3, \ldots A_{k-1}A_k, A_kA_1$ and I got a signal to long $A_1$, short $A_2$; long $A_2$, short $A_3$; $\cdots$ long $A_k$, short $A_1$. How ...
Filip's user avatar
  • 3
0 votes
1 answer
108 views

Pairs trading stocks without shorting

For my high school national trading competition (organised by the national stock exchange, officially starting in a week) I gathered a team of 3 friends and developed a simple pairs trading strategy. ...
Filip's user avatar
  • 3
0 votes
0 answers
46 views

Why does Theta in an OU process relate to a mispricing of a pair's spread

I am reading this article from Alex Lipton and Marcos Lopez de Prado: A closed-form solution for optimal mean-reverting trading strategies (2020) which talks about finding optimal profit taking and ...
AlexBB's user avatar
  • 1
0 votes
0 answers
50 views

Stock clustering for Statistical Arbitrage Trading

Has ML based stock-clustering been practically adapted by the industry in arbitrage trading strategies like pairs trading for forming pairs instead of other traditional techniques like cointegration?
Rohan Kuntoji's user avatar
0 votes
0 answers
78 views

Pairs trading back-test in python

I've been working on this code for weeks now, and I'm still not convinced by the results. I think there's a problem with the computation of the profit and loss, but I'm not sure. I would love some ...
Raúl Pareja's user avatar
0 votes
1 answer
194 views

Separating Forex Instruments

I'm a mathematician and I'm newish to trading. Is it possible to separate or decouple the two currencies in a trading pair? That is, given the GBP/USD pair, is it possible to create a graph of the GBP ...
Ben Crossley's user avatar
1 vote
0 answers
86 views

Exit strategy on cointegrated pairs trading

I'm looking for guidance on an exit strategy when using pairs trading & cointegration. I'm able to find two cointegrated pairs, I then enter the trade however once in the trade I found the pairs ...
user68170's user avatar
3 votes
0 answers
80 views

Why long a position when the acutal price is higher than the predicted price? (Kalman filter for pairs trading)

In this paper Elliott, R., van der Hoek, J. and Malcolm, W. (2005) Pairs Trading., the spread (state process) is assumed to follow a mean reverting process $x_{k+1}-x_k=(a-bx_k)\tau+\sigma\sqrt{\tau}\...
Steven Lu's user avatar
  • 131
2 votes
0 answers
107 views

Linear Regression Cointegration Strategy

When doing linear regression to figure out the hedge ratio for the cointegration relationship what does it mean if the residuals are stationary but end up looking like the price time series of y? How ...
Deepankar Joshi's user avatar
0 votes
0 answers
103 views

What is the margin requirement for a dollar neutral long short portfolio

I have been working on a market neutral pairs trading strategy. See https://medium.com/@nderground-net/backtesting-a-pairs-trading-strategy-b80919bff497 I am trying to understand whether I am properly ...
iank's user avatar
  • 1
1 vote
0 answers
51 views

Johansen Cointegration Test returns non-stationary error even though trace statistics suggest their existence

I'm working with Python and use the statsmodels.tsa.vector_ar.vecm.coint_johansen function to analyze if several stocks have a stationary error term with respect to ...
Marx's user avatar
  • 11
0 votes
0 answers
81 views

Pairs trading gradient [duplicate]

For a pairs trade, when calculating the zscore should I include the gradient (slope) from OLS in the calculation: ...
Tariq Hamid's user avatar
0 votes
0 answers
56 views

Pairs trading intercept [duplicate]

For a pairs trade, when calculating the zscore should I include the intercept point in the calculation: ...
Tariq Hamid's user avatar
1 vote
2 answers
320 views

Role of Intercept In OLS Beta Estimation

I am constructing a classic pairs trading strategy in which I use a linear estimator to model the spread of two assets opening a long-short market neutral position during times of divergence. I am ...
James VanLandingham's user avatar
1 vote
0 answers
224 views

In pair trading, we should look into the spread of price or return?

All I noticed that in the pair trading, some measure the spread on pricing and some measure the spread on return. Both methods make sense, it is intuitve to model price, but convergence of return ...
Yang's user avatar
  • 11
3 votes
0 answers
268 views

Why aren't the optimal entry/exit thresholds for OU pairs trading relatively invariant to shifts in the OU mean?

The optimal entry/exit thresholds for mean reversion trading (assuming an underlying Ornstein-Uhlenbeck (OU) process) is derived in the paper "Optimal Mean Reversion Trading with Transaction ...
mpeac's user avatar
  • 415
4 votes
2 answers
272 views

Help with reading currency pairs

Please excuse me in advance, as I suspect my question is slightly off compared to the other questions on this website, but I am currently taking a class in International Finance and I have a few ...
George Smith's user avatar
0 votes
1 answer
374 views

Should we include constant in linear regression in pairs trading?

Should we include constant in linear regression while calculating hedge ratio for pairs trading strategy?
Qbik's user avatar
  • 1,018
3 votes
1 answer
200 views

How to correctly explain the current price action in a trading chart with the Hurst Exponent found?

I watched this video tutorial to learn how to estimate the Hurst Exponent using an Excel spreadsheet and a time series sample of 1025 data. I decided to use futures 1H markPriceKlines data from ...
Noah Verner's user avatar
1 vote
1 answer
205 views

What would be the problem with this pairs trading allocation scheme?

I am new to pairs trading, and I have come up with an idea of how to allocate capital between the long and short leg of a pairs trade. I feel that there is a problem with it, and I want to figure out ...
Vladimir Belik's user avatar
1 vote
1 answer
124 views

What is the proper capital split/allocation between the long and short in a pairs trade?

I am trying to understand the following. If I have $100, how do I determine how much to allocate to the long and short of a pairs spread? You might say "use the hedge ratio you calculate, as that ...
Vladimir Belik's user avatar
0 votes
1 answer
465 views

Pairs trading using dynamic hedge ratio - how to tell if stationarity of spread is due to genuine cointegration or shifting of hedge ratio?

I'm very new to pairs trading, and am trying it out on a few dozen pairs. It seems very natural to me to use a dynamic hedge ratio, as it seems likely that the ratio will move over time. To accomplish ...
Vladimir Belik's user avatar
1 vote
0 answers
255 views

Pairs Trading - isn't any spread stationary if your rolling lin-reg window is small enough?

I have a set of 7 assets, and I have run an ADF test on all possible pair-spreads to find possible pair strategies. I am creating the spreads using a rolling window in which I run linear regression to ...
Vladimir Belik's user avatar
0 votes
1 answer
607 views

Pairs trading - is regression done on log prices or log returns?

I'm getting into pairs trading (statistical arbitrage), but I keep finding different instructions on how it's done. Some sources (like this) run the linear regression (to find hedge ratio) on the log ...
Vladimir Belik's user avatar
1 vote
0 answers
84 views

Simultaneous Stochastic Differential Equations

I was thinking about cointegrated time series and came up with the following simultaneous equations model: $dY_t = \alpha (Y_t - \gamma X_t)dt + \sigma dB_t$ $dX_t = \beta (Y_t - \delta X_t)dt + \tau ...
André Bittencourt's user avatar
1 vote
0 answers
96 views

How To Construct A Volatility Spread Position?

Is there a simple way to spread the volatility of one product against another? By simple I mean one trade executed on each leg rather than constant delta hedging. I can see a lot of opportunity for ...
Tom's user avatar
  • 11
0 votes
0 answers
75 views

Fx futures pairs

I want to setup a pairs trade with the Japanese yen as the quote currency and Mexican peso as the basis currency. (long MXP vs JPY) 2 /M6J contracts, notional is 1,250,000 JPY = 10966.5*2 = 21933 USD ...
JamieC113's user avatar
2 votes
0 answers
225 views

Research papers and other resources to learn about useful statistical tools for pairs trading

Brief background: I recently started writing a Python code to find stocks which might be cointegrated. I iterated over a really long list of stocks trying to find a pair which might be cointegrated. ...
TryingHardToBecomeAGoodPrSlvr's user avatar
2 votes
0 answers
43 views

Variance of trade length for the OU-process

Based on the article by Bertram (2010), I am trying to calculate the variance of the trade length stated in equation [10] of the paper. However, the weights used has a specification that I cannot ...
RVA92's user avatar
  • 121
2 votes
0 answers
175 views

What do I need the Error correction model for in the two step Engle Granger approach (bivariate Cointegration)

could someone kindly explain what I need the ECM for in a bivariate Cointegration test? I am currently trying to reproduce the results of Rad et al. (2015): "The profitability of pairs trading ...
GC2023's user avatar
  • 23
4 votes
2 answers
2k views

What is the reason for using log prices in Pairs Trading (Cointegration)?

I was wondering, why some of the research papers on pairs trading (using the cointegration approach) are using log prices to determine the spread of a pair? Why are they not simply using regular ...
Rkl4397qa's user avatar
0 votes
1 answer
578 views

Pairs trading/Cointegration confusion

I've been trying to wrap my head around cointegration. Currently I use the log returns of both stocks A and B, calculate the spread given by: $S = log(A) - n*log(B)$ where $n$ is the Hedge Ratio ...
43zombiegit's user avatar
0 votes
0 answers
188 views

Cointegration and hedge ratio

I've recently been looking into pairs trading through cointegration. So far I've used the log returns of stock A and stock B in a rolling OLS to find the hedge ratio. However, I've noticed that for a ...
43zombiegit's user avatar
1 vote
0 answers
70 views

Number of observations required for cointegration test

Hopefully a very simple one. I've got two assets daily close prices. How many observations should I use to test for cointegration between these two assets ? Any pointers wuold be great. A
AVSG's user avatar
  • 11
1 vote
1 answer
455 views

How to compute returns of a Pairs Trading Strategy with different holding periods?

I am currently working on a project where I am testing a Pairs Trading Strategy based on Cointegration. In this strategy I am considering to trade a couple of hundred stock pairs every day over a time ...
Rkl4397qa's user avatar
0 votes
0 answers
154 views

Pairs Trading Strategy Pre-Selection

I am writing paper on the profitability of the pairs trading strategy using US equities. I have done a pre-check to see which business sectors have stocks that are cointegrated. The utilities sector ...
Kazi Mashrur Ahmed's user avatar
1 vote
0 answers
245 views

Pairs Trading (Cointegration Approach) - Daily Cointegration Test

I have a question regarding the Pairs Trading strategy based on the Cointegration Approach. Most of the papers/literature I found on Pairs Trading using the Cointegration Approach are usually testing ...
Rkl4397qa's user avatar
2 votes
1 answer
443 views

What should the look-back period be when calculating Cointegration?

So I am confused as to what the look-back period should be when calculating Cointegration. By this I mean when running for example a Johansen or ADF test, should my look-back period be 6 months?...
benito.cano's user avatar
1 vote
1 answer
151 views

Should I calculate a spread using stock prices or the ratio?

So I am creating a trading algorithm thats uses cointegration, for a pairs trading strategy. Imagine there is stock A for 100 dollars and stock B for 25 dollars. My questions is when caulcating the ...
benito.cano's user avatar
0 votes
0 answers
71 views

Managing a portfolio of pair trades

When arbitraging ETF holdings against the ETF, how does one manage the portfolio over time? Assume the strategy creates a long signal in pair A (stock X/ ETF) and a short signal in pair B ( stock Y / ...
Joan Arau's user avatar
0 votes
1 answer
366 views

Pairs Trading: Normalized price series (co-integrated and correlated) always end up diverging

Need some expert advice and suggestions: I am trying out pairs trading or statistical arbitrage (as traders say). But even if two price series are co-integrated (ADF test, Hurst exponent, Ornstein–...
rockav's user avatar
  • 3
1 vote
1 answer
216 views

Why is OLS based spread not reflective of actual difference?

I'm trying to define and track the spread between two time series (data available here), for the purpose of learning pair trading basics. When running a cointegration test the two series seem to be ...
oshi2016's user avatar
  • 111
1 vote
0 answers
545 views

Constructing a Beta Neutral Hedge in a Pairs Strategy

Looking for resources / explanation. Creating a dollar neutral hedge is easy - stockprice-a/stockprice-b How do I create a beta neutral hedge? I find discussions but no explicit derivation ...
Windstorm1981's user avatar
0 votes
1 answer
424 views

Correct calculation of returns from a pairs trade

I am trying to understand how pairs trading works but I am confused about how to go about calculating the return on the pairs trade when I reverse my positions. I have been reading 'Pairs Trading - ...
user2145312's user avatar
1 vote
1 answer
53 views

What value to put in lm() function when testing for cointegration (R)

I'm a CS student working on a financial computing project + have a question regarding cointegration testing using linear regression with the lm() function. https://www.rdocumentation.org/packages/...
Tom's user avatar
  • 11
0 votes
1 answer
313 views

Generating buy/sell signals in pairs trading

I'm reading a quantitative trading book"Quantitative Trading with R" by Harry Georgakopoulos. In the pairs trading section, there's an example that creates the spread and generate buy/sell ...
xyzt's user avatar
  • 341
0 votes
1 answer
237 views

pairs trading algorithm with returns

I'm having a difficulty grasping how to write a pair algorithm using returns instead of prices. With price differences, I have the mean difference over a long time period. When the current price ...
Don Chambers's user avatar
0 votes
0 answers
79 views

Pair Trade - Should stock order matter

I am testing a simple pair trading algorithm and I'm having problems if I swap the stocks around. I don't know which stock should be X and which should be Y. When I swap them I get very different ...
Don Chambers's user avatar
0 votes
0 answers
327 views

How can I normalize price data for 2 financial instruments from different categories?

Lets say I want to build a divergence / convergence strategy with FOREX currency pair and a correlated commodity. How can I normalize the prices so that I get an accurate idea of the movements of each,...
Riley Bolen's user avatar