[R-SIG-Finance] Pairs trading & cointegration

Sankalp Upadhyay sankalp.upadhyay at gmail.com
Tue Feb 23 04:29:57 CET 2010


You should be able to get information sufficient for a good project in:

EP Chan's blog: http://epchan.blogspot.com/
He also wrote a book but that is quite basic and pairs are a very
small part of it. The comments on his blog should be useful. There are
discussions on cointegration between equities and between ETFs and use
of R.

A book on pairs trading:
http://www.amazon.com/Pairs-Trading-Quantitative-Methods-Analysis/dp/0471460672
While the book is missing some important steps, it does provide a good
discussion on what can be used to select or filter pairs.

An article or discussion that uses correlation to identify pairs may
also be good for you - because as I understand you need criteria to
select good pairs out of all pairs or to filter out the bad ones.

Regards
Sankalp



On Tue, Feb 23, 2010 at 8:08 AM, Mark Knecht <markknecht at gmail.com> wrote:
>
> On Mon, Feb 22, 2010 at 6:31 PM, Brian Giarrocco
> <chrysanthemum at gmail.com> wrote:
> > First time posting here so I hope I get it right!
> >
> > I'm an undergraduate in an American University, and am Computer
> > Science/Math/Finance focused. I'm attempting to create a basic Pairs Trading
> > portfolio as a project and have found many good resources online that have
> > pointed me in the right direction.
> >
> > I have a symbol list of 50 Utility stocks w/ 500k+ ADV. I then compare each
> > symbol to every other symbol using the Dickey-Fuller test, and then accept a
> > pair if it passes with 95% confidence. Pretty simple idea.
> >
> > I created a python script to back-test different entry and exit points, but
> > the problem, as most of you may have already found -- is that the
> > co-integration does not significantly hold. The profitability seems to be
> > around 1-2% over a year period. (Profitable, but not good)
> >
> > I'm looking to expand this out, does anyone have any suggestions on what I
> > can add to tighten up the confidence of the cointegration. Is it possible to
> > add in fundamentals? Are there any good papers that deal with cointegration
> > between equities (Specifically in the US Equities Market)?
> >
> > I've posted all my code to: http://g-rock.dreamhosters.com/pairs/
> > With the hope that it may help someone in the future.
> >
> >
> > Thanks for any tips,
> > Brian Giarrocco
> > bvgiarro at edisto.cofc.edu
>
> A fairly typical answer I suspect but have you investigated using some
> overall gate to tell you to favor long or short, such as ETF for the
> utility sector or overall market direction using the SPX or something
> else like that?
>
> pairs.r did not resolve for me.
>
> Cheers,
> Mark
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.



--
--
Sankalp Upadhyay



More information about the R-SIG-Finance mailing list