15

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


15

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

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


9

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


9

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


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


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(...


8

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


8

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


8

In addition to getting the right transition model for the Kalman filter, the main obstacle to optimizing filter performance is to implement an optimal initialization. I use an iterative approach to initialize or "tune" the Kalman filter, known as adaptive tuning. I do this because I've found alternative methods of initializing the Kalman filter (such as the ...


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 = "...


6

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.


6

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


5

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


5

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


4

Let $u_t$ be the random walk $$ u_t = u_{t-i} + \varepsilon_t $$ where $\mathrm{E}[\varepsilon_t]=0$ and $\mathrm{var}[\varepsilon_t]=\sigma^2$ , i.e. $\varepsilon_t$ is stationary. Now let $$X_t = \alpha u_t +\nu_t$$ and $$Y_t = \beta u_t + \eta_t$$ where $\nu_t$ and $\eta_t$ are stationary processes similar to $\varepsilon_t$ Then both $X_t$ and $Y_t$...


4

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


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

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 (...


4

Here is a literature list from my masters thesis on stat arb. Lederman, J., (1996). Market Neutral: Long/Short Strategies for Every Market Environment, 2. – 3. lpp. Gatev, E., Goetzman, W. N., Rouwenhorst, K. G. (1999). Pairs Trading: Performance of a Relative Value Arbitrage Rule, Review of Financial Studies, Oxford University Press for ...


3

Why not use the entire data. But before you do clean the data by checking for structural breaks (t / F statistic of a dummy variable). If there exist a functional break, then you know you have to perform the co-integration tests separately for each time frames. If you use a preferable time then the question is what criteria will you be choosing this time-...


3

If you fit a VAR(p) model to two or more securities in levels, then it will incorporate the cointegration effects. If you project this to the horizon and convert back into security prices, then you will be able to calculate the distribution of profits at the horizon. In this sense you could then perform a traditional optimization. This is useful in the case ...


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

In a co-integration test you rely on the original price series -- not transformations of the price series such as rate of change and so on. Seems to me there is no need for normalization.


3

Both models are based on a spread, which has to be as stationary / mean reverting as possible. $ y_t = \beta_0 + \beta_1 x_t + \epsilon_t $ In pairs trading, $y_t$ and $x_t$ are log prices, and (e.g.) the Johansen cointegration test is used to identify candidates for a pairs trade. For entry and exit points an error correction model is used. In the ...


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\...


3

1. There are a few differences between Cointegrated ADF test and Johansen test. First of all, the former is only suitable for a pair of two time series, while the latter is also applicable for cointegration test of any number of series. Secondly, ADF test will suggest different test results when we switch the sequence of the inputs, while Johansen test ...


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