Tuesday, June 26, 2007

Trading Options with C#

As a financial technology professional of many years, I have witnessed far more technology battles than I would care to remember. C, C++, Objective-C, Smalltalk, Java, Visual Basic, Perl, Python, Tcl, SQL, XML, Windows, NextStep, SunOS, Linux. . . there was always someone ready to champion the next great technology platform, especially if it was different from what was already being used by the majority of the development staff. Unless, of course, they happened to be a lead architect/development manager/CTO who actually chose the current development platform. In that case, use of any other platform was considered heresy and punishable by whatever forms of torture was most readily at hand.

Now, however, I have left the technologies wars behind. I have ventured out on my own in a startup, greenfield trading group. As the sole member of our IT team, I find it remarkably easy to dictate the terms on which the tech battles will be waged. In fact, the tech battles seem to be somewhat placid. If something appeals to me and I can justify the expense of my limited time, it happens. All the implements of torture lie unused.

I am now planning to write down some of the experiences I have had to get where I am. Hopefully some will find this of interest. Some may even choose to comment, or even to ridicule. My only hope is that I can expand the somewhat insular world of high-frequency trading.

First of all, I would like to make an assertion. Microsoft's .NET framework, and C# in particular, is without doubt the best development framework ever devised for building high-frequency trading applications where latency and reliability are at issue. I can confidently say that I would be nowhere near where I am today (powering the tools for a small but somewhat successful quantitative hedge fund) if I had started in another language. I'm sure there are plenty of screens out there on which the spittle has just landed. Graeme at Enhyper, for instance, may not agree with me. However, I can say from direct experience that C# and .NET should inspire confidence when chosen for hard, high-performance tasks. (I tried to engage Graeme at his site, but comments are 'moderated' and my attempts to post a response there have so far been unsuccessful.)

I am not a purist. I certainly believe that the extra 30% or so of performance you can get from raw C can be worth it in a limited number of bottleneck areas. For instance, when writing an option pricing model, C is probably a good choice. However, for the bulk of the framework - user tools, processing engines, persistence management, object life-cycle, messaging, etc, the stuff that makes up 95% of your actual coding, C# can't be beat. Full stop.

I'll have more to say later, but I just had to get this one of my chest.

No comments: