Cointegration Hedge Ratios and Position Sizing in Pairs Trading
Summary
The document examines how cointegration residuals can generate pairs trading signals and why equal dollar positions do not guarantee a profitable convergence trade. The questioner estimates a linear relation between two asset prices with an intercept, then opens a trade when the residual crosses a threshold and closes it when the residual returns toward zero. Their algebra shows that the residual’s movement alone does not ensure positive profit for equal dollar amounts.
The responses emphasize matching quantities to the cointegration coefficient: for a relation in which one asset moves twice as much as the other, the illustrative hedge sells one share of the first asset and buys two of the second. This targets exposure to the modeled spread rather than equal capital allocation. The discussion is brief and does not provide a full backtesting framework, address estimation error or transaction costs, or settle the details of the Gatev method raised in the question.
Key ideas
- A cointegration residual can be used to define entry and exit signals for a pairs trade.
- Equal dollar allocations do not necessarily track the stationary spread or ensure a positive convergence profit.
- Position quantities should reflect the estimated cointegration coefficient when hedging the modeled relationship.
- The example links a two-to-one price relation to selling one share of one asset and buying two of the other.
- The discussion does not cover transaction costs, parameter instability, or a complete backtesting method.
Tags
Full text
# Pairs trading: Question on non-negative profits, size of the positions and trading signals # Pairs trading: Question on non-negative profits, size of the positions and trading signals I'm trying to backtest Pairs Trading but have become a bit confused on the different methods of selecting pairs, how to look for trading signals and what size of the positions to take in the assets. What I'm doing right now is that I'm testing for cointegration amongst pairs, which I'm doing with Engle-Granger to get the coefficients in the stationary linear combination of the assets. $X_t = bY_t+a + \epsilon_t$ After that I check the residual $\epsilon_t = X_t-bY_t-a$ for trading signals. If the absolute value of the residual is larger than some predetermined amount I would open the trade. The trade is closed when the residual is reversed back to 0. When receiving a signal, I want to trade long/short with equal amounts (1 dollar long/short), as in Gatev et al. and many others. But what I realized is that using these signals and this residual you could actually make a loss from a long/short position with equal amounts. So I tried to figure out how they (Gatev and others) looked for trading signals, but everywhere I look it's very poorly explained (especially in their original article). It just says that they use cointegration or OLS or something equivalent and then trade 1 dollar long, 1 dollar short etc. So what is it that they do? Do they test for stationary in the linear combination without the constant a? $X_t = bY_t + \epsilon_t$ Or is there perhaps any additional condition (in the trading signals) I could add to avoid this potential loss of incurring? Since it depends on the value of the assets at the time of closing I would guess not. Would you recommend looking at some other residual for trading signals? I know you could take positions 1 and b in the different assets to ensure no trade makes any loss, but this severely complicates the computations of the returns w.r.t. the committed capital. Because of that, I'd rather not use this method. Edit: Since I've been misunderstood, I will try to clearify what I'm asking. The profit from each trade:$P = N_x X_c - N_x X_o + N_y Y_o - N_yY_c$ if you're long in X and short in Y. Assuming our relationship from the cointegration we have the closing resp. opening we have: $X_o = bY_o + a + \epsilon_o$ where $\epsilon_o$ is larger than some value U or less than -U. If we're long in X and short in Y this would mean that its less than -U. $X_c = bY_c + a + \epsilon_c$ where $\epsilon_c$ is larger than 0. This gives us the profit: $$P = N_x (bY_c + a + \epsilon_c) - N_x (bY_o + a + \epsilon_o) + N_y Y_o - N_yY_c = $$ Let's now say we take positions 1 and b in X resp. Y. This gives us: $$P=\epsilon_c - \epsilon_o > U$$ However, if I would invest equal amounts in each asset the profit would be: $$P = Y_c/Y_o - X_c/X_o$$ which is not strictly positive. So that's why I asked what Gatev et al. (and others) used to look for trading signals. Do they model the stationary time series as $X_t = bY_t + \epsilon_t$? They mension normalised price series also, but they don't explain in detail what it is that they do. This confuses me and I can't figure it out. ## Answer by 4pie0 (score 1) https://quant.stackexchange.com/a/7473 I do understand your confusion, for someone who has already started research in these topics there might be many questions. regarding size of position: it definitely doesn't have to be 1, or generally the same in both assets. After receiving a signal you have to get into trade with sizes that are appropriate to your ideas, e.g if you want to be say 'delta hedged' or 'market nerutral' you have to choose the values that gives you... cointegration vector. ## Answer by Ashish Jalan (score 1) https://quant.stackexchange.com/a/8823 I'll try to solve your query by way of an example. $X= 2*Y + a + e$, here you go Short on $X$ and Long on $Y$, and the coefficient of $Y$ is $2$. Let's say $X=100$ and $Y=49$ (i.e. $X$'s and $Y$'s current price) and $a=1$ and also $e=1$. Now you need to execute a trade to make money when $e$ becomes $0$. So in order to make money from the trade, you will sell 1 share of $X$ and buy 2 shares of $Y$. Now where ever the price will move if your coefficients are same i.e 2 and $a=1$, the moment $e$ becomes 0 you'll make money. In this pair trade you don't need to put equal money in both $X$ and $Y$, but whatever quantity of $X$ you sell you have to buy twice quantity of $Y$. ## Answer by Clebson Derivan (score 0) https://quant.stackexchange.com/a/7471 I cannot get your point o even if it was a question, but there are another techniques to co integrate pairs. eg Johansen tests ? You just described how to implement a simple execution strategy.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.