# Questions tagged [cointegration]

Cointegration is often used in statistical abitrage as a way to identify how to combine some tradable instrument to obtain a *mean reverting* one.

136 questions
Filter by
Sorted by
Tagged with
1 vote
105 views

### How to interpret the physical meaning of cointegration vectors of log prices in real world

I'm trying to understand the physical meaning of cointegration vectors of log prices in the real world. For example, if I have two assets $A$ and $B$, and Johansen test gives us a cointegration ...
1 vote
126 views

### Can the coef be negative in cointegrated stocks?

I'm searching for cointegrated stocks using the Python CointAnalysis library. While computing stock prices on a 5 mins time frame, I found that the stocks MNST (Monster Beverage Corp.) and KDP (Keurig ...
68 views

### Mean-reversion strategy with bonds

I’m developing a mean-reversion trading strategy involving two bonds and have successfully identified a cointegrating relationship between them. This gives me a hedge ratio (beta) for my positions. ...
50 views

### Do i do a long/long or short/short of the trading pair when they have a negative cointegration coefficient?

A pair of stock that I have been trading has a negative cointegration coefficient (Beta) that is statistically significant. When i want to long a spread, according to the spread equation below, I ...
1 vote
67 views

### How to deal with vectors that are orthogonal to cointegration vectors?

In the context of cointegration, when we have the long-term equilibrium defined as $\mathbf{\beta}\mathbf{p} = \eta$, introducing an arbitrary vector $\mathbf{v}$ that is orthogonal to $\beta$ doesn't ...
265 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 ...
82 views

### Pair trading with strong positive correlation in asset return and cointegration

I am a newbie exploring pairs trading. The main idea is to short-sell the relatively overvalued stocks and buy the relatively undervalued stocks based on the mean-reverting properties of the spread ...
1 vote
76 views

### Is my spread calculation correct?

I have automated Pair trading strategies running on both CME Futures and cryptocurrency perpetual pairs. I can chose between different spread calculation type and I noticed that the one I thought was ...
112 views

### Mean-reversion strategy with overnight gaps

When using stocks as time series data, it is common to encounter large overnight gaps, sometimes because of earnings, other times because of press releases. So, how to correctly account for this ...
830 views

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 ...
58 views

### Generalization of pairs trading to portfolios?

Standard pairs trading only trades one security against another. In principle, nothing is stopping one from trading a portfolio of N stocks. There must be work on this? If so, can you point me to any ...
15k views

### How to interpret the eigenmatrix from a Johansen cointegration test?

I ran a Johansen cointegration test on 3 instruments, A B and C. The results that I got are: ...
46 views

### Does cointegration test of exogenous variable with Y variable make sense when doing ARIMAX/SARIMAX?

The cointegration test between two time series variable is generally relevant from my understanding when you are performing a regression model. In terms of ARIMA model the approach is straightforward ...
1 vote
81 views

### How can one, from regular predictions of high & low prices of a security, their variances and error covariance, construct a trading strategy?

Suppose I have an algorithm that provides a prediction of the daily high and low of some security n periods in the future, a confidence interval for each of these predictions, and the correlation ...
268 views

### Critical values of trace statistic of Johansen cointegration test for arbitrary number of I(1) variables

I am trying to find the critical values of the trace statistic Johansen cointegration test for a large number of I(1) variables. However, I cannot find these values tabulated anywhere beyond n = 12 ...
134 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 ...
1 vote
101 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 ...
2k views

### Does Chan use the wrong state transition model in his Kalman filter code?

In his book, Algorithmic Trading: Winning Strategies and Their Rationale, Ernie Chan shows how to use a Kalman filter to improve the returns of a cointegrated portfolio. Recall that the state equation ...
409 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–...
465 views

### Cointegration between crypto markets

I'm having an hard time understanding how cointegration works. Basically i'm trying to find cointegrated pairs in the crypto market, so i do the following: Get OHLC data for the two markets (i'm ...
87 views

### How rare is cointegration in the case of stocks?

I did some cointegration tests on a 50 stocks sample, whith which I created pairs. I used the Engle-Granger approach and the Johansen approach, both of them gave me a high percentage of cointegrated ...
1 vote
88 views

1 vote
319 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 ...
1k views

### Calibrating the Ornstein-Uhlenbeck process with an additional parameter

Firstly I find the spread between two cointegrated time-series $Y_t$ and $Z_t$ by finding the best slope parameter $\beta$ in the equation $spread_t = Y_t - \beta Z_t$ (via Cointegrated Dickey-Fuller ...
706 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?...
153 views

### Cointegration where first differences are not jointly stationary

Note: This is a crosspost from this post on cross-validated, where it did not receive an answer. I thought I might have better luck here. I am looking for a rigorous and general treatment of ...
302 views

### lead lag relationship among futures, options and stock prices

I have the data of past 10 years of NIFTY (the National Stock Exchange of India) stock, futures and options and I want to show the lead-lag relationship (which reacts first, futures, options or stocks)...
1 vote
180 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 ...
1 vote
1k views

### Simulate non-stationary time series with cointegration

how can I simulate/generate two non-stationary time series (with unit root) so that they can be also cointegrated (using R or Matlab). Thanks in advance.
806 views

### What is the logic of the eigenvectors of the Johanson cointegration test determining hedge ratios?

Reading Algorithmic Trading: Winning Strategies and Their Rationale, Ernie Chan and there is a short section about the Johanson test for cointegration where it is mentioned that the eigenvectors ...
1 vote
256 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 ...
274 views

### Understanding output from Johansen Cointegration test

I have a VECM model that Im using to determine the revenues for a firm, based on factors like Interest rates, S&P 500 and company specific variables, as follows: Stage 1: $$z_t= a+ bX_t+e_t$$ ...
1 vote
1k 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