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 stocks at a time.

I have several securities, but for each test I only test two at a time.

If two stocks are found to be cointegrated using the Johansen test, the idea is to define the spread as

beta' * p(t-1) - c

where beta'=[1 beta2] and p(t-1) is the (2x1) vector of the previous stock prices. Notice that I seek a normalized first coefficient of the cointegration vector. c is a constant which is allowed within the cointegration relationship.

I am using Matlab to run the tests (jcitest), but have also tried utilizing Eviews for comparison of results. The two programs yields the same.

When I run the test and find two stocks to be cointegrated, I usually get output like

beta_1 = 12.7290

beta_2 = -35.9655

c = 121.3422

Since I want a normalized first beta coefficient, I set beta1 = 1 and obtain

beta_2 = -35.9655/12.7290 = -2.8255

c =121.3422/12.7290 = 9.5327

I can then generate the spread as beta' * p(t-1) - c. When the spread gets sufficiently low, I buy 1 share of stock 1 and short beta_2 shares of stock 2 and vice versa when the spread gets high.


~~~~~~~~~~~~~~~~ The problem ~~~~~~~~~~~~~~~~~~~~~~~


Since I am testing an awful lot of stock pairs, I obtain a lot of output. Quite often, however, I receive output where the estimated beta_1 and beta_2 are of the same sign, e.g.

beta_1= -1.4

beta_2= -3.9

When I normalize these according to beta_1, I get:

beta_1 = 1

beta_2 = 2.728

The current pairs trading literature doesn't mention any cases where the betas are of the same sign - how should it be interpreted? Since this is pairs trading, I am supposed to long one stock and short the other when the spread deviates from its long run mean. However, when the betas are of the same sign, to me it seems that I should always go long/short in both at the same time? Is this the correct interpretation? Or should I modify the way in which I normalize the coefficients?

I could really use some help...


Under some of my tests, I reject both the hypothesis of r=0 cointegration relationships and r<=1 cointegration relationships. I find this very mysterious, as I am only considering two variables at a time, and there can, at maximum, only be r=1 cointegration relationship. Can anyone tell me what this means?

All the best, Johan


1 Answer 1


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-reverting time series is incorrectly considered as a unit root process. The residual also could be fractional and therefore bad mean reverting.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.