Tag Info

Hot answers tagged cointegration

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

6

I know this was asked almost two years ago, but I thought I'd answer the question. It appears that the H that you want to estimate is identical to the values you received from the Johansen test, with the exception of rows 1:4 and columns 2:4. You only need to set those values to zeroes and ones, which is fairly easy considering that the diagonal is (very ...

6

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

5

I'm assuming that the paper you're referring to uses the Engle-Granger test for cointegration. The standard test procedure checks for unit roots in the residuals of a linear regression. It is a "stylized fact" to econometricians, who tend to be the ones publishing papers on pairs trading, that log prices better linearize the features and hence ...

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

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

4

Technically, if you do PCA on the yield curve (live dangerously!, do it in levels), the first two PCAs are nonstationary. The third is questionable. Note that this is a perfectly valid way of looking for stochastic common trends (see Madalla-Kim, Unit Roots, Cointegration and Structural Change for refs). The fourth principal component is stationary by most ...

3

Before making regression you have to perform test on fractional integration on each component. The power and size of traditional unit root tests are poor. The tests’ weak power implies that the statistical tests cannot distinguish between a unit root process and a fractionally integrated series with long memory (Baillie, 1996). As a consequence, a mean-...

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 I think you fail to understand Multivariate Garch model such as DCC models since they do take into account non linearity. They are interested in jointly modeling the time series behavior of multiple conditional variance processes. Each couple of series has its own particular conditional correlation process evolving trough time in a non-linear way. In fact ... 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 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 Assuming we are talking about Pearson correlation, then we may apply the triangle inequality. Let$\rho(X,Y)$denote the correlation between$X$and$Y$. Then,$(1-\rho(X,Z))^{1/2}\le (1-\rho(X,Y))^{1/2} + (1-\rho(Y,Z))^{1/2}$3 This is for better linearity/normality in the QQ plot at the tails, which as both @noob2 and @rkr allude to, give a better fit and hence better properties for normalizing the residuals with z-scoring later on. 2 If you are using Spatial Econometrics toolbox in Matlab you could use the lrratio function which implements a sequence of such tests beginning at a maximum lag (specified by the user) down to a minimum lag (also specified by the user). (more info in http://fmwww.bc.edu/ec-p/software/matlab/mbook.pdf) 2 In a recent paper - Cointegration and Relative Value Arbitrage by Binh Do and Robert Faff, the issue of relative value arbitrage with three stocks is addressed. On page 27 they formulate the cointegrating relation similarly to how you did: $$\ p_{1t} = \alpha + \gamma p_{2t} + \beta p_{3t} + \epsilon_t$$ They also say that the dollar weights of the asset ... 2 I would say that you can use Johansens methods to test for rank of co-integration matrix. There are tests for that. If there is no co-integration vector present and both series are I(0) then there is no co-integration. Series still might have some short-run dynamics. If series are I(1) and no con-integration vector is present then modeling these series by ... 2 VAR can be applied only if the input series are stationary otherwise VAR may result in spurious correlation. So just evade it. Now the solution to treat the non stationary series to go for cointegrated series (ca.jo test) and if cointegration is viable then build VECM (Vector Error Correction Mechanism). This incorporate the short and long run relationship ... 2 Yes, that can be really sophisticated even using such nice tools as pandas. But the basic idea is to find position enters & exits to derive cashflow. Here is my code to derive all that stuff from generated signals (in my backtester signals are fractions of 2 stocks in portfolio for each moment). I hope I've found all bugs here, but no warranties. ... 2 Johansen test estimates the rank (r) of given matrix of time series with confidence level. In your example you have 2 time series, therefore Johansen tests null hypothesis of r=0 < (no cointegration at all), r<1 (till n-1, where n=2 in your example). If r<=1 test value (6.39) was greater than a confidence level's value (say 10%: 7.52), we would ... 2 For Engle-Granger, I can see that you are returned a vector of 2 elements for each of the output arguments, hence you run two tests there. For the sake of clarity and the education of people interested in the post, we can say that: Since your$hValues$are both zero, we can say that there is a failure to reject the Null Hypothesis, which in this case is (... 2 The Johansen test can be used to test for cointegration among$n$assets. https://en.wikipedia.org/wiki/Johansen_test The original paper: Johansen, Søren (1991). "Estimation and Hypothesis Testing of Cointegration Vectors in Gaussian Vector Autoregressive Models". Econometrica. 59 (6): 1551–1580 2 You have estimated a cointegration relationship between$T_i, S_i$. $$T_i=\hat{\beta_1}+\hat{\beta_2} S_i + \hat{u_i}$$ For each new observation$(T_{new},S_{new})$, replace to the existing equation and find the residual$\hat{u}_{{new}}=T_{new}-\hat{\beta_1}+\hat{\beta_2} S_{new}$. Standardize this value with$$\frac{\hat{u}_{{new}}-\bar{\hat{u}}}{\... 2 It's difficult to follow parts of your question because of the notation. Throughout your formulas, I'm not sure where$X_t$is an input to your regression and$X_t$is what you've defined as spread. At least, that’s my excuse if I don’t answer your question properly. Using MLE to estimate$\beta\$ won't answer whether or not your two time series are ...

2

A more appropriate approach is to sum your PNL each day across all of your positions and calculate the return for the book as a whole (assuming I understand your question correctly). Return should be based on your bankroll/AUM/capital allocation, not your notional positions.

1

Firstly i think if you use log prices then γ shows by how much B stock growth rate outpaces A stock growth rate, but I don't understand why Ernie says that you need to hold market values fixed, if you do this then how are you going to profit from the spread? Secondly there are typos in the return calculation: log(20.1)-log(19.5) = 0.03 not 0.3. Which refers ...

1

Simulate Random Walk Series We can now simulate a random walk series in R as shown below: RW <- arima.sim(model= list(order = c(0, 1, 0)), n=200) We can plot the newly generated series as well using the plot.ts() function. plot.ts(RW,main="Random Walk", col=4) Random Walk with Drift RW_drift <- arima.sim(model= list(order = c(0, 1, 0)), n=...

1

Two cointegrated series contain a single unit root. Each series can be formulated as the sum of a common unit root plus a stationary component. Most textbooks covering cointegration will cover such formulations - see Hamilton's (1994) discussion of Phillips' "triangular representation" of a cointegrated vector, for example. Simulating is likely to be easy (...

1

Yes, you're right. Choosing a fixed lookback period allows you to find more couple of candidates to implement a statistical arbitrages, but it is misleading, in the sense that, looking back, it leads you in finding the period in which a couple of assets are cointegrated and not a couple of assets are really cointegrated; So, what could be the solution to ...

1

I think there is no quantitative method, but one can use some common sense based on how long one is willing to hold the position. For instance, if you don't want to hold a position in oil futures for more than a month, using a 10-year window is of no use even if the annual oil price is stationary. In practice, the trader probably tests a few windows whose ...

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