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.
107
questions
1
vote
1answer
37 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 ...
0
votes
1answer
69 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 ...
1
vote
0answers
78 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 ...
2
votes
1answer
83 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?...
0
votes
0answers
32 views
How to understand the results of the Johansen test?
So I now there are numerous pages on the johansen test, and what the results mean. Though I am confused as to what it is doing exactly. So my understanding is that it will find the spread of 2 ...
1
vote
1answer
75 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 ...
0
votes
0answers
54 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 / ...
0
votes
1answer
111 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ā...
1
vote
1answer
117 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 ...
1
vote
0answers
99 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 ...
0
votes
1answer
117 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 - ...
1
vote
1answer
42 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/...
0
votes
0answers
42 views
Sizing a beta neutral Pairs trading with an allocation limit
Hopefully a simple one for someone.
I've a pair of stocks A and B. The beta adjusted spreads tell me I need to be selling A and buying B, my beta for B is 1.5, so in order to get a beta neutral pair ...
0
votes
1answer
173 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 ...
0
votes
1answer
130 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 ...
0
votes
0answers
54 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 ...
0
votes
0answers
88 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,...
2
votes
0answers
521 views
Calculating % Return in Pairs Trading Strategy
Hi guys Could you help me here?
I would like to calculate the return of a Pairs Trading strategy. For example:
18/11 - Open the Trade: I will go long on A and Short on B:
Stock A : $ 32.24
Stock B ...
2
votes
1answer
160 views
Pairs Trading parameters
I am looking to optimize the open/close signals and time for a pairs trading strategy my partner and I are researching. We don't want to go p-hacking so we have been trying to decide:
We have 20+ ...
4
votes
1answer
63 views
Negatively Correlated Assets with similar medium-term trends
Theoretically, one could have stock prices with returns $\rho_1(k)$ and $\rho_2(k)$ having mean values $\mu_1$ and $\mu_2$, but still be negatively correlated with
$$
\mathbb{E}[(\rho_1(k)-\mu_1)(\...
2
votes
1answer
182 views
Pairs Trading situation with spread changes
I'm setting up pairs trades by summing the distances squared (SSD). After determining the best pairs, I have to track the spread between the normalized prices. Am I noticing something that is ...
2
votes
1answer
180 views
Bootstrap Method for Assessing Pairs Trading Performance
After reading this paper I tried to replicate it. I almost done, but I am stuck on the section 3.6 where the author constructs a random pair (how he constructs this?) for Assessing Pairs Trading ...
4
votes
3answers
446 views
Pair trading - short / long the spread
I am wading into pair trading concepts. Here is one article I've read.
I understand for these strategies our intention is to go long on one asset and short another, however I do not understand what ...
2
votes
1answer
167 views
generalisation of cointegrated stock pair strategies to multiple cointegration
Question: as it is well known, there are strategies to trade pairs of stocks which are known to be co-integrated. See for instance here:
https://medium.com/auquan/pairs-trading-data-science-...
1
vote
0answers
78 views
Pair trading: Hege ratio by price ratio or by regression on the stocks
So I feel things like this question do exist on the site however I failed to form a conclusion based on what was written, so I decided to formulate my query as exactly as possible and hopefully anyone ...
1
vote
0answers
136 views
Pairs trading strategy: Portfolio returns and NAV
Currently trying a pairs trading approach using cointegration. Tried both formations:
$$log(P_t^A)=log(P_t^B) \hat{\gamma}+\hat{\mu}+\epsilon_t \hspace{0.5cm} (1)$$
$$P_t^A=P_t^B \hat{\gamma}+\hat{\...
0
votes
1answer
65 views
Short sale and zero investmest strategy
Suppose I want to build a pairs trading strategy. Theory says that we can create a zero-investment portfolio by going long stock A and short-selling stock B, given a certain hedge ratio. My question ...
5
votes
2answers
984 views
Cointegration and Ratio Pair Trading
I'm having some confusion doing Engle-Granger Cointegration test and then trade the ratio.
Methodology:
Run an OLS fit for A and B price time series without a constant. Therefore,
$\hat{Y} = \gamma \...
3
votes
3answers
575 views
Calculating Sharpe Ratio with dynamic position sizing
I'm currently backtesting a mean reversion pairs trading strategy. However, instead of simple long or short trading signals, I'm using multiple "levels", where the further away the spread is from the ...
1
vote
0answers
254 views
Pair trading strategies in fixed income
We usually hear about finding cointegrated pairs of stocks in pair trading, but it seems it is not as developed in fixed income despite the fact that the spectrum of securities is large (different ...
11
votes
1answer
10k views
How to calculate Sharpe Ratio from $ returns?
I have a pairs strategy that I am trying to calculate the sharpe ratio for. Currently I am using python for my analysis and calculation. I have a dataframe that contains the cumulative returns in $'s ...
2
votes
3answers
569 views
If two price series are cointegrated but not correlated, how do I find the hedge ratio?
Mathematically, what is going on here?
1
vote
2answers
155 views
When constructing a cointegrating series, does choosing the linear regression with the lowest ADF test statistic yield the optimal hedging ratio?
Multiple sources say that you should find the optimal hedging ratio between two stocks in a pairs trade by conducting 2 linear regressions (with each stock as the independent variable), and using ...
0
votes
2answers
821 views
Standard deviation of a long-short portfolio with net position zero
I've come across the following question and I'm slightly stuck in answering it:
Suppose you have a two-stock portfolio that is long one stock of asset
A, and short one stock of asset B, with A ...
1
vote
2answers
905 views
Cointegration vs combination of returns
Hi Quantitative Finance,
I understand that there are a wealth of pairs trading models out there. Recently, it got me thinking as to why we go through the trouble to find cointegrated pairs while we ...
8
votes
3answers
891 views
Why isn't it appropriate to use correlation between prices in a pairs trade strategy?
I've already seen this question and read through all the answers, but I'm still confused about why you shouldn't use price correlation in a pairs trade strategy.
For example, if I'm looking at the ...
2
votes
1answer
189 views
Is this the correct way to hedge two securities against each other?
Let's say I believe that $ts_1$ and $ts_2$ move together and I would like to pairs trade them. Am I correct in understanding that to hedge them against each other I would get their $Var_1$, $Var_2$, ...
1
vote
1answer
1k views
How to “Standard Beta Hedge”?
Let's say I have 2 time-series, how would I "standard beta hedge" them against each other? For example, what if the position in 1 timeseries is 100 shares at 16 USD per share. Another time-series is ...
1
vote
0answers
304 views
Cointegration and pairs trading
I have intuition that cointegration between elements of pair of equities somehow contradicts pairs trading strategies. Because the better is linear fit of the model the less opportunities we have for ...
1
vote
1answer
7k views
Calculating the returns of a long/short strategy
I feel like an idiot asking this but i haven't found the answer anywhere.
I have backtestest a paris trading strategy, while calculating the returns of the strategy I run into some problems when the ...
2
votes
0answers
188 views
Relative Value Trading of American Style Options on Futures, Calcuating hedging ratios?
I am interested in Relative Value Trading of American style options on futures and have not found a whole lot of literature on it. The best resource I have discovered so far is a few pages in Colin ...
1
vote
2answers
293 views
pair trading - rolling adf test
I am testing a pair trading strategy. Every day I recalculate the hedge ratio using the past N prices of the 2 underlying. With the hedge ratio, I calculate the past N spreads and do an ADF test to ...
1
vote
1answer
914 views
calculating the pair weights from log price hedge ratio
I am calculating the hedge ratio using log prices:
$$
\ln(A) = \text{hedge_ratio} \cdot \ln(B)
$$
How do I convert the hedge_ratio into a number of shares of A vs....
3
votes
1answer
277 views
How do you decide what time frame you're going to use when testing for cointegration?
I've been fiddling around with different time frames when doing tests for cointegration between two timeseries, and I've realized that the dates that you use for your start/stop of the test will ...
0
votes
1answer
381 views
How can I apply error correction model in pairs trading?
I have read Vidyamurthy and others, but did not find clear example of error correction model (ECM) application in pairs trading.
How should I use the ECM model in the pairs trading?
How to use ECM ...
1
vote
2answers
4k views
Close or Adjusted Prices when Backtesting
I've been doing this for some years now, but recently, since I started fiddling around with an old pairs trading strat of mine again, when updating the databases before running the tests, I was ...
-1
votes
1answer
797 views
pair trading cointegration - calculating shares quantities traded, portfolio value and returns
I have a trading strategy based on the cointegration of X and Y where beta derived from the regression is 0.7. My initial capital to invest is 1000.
My understanding that the quantities of X and Y to ...
1
vote
1answer
431 views
What causes poor returns in pair trading of very cointegrated securities?
I've been running some backtests of a pair trading strategy on 1 year worth of 5 min bars of two securities and I've noticed pretty poor returns, especially once transaction costs are taken into ...
0
votes
1answer
403 views
How buying/selling pairs and entering/exiting trade works in pairs trading?
Lets say I have two stocks x and y and their corresponding stock price p(x) and p(y). consider HR as hedge ratio. Then we can calculate the spread using this equation.
$spread=p(x)-HR*p(y)$
from ...
5
votes
1answer
2k views
What is the pseudo code for a pairs trading strategy?
I am trying to learn about pairs trading strategy. I know that we have to long and short cointegrated assests simultaneously. But I still have some confusion in how the strategy works. I wrote the ...