Cover-your-ass clauses and gourmet FX traders

Certain long term maturing products are negotiated with conditions for early trade termination at predefined dates that either party can terminate the trade. This is common practice among interbank players to limit credit risk exposure. This is more or less financial mumbo-jumbo to allow traders to add special clauses to cover their asses. “We wanna do this deal but… just in case… let’s add a couple of get-out-of-jail-free cards in here.”

So that’s what I’ve been working on lately… Trying to ensure that our system allow Early Termination and Cash Settlement of Interest Rate and Credit Derivatives. I’d actually implemented a lot of that a while back and just needed to do some enhancements. Typically when I approach such a problem, I try to think how to encapsulate the new functionality by creating a new interface. It seems pretty evident. If you want to do more or less the same thing across a variety of dissimilar objects, figure out how to abstract out the common functionality and determine what information you need from those objects. Bam! You got yourself an interface.

Hmmm… I’m just blown away by how few people grasp this concept. Funny thing, too, is that this approach is usually harder at the onset but allows you to kick back later on by making fixes or enhancements in one place instead of 50. I just cringe when I see the same code cut-and-pasted across so many classes…. Oh, and people… If you tend to have a bunch of if clauses checking whether an object is an instance of something or other… you’re doing it wrong!

I’ve also been wrapping up Fund FX. That’s been brutal… These Japanese bankers are serious FX gourmets. They requested bulk matching of incoming MT202 messages against payments in the system. And all of that had to be recursive since it might require netting of payments, which then needed to be split to match against the incoming message amounts and, whatever residual payment could later be bulk matched with other payments. The thing drove me absolutely bonkers, mainly because I didn’t write the payment netting functionality of the system. The guy that did is brilliant with lots of business knowledge and good technical foundation, but his code… errrr… shall we say, inherits from structural programming as opposed to OOP. Ever heard of 5000 line methods? Calypso’s Back Office got ‘em! Oh the humanity…

Anyway, I’m off to San Diego for a long weekend and I’m looking forward to hanging out by the beach. The San Francisco fog, combined with the constant bombardment of CRT rays has me feeling white and pasty.

Peace,

David