One of the joys of C++ is the way the state of the art in the language periodically renews itself. I started coding in C++ in 1992 (!?!). I spent a couple of years away in 2001 & 2, and when I came back to C++ in 2003 the generic programming movement led by the likes of Stepanov and Alexandrescu had renewed the language. _1 indeed ! And now it feels like it’s happening again. LMAX put me onto the lock free meme a couple of weeks back. There’s a Herb Sutter article on lock free queues out there, folks on stackoverflow say it’s difficult, Hack the Market has blogged about FastFlow, and there’s a “Boost” lock free lib.

Fascinating blog on HFT implementation from WK. He commnts “a variation on this structure is to store the Limits in a sparse array instead of a tree. ”  More detail on the implications for L1 and L2 cache behaviour of trees versus arrays for limits would be welcome. I’m assuming C++ implementation here of course, though WK points out you can make Java go fast if you avoid GC, which chimes with the experience of the LMAX guys. I ask because I interviewed with a big HFT firm last year: they gave me a programming exercise based on L1/2 cache behaviour.

It was a bit of a struggle to get STLport 5.1.3 to build with VC9/Visual Studio 2008. I got some hints here, but also had to remove the .rc dependency from and jiggle LIB and INCLUDE env vars to pick up headers and libs from an MS SDK dir separate from the Visual Studio dir. Then an nmake /fmsvc.mak dbg-shared did the trick. Of course I’m not building with debug iterators – I do value my sanity !


The Greatest Trade Ever

February 1, 2011

I’m reading Zuckerman’s Greatest Trade Ever, an accout of how John Paulson’s hedge fund profited from the credit crunch. There’s a lot of anecdotage and general background. But among all that there’s some good detail on implementation. How to implement a view of the markets as a trade is a key question for any trader. Drobny’s House of Money is excellent on this. Zuckerman’s book as some good stuff on why shorting the bonds or equity of home loan origination companies didn’t work, why CDSs on sub prime MBSs didn’t become tradeable til 2005, and why they were the right vehicle for shorting. Also on why using CDSs means negative carry, and why that’s generally a difficult thing for any portfolio. Taleb has some good comments on why his out the money options strategy suffered from the same problem.