Exercise 4.21 in Papadimitriou's Algorithms was on a homework assignment I just did. It's on an extremely efficient currency arbitrage algorithm. Available here from a co-author: www.cs.berkeley.edu/~vazirani/algorithms/chap4.pdf and that chapter should have about enough background to solve the problem, if you just need a refresher.


And in a statistics class a friend is taking they were assigned a nice little problem in R on pairs trading. It should serve as an easy, clear example of a basic strategy. Here are the functions and data files that go along with it.

Nice to see some automated trading things show up in class, plus it makes the assignments a breeze for me.

5 comments:

Anonymous said...

any way you can post the R code that was given out with the pairs trading assignment?

thanks.

Max Dama said...

Sure Anon, it will take a little bit to get it from the friend fyi. I'll post it asap.

Regards,
Max

Anonymous said...

Are you referring to this book?

http://highered.mcgraw-hill.com/sites/0073523402/

Do you mind explaining what the currency arbitrage algorithm is about? I would imagine you are talking about triangular arbitrage? Or is it more of a statistical arbitrage issue (it doesnt look so)

Best
-Nik

Max Dama said...

Yes Nik, that's the book.

Actually it's beyond triangular arbitrage to consider any number of transactions in the loop. Triangular is just 3 I guess.

Regards,
Max

Max Dama said...

Anon,

The accompanying code has been linked to in the note above. Thanks for catching that it was missing.

Regards,
Max