Saturday, April 16, 2005

Pairs Trading

So it looked like I was going to have a little time this afternoon to work on trading systems. I recently re-vamped and re-structured my stock database. I also added a huge amount of new data. I felt like working on some Pairs-trading. I wrote a C# implimentation of the Unilateral Pairs trading strategy in James Altucher's book "Trade Like a Hedge Fund" last summer, but I never did anything else with pairs trading strategy, but I did moniter the system using the QQQ/SPY spread off and on this past year. I don't think the system works anymore. It does seem like I see a lot of "buzz" on the internet about people using Pairs strategies...maybe that's why. Perhaps it's a crowded trade now-a-days. Anyway I had some ideas for pairs trading strategies I wanted to look at this afternoon. So I opened my control center app that I wrote for viewing the data...and I waited...and I waited...and I waited. Apparently with all the new data I've added to my database the database is now way to slow as it is currently structured. So I guess I'll spend time trying to figure out how to optimize my database instead. The first thing I did was add a new index. (about an hour ago) Now I wait for MySql to index the data.

While waiting for the re-indexing I started this blog. I've wanted to keep a trading diary for some time, but I lacked the discipline. This blog will serve as that trading diary.

Well it looks like the re-indexing worked. Now the query only takes a few minutes instead of over 15 minutes. I still need to get this faster, waiting 2 or 3 minutes to load my program so I can debug will mean for slow development.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home