Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
0answers
80 views

Spot trading: exact mathematical definition of the positions for a portfolio

Let us say that I want to spot trade a portfolio constituted of a pair of two stocks of respective prices (for example in USD) $S^1_t$ and $S^2_t$, and suppose for example that they co-integrate ...
4
votes
2answers
221 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
1answer
64 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 ...
1
vote
0answers
25 views

Fractional cointegration in R

I'm looking for a package (or some code that anyone has written) that will help me to estimate a VECM for fractionally cointegrated series. I.e. like the ca.jo ...
1
vote
0answers
63 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{\...
9
votes
2answers
1k views

What does the cointegration coefficient represent in pairs trading when cointegrating log stock prices?

In Pairs Trading by Vidyamurthy, on page 83 (and throughout the book), the author describes an elementary example of trading with log prices. The long run equilibrium of the basic portfolio is given ...
1
vote
0answers
32 views

Johansen Cointegration Test in R

I know its probably been asked bevor but i just don't get it. I have 2 values (Oil and corn price) and i want to check if they are cointegrated. Bevor that, i have tested if they really are non ...
3
votes
0answers
82 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 ...
3
votes
2answers
570 views

Need help on cointegration

I tried to test stock pairs for pairs trading. There are two questions I am not sure. I am not using ADF to test the log difference between two stocks. But I also see people using Johansen test. What'...
1
vote
0answers
64 views

Cointegration between daily time series and intraday time series

I am working with time series data of daily prices, and intraday prices. For simplicity sake I will refer to the daily time series as 'A' and 'B', and the intraday time series of the same instruments ...
1
vote
0answers
44 views

Is my coding for my kalman filter off when testing this specific set of pairs?

My kalman filter seems to be off for this specific set of pairs I'm looking at. As you can see, in the kalman filtered linear regression, there seems to be an outlying blue line nowhere near the data ...
6
votes
1answer
529 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
1answer
65 views

Cointegration on prices or difference of prices

Is it better to run my cointegration tests on prices or difference of prices? Difference of prices are more likely to be stationary so the results of my regression (which gives me the beta for my ...
-1
votes
1answer
96 views

Minimizing variance when searching for Cointegration

This paper by Meucci explains that in order to find a combination leading to cointegration of several series $X$, you have to find the vector $w$ which minimise the quantity $\textrm{Var}(w'X)$. I do ...
7
votes
4answers
1k views

cointegration applied to Portfolio Construction & Risk management

There are all sorts of applications of cointegration to generating alpha on mean-reverting timeseries: comparing spot vs. futures, bond spreads, identifying mean-reverting residuals, etc. But there ...
11
votes
2answers
661 views

Imposing Restrictions on Cointegrating Vectors, R example

The code given below estimates a VEC model with 4 cointegrating vectors. It is a reproducible code, so just copy and paste into your R console (or script editor). ...
25
votes
1answer
2k views

How do different methods and techniques used in pairs trading compare?

I was going through the paper of Avellaneda (2008) on stat arb and I found it interesting that he uses asset returns vs. their respective ETFs to compute the s-score. I am wondering if anyone has ...
6
votes
1answer
787 views

How to determine ratios for mean-reverting basket

Suppose I have a basket of 3 securities A, B, and C. I believe that the basket is cointegrated and I want to create a mean-reverting trade. I fit the model: $\log(A)=\beta_b*\log(B)+\beta_c*\log(C)+\...
16
votes
5answers
2k views

Are two identical time series cointegrated?

I did cointegration test on two identical time series, and the result shows that they are not cointegrated, but intuitively, I think they are. Can anyone share some thoughts on this? Thanks!
2
votes
2answers
104 views

Are there any papers about cointegration consisting of time series of more than two assets?

Are there any papers about cointegration consisting of time series of more than two assets ? I wonder if there could be any trading strategy for three assets case.
-1
votes
1answer
555 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
2answers
354 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 ...
2
votes
1answer
2k views

Johansen Cointegration Test

I just performed a Johansen Co-integration test on two stocks. The results I get are: ans = r0 r1 t1 true false I am using Matlab. Can ...
1
vote
0answers
235 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 ...
3
votes
0answers
57 views

Spurious regression between two futures with the same underlying highly correlated (cor=0.9)

analyzing the correlation between soybean and soybean meal futures in ECBOT, and making a linear regression in R between them I check with an ADF Test that the residuals are not stationary, so ...
0
votes
1answer
884 views

Cointegration results interpretation validation?

Here is how I am interpreting results of a Johansen Cointegration Test and Engel-Granger Test for A and B. The results:(Using matlab) ...
1
vote
1answer
410 views

Looking for materials regarding Pair Trading [closed]

For my master thesis, I wish to work onto Cointegration and Pair Trading. I was wondering if any of you had some scholar/blog material recommendations. Best Regards
4
votes
0answers
138 views

Why does the presence of cointegration solve the problem of spurious correlation? [closed]

Many of us are familiar with the connection between spurious correlation and its relationship to cointegration. Granger explains in his seminal 1974 paper "Spurious Regressions in Econometrics" how ...
3
votes
1answer
212 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
780 views

Johansen test on two stocks (for pairs trading) yielding annoying results

I hope you can help me with this one. I am using cointegration to discover potential pairs trading opportunities within stocks and more precisely I am utilizing the Johansen trace test for only two ...
2
votes
3answers
811 views

Cointegration pair trading - how to test a trading rule using Monte Carlo?

I am doing a research exercise where I have two price series $X_t, Y_t$ which I regress against each other and test for cointegration. Once I confirm that they are cointegrated (using CADF or ...
1
vote
2answers
179 views

Does cointegration contradict the market efficiency?

It is generally assumed that market prices follow random walks, implying market efficiency. However, one could find that some combinations of the "random walks" are cointegrated. Does this ...
0
votes
1answer
43 views

Simulating Co-Integrated Assets

I know how to simulate correlated returns, but I do not know how to simulate Co-Integrated assets. I would like to simulate a co-integrated time series where the Beta Co-Efficient is not constant, but ...
2
votes
0answers
347 views

cointegration strategy

If it can be proved that two time series $$S_t^1=\alpha + \beta S_t^2 + \xi_t$$ representing stocks are correlated, with $\beta=-2$ and then are proved to be cointegrated, how a portfolio should be ...
1
vote
2answers
109 views

Co integration of diverging time series

I have 2 time-series datasets. I am trying to find co integration between them. Now the thing is they are negatively correlated. So if I want to look at the distance between them, would I be right in ...
1
vote
1answer
63 views

How do I test if my betas form a co-integrated vector?

I have identified a model using principal component regression where $Y_t$ is explained by 4 factors such as: $$Y_t = \beta_1 X_{1t} + \beta_2 X_{2t} + \beta_3 X_{3t} + \beta_4 X_{4t} + \epsilon_t$$ ...
1
vote
0answers
83 views

how to mix trading signals for the same product?

I have multiple trading signals developed using cointegration on the same stock using various correlated assets. Is there a mathematical way to combine them to achieve better entry/exit points and ...
1
vote
0answers
423 views

Cointegration for forex using ARMA model to forecast the spread

I am working on an automatized quantitative strategy that use cointegration in Forex. I am backtesting this strategy in Python. Please see below the python file: https://drive.google.com/file/d/...
4
votes
1answer
625 views

What's the practical difference between the Johansen vs Engle-Granger tests for cointegration?

For the two-variable case, what are the practical differences between using the Engle-Granger procedure versus the Johansen test for cointegration? Is one universally more powerful than the other? ...
1
vote
1answer
2k views

Interpretation of Johansen cointegration test in R

I am using urca package of R for Johansen Cointegration test in 2 stocks datas( A and B. My question is very elementar, but have cause some problems for me. How I interpret the critical values, for ...
2
votes
0answers
448 views

Johansen cointegration test interpretation in R

I want to test my time series for cointegration using the Johansen test in R. I got the following result and so I know now that at least 5 out of 9 of my time series are cointegrated. My question is, ...
1
vote
0answers
84 views

Problem with overlapping data when testing futures market efficiency

In my case non-overlapping data would represent the scenario where futures prices (3 months) do not correspond to the futures spot prices in terms of delivery date. For example, futures settlement ...
1
vote
0answers
92 views

Estimating Daily Dynamics using Hourly Data

This article gives a nice outline of how daily data can be used to estimate cointegration on a monthly horizon. http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1404905 I'd like to use the same ...
12
votes
1answer
799 views

Alternative ways to understand time-varying comovement between two time-series?

I have been looking into ways to better understand how the dependencies/correlations/etc between two time series can vary over time. I first thought about using a Kalman/particle filter over a ...
3
votes
0answers
201 views

Assets cointegration: optimal inventory for futures market

I'm interested in HFT cointegration stratagies, and recently found interesting article "Algorithmic Trading of Co-Integrated Assets" The article describes mean-reversion strategy for N-assets. ...
2
votes
0answers
37 views

Specifying integration level of time series [closed]

Following model was estimated on 200 observations. How to specify the level of integration of $X_t?$ In brackets there are standard errors and p-value of Breusch-Godfrey test is also shown. $X_t=0,02+...
22
votes
1answer
12k 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: ...
8
votes
1answer
27k views

How to interpret results of Johansen Test?

I have two time-series a & b. The objective is to find out whether two series are cointegrated or not. I am using Johansen Test in R to find this out. I am using urca package of R. Here is the ...
2
votes
1answer
351 views

Pair trading based on cointegration - equity line

I'm preparing a project at my Uni where I have to make a simple pair trading strategy using cointegration between two stocks. I'm stuck on the equity line calculation. I have prepared opening and ...