Hacker News new | ask | show | jobs
by kvcc01 4061 days ago
One area I’ve seen math and programming interplay is quantitative finance, i.e., quant-developers attached to trading desks in Wall Street. In this microcosm, the people I see rise up in the world are those who started off with solid finance theory skills (which is applied math), who then taught themselves programming to be just good enough to implement their ideas. This seems doable.

The reverse OTOH seems more challenging. I’ve seen many CS graduates who tried to self-study their Black-Scholes, but rarely do they achieve anything more than a superficial understanding of the underlying theory.

[I’d except HFT from the above. That specialty seems to reward programming skills more than math skills.]

2 comments

Not a facetious but serious question, but what theoretical part of Black-Scholes is really important for a options trader's everyday trading?

I'm a programmer by trade but I trade options on the side. A long time ago, I read Hull's and Sinclair's derivation of BSM line by line. Nowadays, I totally forget all the math except the intuition as it relates to the greeks and base all my trading on those.

Talking as a non-professional, I found the math of BSM to be helpful for me to understand better the option greeks and the model's limitations (assumption of smoothness, doesn't take into account volatility simile's).

But not sure how the theory can really help me hedge better, come up with better implied volatility as compared to the current open source plug n' chug frameworks that computes Black-Scholes pricing (e.g., QuantLib).

Options trading is a hobby of mine and I'd love to hear a pro's take on these. Thanks!

The BSM will give you all the things that you know intuitively about options. Gamma is high ATM front month, Vega is higher with time, theta accelerates as you near expiry, and so on.

In everyday terms, BSM vols are also what's used to talk about what the price IS. So even if you're using a fancy model, to talk to someone else about it you pull out the BSM vol and tell him that way.

What will help you hedge better is finding a way for your surface to fit what actually happens when the market moves. It isn't an exact thing; many traders ask for a little more or a little less floating skew from their quant guy.

That's interesting. I went into finance (option MM at first) with an Engineering background, and developed more and more programming skills as things developed.

The financial stuff is IMO not complicated. Anyone (a lot of the traders left school at 16) can understand how the option Greeks behave intuitively. Since I went to uni, I picked up the classics (Hull, Wilmott, Niederhoffer) and read through them. After a while, you get it. You may not be able to derive all the little things (options on options, Asians, whatever) but you'll still have a reasonable idea of how it works.

The programming side is a whole other can of worms. You think you get it. Take Excel. Put in BSM. Make a vol surface. Do a VLOOKUP on a grid, remembering to do the $ signs. Float it to adjust the calls when the market rises. Hey, it's easy right? You can just make some VBA code, dump it somewhere. Put some intermediate calculations on a hidden sheet.Boss wants an alternative model? Copy-paste and edit the formula. Call Bloomberg for some data on another sheet, use it to calculate some parameter. Save it as ESX-jumpmodel.xls. There's a get-it-done-quickly mindset that isn't great, but creates the illusion of working well.

Code written by finance people has a reputation for being incredibly spaghetti-like.

When I started off coding, I thought it was easy too. But it's the most time consuming part of all my financial work. Each time I had some new interesting thing to do, a huge gap in my knowledge was uncovered:

- Started using Excel to do end-of-day reconciliation, the bottom rung task of junior traders. Took me a week to do something that today would take me half an hour.

- Coding a NIG model to price options: took me ages as well, and the guy at the trading software company said it was easy. Spent a LOT of time getting Cygwin to work, had to go through loads of compile fails in gcc (I didn't even know what that was when he told me). What's static typing? Why can't they all be variants? The easy part was finding a formula for the Bessel function.

- Coding a spreadsheet for fixed income arbitrage: once again the easy part was understanding basis, swaptions, asset swap, carry. The hard part was organizing all these sheets in a sane way, for 10 currencies and terms from overnight to 50 years. Also, calibrating/fixing conventions was easy. Call your broker, ask him what he uses for his curves.

- Writing an FX feed multiplexer. Easy on paper: you get a better price by comparing feeds from different banks and picking the best one. In practice: you need to read all the intricacies of the FIX protocol. You need to know how service oriented architecture works (all those banks aren't going to run in a monolith, are they?). You need to know how a network works. You need something that isn't Excel, so now you need a UI as well. Oh, and you're saving trades in a database, right? Hello SQL 101.

- Glueing a trading engine on to the multiplexer. Easy on paper: model tells you what to trade, and you already have a multiplexer. Now you need the UI changed to put knobs on the model. And you're sure you won't machine gun the trades right?

- Making a thing that looks at the orderbook to trade: now you need to be fast. Is the math any harder? IMO no. But what does fast mean to a guy who's never had a speed issue? What's c++ anyway? And why is there an allocator on all the constructors? How do profiling tools work? What's this 200ms delay (I kid you not, forgot Nagle once!)? Why does everyone talk about Big-O? It never came up when I was does the spreadsheets.

- Making a thing that looks at an exchange binary feed: uhm, what's binary? What is this endianness? What's a lockless ring? What's a kernel, and why do I have to bypass it? Branch prediction? False sharing? Cache invalidation?

IMO it would all have been easier to teach a CS grad about finance than a finance grad how to program.