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.
129
questions
0
votes
0
answers
37
views
Setting up kalman filter on basket of multiple securities which are cointegrated
I want to use mean reversion trading strategy.
I am able to find 3 stocks which are cointegrated on closing prices at daily level. Im curious on what's the trading strategy using kalman filter.
I can ...
2
votes
1
answer
77
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 ...
1
vote
1
answer
44
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 ...
2
votes
0
answers
87
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 ...
2
votes
0
answers
107
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 ...
0
votes
0
answers
49
views
How to find the formula for the (equivalent of) half-life of a VECM model
I have time-series of daily asset prices which are not stationary.
Cointegration tests show that these variables are cointegrated.
As such, I have fitted a VECM model which is well-behaved.
I want to ...
1
vote
0
answers
51
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 ...
5
votes
2
answers
390
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
66
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
84
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
300
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
87
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
57
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
225
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
175
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 ...
4
votes
2
answers
2k
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
1
answer
243
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 ...
1
vote
0
answers
72
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 ...
0
votes
1
answer
579
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
188
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
70
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
1
vote
0
answers
51
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
0
answers
58
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
457
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 ...
1
vote
0
answers
245
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
765
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
0
answers
140
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 ...
2
votes
1
answer
444
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?...
1
vote
1
answer
152
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 ...
0
votes
1
answer
368
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–...
1
vote
1
answer
216
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 ...
0
votes
2
answers
242
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)...
0
votes
0
answers
217
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
1
answer
53
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
328
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 ...
3
votes
0
answers
82
views
Law of one Price and Cointegration relationship
I have a question on the relationship between the law of one price and cointegration of (financial) time series.
To set things clear I start with something simple:
Suppose there is an unobserved "...
2
votes
0
answers
47
views
Cointegration between prices and dividends. How do I get the following expression?
Actually, I have two questions:
1.
Let us assume that expected returns are constant. Then, we have the following expression for how the prices should be determined, provided that the operators are ...
1
vote
1
answer
188
views
Trading 3 stocks X Y Z where X cointegrated to Y, Y to Z, but no other cointegration is available
Suppose you have 3 stocks, say X Y Z. You also know that
X is cointegrated to Y using some test (say ADF)
and
Y is cointegrated to Z.
However, no transitivity, and no threesome cointegration ...
2
votes
1
answer
294
views
generalisation of cointegrated stock pair strategies to multiple cointegration
Question: as it is well known, there are strategies to trade pairs of stocks which are known to be co-integrated. See for instance here:
https://medium.com/auquan/pairs-trading-data-science-...
1
vote
1
answer
119
views
when a co-integrated times series pair has broken the leash
I have two times series, say $T_i$ and $S_i$ over a reasonably large time window, and I have calculated their cointegration (using python's OLS and Adfuller) . Say that the test has passed with high ...
1
vote
0
answers
87
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 ...
1
vote
0
answers
107
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
0
answers
163
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{\...
1
vote
0
answers
78
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 ...
4
votes
1
answer
655
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 ...
5
votes
2
answers
1k
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
193
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
0
answers
68
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 ...
1
vote
1
answer
1k
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 ...
11
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 ...