Skip to main content

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.

Filter by
Sorted by
Tagged with
1 vote
2 answers
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
2 answers
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 ...
0 votes
0 answers
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. ...
0 votes
1 answer
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
0 answers
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 ...
3 votes
0 answers
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 ...
0 votes
0 answers
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
0 answers
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 ...
0 votes
1 answer
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 ...
0 votes
1 answer
830 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 ...
0 votes
0 answers
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 ...
29 votes
2 answers
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: ...
0 votes
0 answers
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
0 answers
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 ...
2 votes
1 answer
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 ...
2 votes
0 answers
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
0 answers
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 ...
12 votes
1 answer
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 ...
0 votes
1 answer
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–...
5 votes
2 answers
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 ...
0 votes
0 answers
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
0 answers
88 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 ...
1 vote
1 answer
402 views

Price vs log returns - stationarity issues

I am trying to analyze the price of Bitcoin versus the number of Reddit posts about Bitcoin and the sentiment of those posts (daily). The price is I(1) while the sentiment and the number of posts are ...
2 votes
1 answer
98 views

Cointegrated time-series with a persistent spread

Assume $X_t$ and $Y_t$ represent the prices of the same financial instrument traded in two different markets (in particular they are cointegrated). For some reason the long run equilibrium between $X$ ...
0 votes
0 answers
60 views

Finding stock pairs whose spread is used for a risk neutral long-term investment

I am currently working on researching about ways to improve returns in pairs trading. I had previously posted a reference request here, where I had described a toy pair that seemed to be co-integrated....
2 votes
0 answers
234 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. ...
2 votes
0 answers
214 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 ...
0 votes
1 answer
392 views

Understanding Look Back Period

When people say look back period of 6 months, how does that data look like? Are that 6 months of raw data or a weighted average of that data? I am a little confused on how you come up with beta values ...
4 votes
2 answers
3k 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 ...
0 votes
0 answers
211 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 ...
1 vote
0 answers
83 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
63 votes
6 answers
31k views

How are correlation and cointegration related?

In what ways (and under what circumstances) are correlation and cointegration related, if at all? One difference is that one usually thinks of correlation in terms of returns and cointegration in ...
1 vote
0 answers
54 views

How do we know if cointegration is down to luck?

I have done some analysis of various pairs of tickers on the NYSE. I did a brain dead algorithm to come up with all combinations of pairs and then checked all pairs for cointegration/stationarity. I ...
1 vote
1 answer
234 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
0 answers
66 views

Given a cointegrated portfolio of stocks, how to build a synthetic option position by using the options on the stocks

The setting Let stocks $A$, $B$, and $C$ are cointegrated. Moreover, we know the weights of the cointegrated portfolio (scaled so that the absolute value of the maximum weight is $0.5$): $w_A = 0.15$ ...
1 vote
1 answer
708 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 ...
5 votes
2 answers
2k 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 \...
1 vote
0 answers
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 ...
0 votes
1 answer
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 ...
2 votes
1 answer
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?...
2 votes
0 answers
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 ...
0 votes
2 answers
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
1 answer
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
2 answers
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.
4 votes
1 answer
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
2 answers
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 ...
0 votes
0 answers
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
3 answers
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
1 answer
54 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/...
2 votes
0 answers
400 views

Johansen cointegration Test for spread generation

I'm using the python statsmodels version of the johansen cointegration test and I'm looking for some advice on how best to generate the spread used within a pairs trading algorithm. For example I've ...