{"id":110,"date":"2010-03-04T14:09:06","date_gmt":"2010-03-04T21:09:06","guid":{"rendered":"http:\/\/www.imaginarybillboards.com\/?p=110"},"modified":"2010-03-04T14:21:40","modified_gmt":"2010-03-04T21:21:40","slug":"high-frequency-trading-clearing","status":"publish","type":"post","link":"http:\/\/www.imaginarybillboards.com\/?p=110","title":{"rendered":"High Frequency Trading – Clearing"},"content":{"rendered":"

Prop trading shops don’t just get free access to all of the exchanges they’re on. \u00c2\u00a0Seats are expensive, and for what they’re doing, not really necessary either. \u00c2\u00a0They generally get something called Sponsored Access. \u00c2\u00a0A big company will sponsor them on the exchange in return for a fee. \u00c2\u00a0But it’s not just access to the exchange. \u00c2\u00a0If you’re a small trading company, you may have a few dozen million dollars in the real world. \u00c2\u00a0So you prove that to, say, Goldman Sachs and they say “Sure, we’ll sponsor you. \u00c2\u00a0And so you can trade more, here’s some leverage to play with too!”. \u00c2\u00a0Of course, they bill you for how much you trade, so it’s in their interest to let you leverage yourself. \u00c2\u00a0So now your measly 8 figures has turned into 10 or more figures of leveraged money.<\/p>\n

Look up haircut<\/a> sometime if you want to know how it all relates to how much you can leverage.<\/p><\/blockquote>\n

So, your sponsor takes on the risk of you trading somewhat in their name. \u00c2\u00a0At the end of the day, they have a list of what you traded, and you have a list of what you traded. \u00c2\u00a0The folks in mid-office then have to deal with your clearing firm and your sponsor so everyone agrees just what happened when the traders were out playing all day. \u00c2\u00a0The clearing firm is the go-between the two parties of the trade. \u00c2\u00a0Basically, they’re a really valuable lubricant in the wheels of the market. \u00c2\u00a0So GS gets the list from your clearing firm, you send what you think you traded, and hopefully you don’t get a call from them asking where the 10,000 shares of Berkshire are in your list.<\/p>\n

Clearing – in practice<\/h3>\n

It’s fairly simple actually. \u00c2\u00a0You get a method by which you send \u00c2\u00a0your report. \u00c2\u00a0Let’s say FTP. \u00c2\u00a0You upload it with a certain filename format to a server with a given username and password. \u00c2\u00a0Easy. \u00c2\u00a0The hard part is generating the file. \u00c2\u00a0You could have one database, you could have a hundred. \u00c2\u00a0There could be one format, or dozens. \u00c2\u00a0You could have to download and parse text files. \u00c2\u00a0And don’t forget versioning either. \u00c2\u00a0So you download all the executions you made. \u00c2\u00a0Then you have to group them by exchange, symbol, and side, and add them up and average them out. So your file goes from, say, 200,000 shares of AAPL traded to three lines:<\/p>\n

AAPL,B,100203, 190.91,blah,blah\r\nAAPL,S,101238,191.33,blah,blah\r\nAAPL,SS,2231,191.02,blah,blah<\/pre>\n

You combine all of them together for that particular exchange, in that particular format, and upload it to \u00c2\u00a0your firm. \u00c2\u00a0They compare it with their (much simpler to generate, because they only have one potential input) file and if there’s a problem they email and\/or call. \u00c2\u00a0It’s a surprisingly simple program in perl. \u00c2\u00a0Collect your data from all the different sources, put it into a huge hash, print it out to a file, upload it. \u00c2\u00a0Put in error checking and notification. \u00c2\u00a0Do this for every exchange you trade on, at the specified time(s) daily.<\/p>\n

Only two important things to note:<\/p>\n

If that file is wrong or doesn’t get uploaded – they don’t trade the next day until it’s fixed.<\/p>\n

“The next financial crisis will be caused by a divide-by-zero error in someone’s perl script” (Citation needed)<\/p><\/blockquote>\n

Compliance<\/h3>\n

A huge amount of time and money is spent on compliance at these firms. \u00c2\u00a0And at the same time it’s a total afterthought. \u00c2\u00a0The traders rule the roost, and they don’t care about it – \u00c2\u00a0until they can’t trade anymore or their bonus is lower because of a failed audit. \u00c2\u00a0Essentially here’s what it comes down to. \u00c2\u00a0You have to keep track of every trade and every order you make, and keep it forever. \u00c2\u00a0Sure, they say seven years, or five years, but it’s forever. \u00c2\u00a0For one – seven years really is forever in computer terms. \u00c2\u00a0Creating something that’s archivable over that long is essentially creating it forever. \u00c2\u00a0And for two – there’s nothing saying that a year from now they won’t want the records for 10 years, or 15 years.<\/p>\n

So you’re keeping track of every order and every trade. \u00c2\u00a0While you’re doing it, you have to keep your positions at the time if at all possible. \u00c2\u00a0 Why? \u00c2\u00a0Shorting stocks for example. \u00c2\u00a0Traders are allowed to short, but it goes against the haircut and reduces the amount they can trade. \u00c2\u00a0If it’s on the easy-to-borrow list though, it’s a different story. \u00c2\u00a0Anyway, the regulators come in and you have to prove that you weren’t shorting a stock. \u00c2\u00a0Which means you have to know or be able to derive your position at that time. \u00c2\u00a0Then you have to prove that at the millisecond you placed the order, it wouldn’t be a short. \u00c2\u00a0Which also means accurate time across the board of your systems. \u00c2\u00a0It’s fun, see?<\/p>\n

The easy to borrow list is exactly like it sounds. \u00c2\u00a0A list of things that are easy to borrow. \u00c2\u00a0Some stocks are so available to trade – so liquid – that they get on a special list that doesn’t really count as short selling! Link<\/a><\/p><\/blockquote>\n

In addition to ordering what and when, you also have to be able to prove who. \u00c2\u00a0So every trader has to have a unique login so you can prove who did what. \u00c2\u00a0 If Bob over in the corner is doing something illegal or unethical, you have to be able to prove it was bob doing it. \u00c2\u00a0That way when he’s caught he’ll just take himself down and not the company. \u00c2\u00a0So you have to record every method by which someone can communicate with evil peoples. \u00c2\u00a0You have to keep (like I said, pretty much forever):<\/p>\n