An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20100222/67b92d76/attachment.pl>
Pairs trading & cointegration
5 messages · Mark Knecht, Sankalp Upadhyay, Christian Prinoth +1 more
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
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
I would try to find cointegrated portfolios, instead of pairs of single stocks. That might give you more stable cointegration relationships. There used to be some papers on the topic by Carol Alexander on the net. Christian Prinoth
-----Original Message----- From: r-sig-finance-bounces at stat.math.ethz.ch [mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf Of Brian Giarrocco Sent: 23 February, 2010 03:32 To: r-sig-finance at stat.math.ethz.ch Subject: [R-SIG-Finance] Pairs trading & cointegration 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 [[alternative HTML version deleted]]
_______________________________________________ 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.
EPSILON SGR S.P.A.
Sede Legale: Piazzale Cadorna,3 20123 Milano, Italia - Tel.+39 02.8810.2070, Fax +39 02.7005.7447
Capitale Sociale euro 5.200.000 i.v. - Codice Fiscale, Partita IVA e n. Iscrizione Registro Imprese di Milano 11048700154 - Albo S.G.R. n. 91 - Societ? soggetta all'attivit? di direzione e coordinamento di Intesa Sanpaolo S.p.A. e appartenente al Gruppo Bancario Intesa Sanpaolo, iscritto all'Albo dei Gruppi Bancari - Socio Unico: Eurizon Capital SGR S.p.A.
DISCLAIMER:\ L'utilizzo non autorizzato del presente mes...{{dropped:16}}
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20100223/31a02a6f/attachment.pl>