how to calculate the mean reversion of stock pairs

slotcars12

Newbie
Messages
6
Likes
0
hi there,

I am looking to design a pair trading strategy.
Correlation can find suitable pairs. But to be profitable I need to calculate the extent to which a pair of stocks reverts to its mean spread.

I have heard co-integration can do this. But does anyone explain to me a simple way I can do this?
 
There's no simple way to do co-integration. Why don't you start with simple regression as a first step? The you can proceed to more complicated econometric methods. Eventually you'll get to co-integration.
 
can you not get most of the way there by plotting a moving average of the spread, and looking for deviation from that? or am I being a retard?
 
hello slotcars -

you're in luck, as i happen to have a phd in rocket science.

why look for reversion to the mean? i have worked to some degree with spread characteristics (not pairs/stocks however). i found it was when the spread moved away from its mean that gave better opportunities. when trading reactively back, i would often get caught out as if the spread had moved significantly past say 2 sd's then this would indicate that something fundamental had changed - the old relationship was no longer there. fwiw, i think you have to avoid those tempting opportunities that appear way out of line with the mean, and trade some middle ground. finding that middle ground is where i had difficulty.

perhaps - if i have understood you - i am banging on about your reactive 'range' trading v trend following, which i may add doesnt answer your question or offer much help.

still, did i tell you i have a phd in rocket science?
 
Trading in the box

[FONT=&quot]
I need to calculate the extent to which a pair of stocks reverts to its mean spread.
Why do you think securities will revert to the mean? Does this happen seasonally? Is there any actual reason that you believe securities have to return?
I happen to have a PhD in rocket science.
Do they still pay you guys by the hour?
why look for reversion to the mean?
Maybe he has to much time on his hands.
I am banging on about your reactive 'range' trading v trend following?
Trend following is a viable strategy, that works well when markets seasonaly adjust. This reactive range thing can be summed up in “cut your profits short,” probably works if at all, during congestion phases.
[/FONT]
 
First, a quick nod to GoldTrader - your stuff over the years has always been excellent.

Now, Martinghoul, it's my pleasure to prove you wrong :) I've seen you around, so I mean no disrespect! But there is in fact a very simple way to test two securities for cointegration. Check out this link on how to do it with R, which also happens to be open source and thus free.

http://quanttrader.info/public/testForCoint.html

Enjoy!
 
A very interesting area and a useful link.

Another simple way to do a cointegration test is to split your linear combination into five regions and assess the standard deviation of each of the five sample's mean and standard deviation. Obviously if each fifth of your linear combination has similar mean and standard deviation then it is likely to be co-integrated.

I agree with GoldTraders thoughts on often a significant break on the linear combination (mean-diverging breakout) can indicate things have changed and hence may continue for some time. However I also think their is value in mean reverting strategies (SlotCar) as well provided risk is managed.

Perhaps the idea behind SlutCar's mean reversion of pairs may be summarised in an example. Two companies, A and B, have identical fundamentals. They could be through of as mirror-image or cloned companies. Both are listed for the same price $5.00. One morning a large hedge fund manager wakes up with a hard on for company A and starts continuously buying chunks of company A. The price rises to $5.20 and stays there for the next few weeks while he continues to accumulate. After he has lost interest and stops buying the price falls back to $5.00 to match its fundamental value. This is an oversimplified example but still relevant of how stock may be co-integrated.
 
No, you're not being retarded. That is the best and simplest answer anyone could have given. Average is a mean. Moving average moves, which simply keeps the average, or the mean up to date.
Also, bottom line is to be on the + side of a trade, so why worry about the mean? If you want to trade based on a reversion to the mean, then wait for when your methodology indicates there will be a move to the mean, and then jump in. If it shows the mean is an S or R ,then wait for it to hit, then jump in going the opposite direction.
Maybe that is oversimplification. OTOH, maybe I'm missing something.


can you not get most of the way there by plotting a moving average of the spread, and looking for deviation from that? or am I being a retard?
 
Top