# Tag Info

31

This one is quite easy: Think of a man walking his dog. He will go along and his dog will stroll along running back and forth. Man and dog are mathematically "cointegrated". As an investor you bet that the dog is coming back to his master or that the leash has only a certain length.

28

The standard story (also told by @vonjd) is of "The Drunk and Her Dog". This is based on "A Drunk and Her Dog: An Illustration of Cointegration and Error Correction" (1994). The story is itself based on the standard illustration for a random walk known as the "drunkard's walk". The Dickey-Fuller test is used to check for a unit root. It can be used as ...

26

This isn't really an answer, but it's too long to add as a comment. I've always had a real problem with the correlation/covariance of price. To me, it means nothing. I realize that it gets used (abused) in many contexts, but I just don't get anything out of it (over time, price has to generally go up, go down, or go sideways, so aren't all prices "...

14

Two time series $X_1$ and $X_2$ are cointegrated if a linear combination $aX_1+bX_2$ is stationary i.e. it has constant mean, standard deviation and autocorrelation function for some $a$ and $b$. In other words, the two series never stray very far from one another. Cointegration might provide a more robust measure of the linkage between two financial ...

12

From remote memory, The first question is Yes/No question. Is there any stationary, i.e. I(0), time series for different levels of combination r? This question is answered by your first table. For example, if [r=2]'s test stat is say 7 while the critical value of 99% confidence is 6.6 like your example, then I have over 99% confidence to say that all ...

12

Correlation is much more widely used concept and it has much more "informal" meanings. If we have only two random variables $X$ and $Y$ then correlation is simply a measure of linear dependence between the two variables: $$corr(X,Y)=\frac{cov(X,Y)}{\sqrt{var(X)var(Y)}}=\frac{EXY-EX\cdot EY}{\sqrt{var(X)var(Y)}}$$ If correlation is -1 or 1 then the two ...

10

From Quantitative Trading by Ernie Chan : "Correlation between two price series actually refers to the correlations of their returns over some time horizon (for concreteness, let's say a day). If two stocks are positively correlated, there is a good chance that their prices will move in the same direction most days. However, having a positive correlation ...

9

The main problem in your code is this line: rowSums(coef(model) * frame[, -1]) I'm not sure exactly what is does, perhaps some matrix multiplication, but definitely not what you expect it to do. Try to replace it with manual multiplication spread <- frame[,1] - (coef(model)[1]*frame[,2] + coef(model)[2]*frame[,3] + coef(model)[3]*frame[,4] + coef(...

9

Before I try to answer your question we need to establish a difference between what one wants to analyse. It is true that before modern time-series methodologies were developed, researches used "correlation" between prices as a means of analysis. However, since a Price (at a specific moment in time) is 1 value, it makes no sense to compare 2 prices with ...

8

The somewhat tongue-in-cheek blog post http://www.portfolioprobe.com/2010/10/18/american-tv-does-cointegration/ includes the example of two classes of shares on the same company. In this case you have two assets that are essentially the same but with a few details different. The buying and selling of these assets will make the prices fluctuate from each ...

8

Let us test that $x$ and $y$ are co-integrated, say that $x_t, y_t \sim I(1)$. In the Engle-Granger we test stationarity of the error term in $$y_t = \alpha + \beta x_t + u_t$$ which we estimate as $$\hat u_t = y_t - \hat \alpha - \hat \beta x_t$$ and find that $\hat \alpha =0$, $\hat \beta = 1$, and $\hat u_t = 0 \; \forall t$. So now when we Dickey-Fuller ...

8

Co-integration is a measure / indicator of the long running relationship between 2 or more time series.   A short answer to how you can use it, is the pairs trading strategy or in Econometrics can be used to formulate a regression.   using the classic example, you can use 2 stocks like Coke (C) and Pepsi (P) (or commodities such as Gold and Silver) in a ...

8

Here is a structured list of your bullet points: covariance, correlation, PCA, factor analysis, Are similar. They are based on Gaussian assumptions (i.e. correlations means dependencies) and try to identify common factors (i.e. a variable in small dimension) explaining the observed relationships. co-integration is more specific in the sense that you ...

7

Here is my code: require(xts) require(urca) # Load data gld <- read.csv("~/Downloads/CBA.csv", stringsAsFactors = FALSE) gdx <- read.csv("~/Downloads/WBC.csv", stringsAsFactors = FALSE) # Convert to xts gld <- xts(gld[, 4], as.POSIXct(gld[, 1], tz = "GMT", format = "%Y-%m-%d", tzone = "GMT")) gdx <- xts(gdx[, 4], as.POSIXct(gdx[, 1], tz = "...

7

Correlation is a property of collections of observations. Cointegration is a property of time series. The important difference is that temporal observations have one neighbour to their left and one to their right. Collections are like a set — no implicit "neighbour" relationships. Moving average is an inappropriate statistic to apply to lab ...

6

Correlation between two financial time series should be calculated as correlation of the returns (or log returns for prices). There is absolutely no relationship between correlation of the returns and cointegration. Two correlated time series can be cointegrated or not cointegrated. Two cointegrated time series can be correlated or not correlated. ...

6

Two integrated series $X_t$ and $Y_t$ are cointegrated if their linear combination (some, not any) $\alpha X_t+\beta Y_t$ is stationary. If you have $P(X_t=Y_t)=1$ for all $t$, then $P(\alpha X_t+\beta Y_t=(\alpha+\beta) X_t)=1$. So according to definition of cointegration $(\alpha+\beta) X_t$ should be stationary, which is identical to $X_t$ being ...

6

Be careful: even if you have two processes $A_t$ and $B_t$ that you find to be cointegrated (ie as explained upper you have a linear combination of $A$ and $B$ that is iid), it does not mean that you can trade it. It means that if you identified two parameters $\theta_A$ and $\theta_B$ such that $$C_t:=\theta_A A_t + \theta_B B_t \sim {\cal N}(0,v)$$ you ...

5

Such tests should always be done using adjusted prices. In fact, ideally, you should reconstruct your own price series using the total returns series. To see this, suppose you have a 10:1 split rather than a relatively small cash dividend. Then it is clear that the cointegration relationship can only hold with respect to the adjusted series.

5

Some of your question was already answered on the question you mention. Please read it carefully to understand better. In particular it answers very well how to conclude if there is co-integration or not. Also note that this question is not really relevant here both on level and subject (It is a pure statistical question and can be asked on stats....

4

I'd add: Variance reduction Fraction same sign / Hit rate Additionally, you might look at the relationship between the Q5-Q1 spread itself and the dependent (i.e. are larger/smaller spreads associated with some feature of the dependent). Turnover may also be an issue as slippage and friction come into consideration. Measures such as percent turnover in ...

4

The Augmented Dickey–Fuller test is usually used for this purpose. Again, wikipedia does a decent treatment. I would suggest using google for this before posting here. There is tons of information out there on cointegration.

4

The following paper (Identifying Small Mean Reverting) is not directly related to portfolio risk minimization but it provides a method to build tradable mean reverting portfolios based on a multivariate co-integration approach. It has the advantages of providing a theoretical framework along with two algorithms. It also takes into account financial strict ...

3

@Sergey correctly identified the problem. The explanation is that coef(model) is a vector, frame is a data.frame, and element-by-element multiplication takes place in column-major order. The shorter vector (coef(model)) is recycled along the longer vector (each column in frame). For example: frame <- data.frame(V1=1:5) frame$V2 <- 2 frame$V3 <- ...

3

Multiply each price series by its multiplier to get notional values. Then proceed as if the notional value were the price of 1 share.

3

Your intuition is correct. $X_t$ and $Y_t$ are cointegrated if there exists some linear combination $\alpha X_t + \beta Y_t$ that is stationary (or more generally, of lower cointegration index --- see for example, Hamilton, pag 571). If $X_t = Y_t$, the above linear combination is zero (hence stationary) whenever $\alpha = -\beta$. On the other hand, most ...

3

I have never read about any formal procedure for this. And, I don't remember this issue is even treated in C.Alexander's book Market Risk Analysis, Practical Financial Econometrics that dedicate a whole part to the cointegration of financial time series. One may well find tests for cointegration succeeding (failing) for a certain time frame and failing (...

3

I urge you to not compare CDS contracts and pairs with cash equity pair trades. The profiles are entirely different. CDS pairs are much more similar to being long and short an options contract. As protection buyer you are essentially long an option, you pay an "insurance premium" and that is what you are standing to lose at maximum. However, as protection ...

3

Your spread does not look similar to the random walk. Many of the observations are the same as the previous observation. This means most of the first differences are zero, which is why the test indicates your series has a unit-root. The current value is very good at explaining what the next value will be.

3

Regarding you comments, I'm adding an answer here because I will not have enough space to explain my point, so please forgive for this. Lets start from the beginning, and assume : (1) $X_t - \beta_1Y_t = \epsilon_t$ ($\epsilon_t$ is stationary) (2) $Y_t - \beta_2Z_t = \eta_t$ ($\eta_t$ is stationnary) then (1) + $\beta_1$(2) gives \$X_t - \beta_1\...

Only top voted, non community-wiki answers of a minimum length are eligible