Home > finance, open source tools > Finance and open source

Finance and open source

August 11, 2013

I want to bring up two quick topics this morning I’ve been mulling over lately which are both related to this recent post by Economist Rajiv Sethi from Barnard (h/t Suresh Naidu), who happened to be my assigned faculty mentor when I was an assistant prof there. I have mostly questions and few answers right now.

In his post, Sethi talks about former computer nerd for Goldman Sachs Sergey Aleynikov and his trial, which was chronicled by Michael Lewis recently. See also this related interview with Lewis, h/t Chris Wiggins.

I haven’t read Lewis’s piece yet, only his interview and Sethi’s reaction. But I can tell it’ll be juicy and fun, as Lewis usually is. He’s got a way with words and he’s bloodthirsty, always an entertaining combination.

So, the two topics.

First off, let’s talk a bit about high frequency trading, or HFT. My first two questions are, who does HFT benefit and what does HFT cost? For both of these, there’s the easy answer and then there’s the hard answer.

Easy answer for HFT benefitting someone: primarily the people who make loads of money off of it, including the hardware industry and the people who get paid to drill through mountains with cables to make connections between Chicago and New York faster.

Secondarily, market participants whose fees have been lowered because of the tight market-making brought about by HFT, although that savings may be partially undone by the way HFT’ers operate to pick off “dumb money” participants. After all, you say market making, I say arbing. Sorting out the winners, especially when you consider times of “extreme market conditions”, is where it gets hard.

Easy answer for the costs of HFT is for the companies that invest in IT and infrastructure and people to do the work, although to be sure they wouldn’t be willing to make that investment if they didn’t expect it to pay off.

A harder and more complete answer would involve how much risk we take on as a society when we build black boxes that we don’t understand and let them collide with each other with our money, as well as possibly a guess at what those people and resources now doing HFT might be doing otherwise.

And that brings me to my second topic, namely the interaction between the open source community and the finance community, but mostly the HFTers.

Sethi said it well (Cathy: see bottom of this for an update) this way in his post:

Aleynikov relied routinely on open-source code, which he modified and improved to meet the needs of the company. It is customary, if not mandatory(Cathy: see bottom of this for an update) for these improvements to be released back into the public domain for use by others. But his attempts to do so were blocked:

Serge quickly discovered, to his surprise, that Goldman had a one-way relationship with open source. They took huge amounts of free software off the Web, but they did not return it after he had modified it, even when his modifications were very slight and of general rather than financial use. “Once I took some open-source components, repackaged them to come up with a component that was not even used at Goldman Sachs,” he says. “It was basically a way to make two computers look like one, so if one went down the other could jump in and perform the task.” He described the pleasure of his innovation this way: “It created something out of chaos. When you create something out of chaos, essentially, you reduce the entropy in the world.” He went to his boss, a fellow named Adam Schlesinger, and asked if he could release it back into open source, as was his inclination. “He said it was now Goldman’s property,” recalls Serge. “He was quite tense. When I mentioned it, it was very close to bonus time. And he didn’t want any disturbances.”

This resonates with my experience at D.E. Shaw. We used lots of python stuff, and as a community were working at the edges of its capabilities (not me, I didn’t do fancy HFT stuff, my models worked at a much longer time frame of at least a few hours between trades).

The urge to give back to the OS community was largely thwarted, when it came up at all, because there was a fear, or at least an argument, that somehow our competition would use it against us, to eliminate our edge, even if it was an invention or tool completely sanitized from the actual financial algorithm at hand.

A few caveats: First, I do think that stuff, i.e. python technology and the like eventually gets out to the open source domain even if people are consistently thwarting it. But it’s incredibly slow compared to what you might expect.

Second, It might be the case that python developers working outside of finance are actually much better at developing good tools for python, especially if they have some interaction with finance but don’t work inside. I’m guessing this because, as a modeler, you have a very selfish outlook and only want to develop tools for your particular situation. In other words, you might have some really weird looking tools if you did see a bunch coming from finance.

Finally, I think I should mention that quite a few people I knew at D.E. Shaw have now left and are actively contributing to the open source community now. So it’s a lagged contribution but a contribution nonetheless, which is nice to see.

Update: from my Facebook page, a discussion of the “mandatoriness” of giving back to the OS community from my brother Eugene O’Neil,  super nerd, and friend William Stein, other super nerd:

Eugene O’Neil: the GPL says that if you give someone a binary executable compiled with GPL source code, you also have to provide them free access to all the source code used to generate that binary, under the terms of the GPL. This makes the commercial sale of GPL binaries without source code illegal. However, if you DON’T give anyone outside your organization a binary, you are not legally required to give them the modified source code for the binary you didn’t give them. That being said, any company policy that tries to explicitly PROHIBIT employees from redistributing modified GPL code is in a legal gray area: the loophole works best if you completely trust everyone who has the modified code to simply not want to distribute it.

William Stein: Eugene — You are absolutely right. The “mandatory” part of the quote: “It is customary, if not mandatory, for these improvements to be released back into the public domain for use by others.” from Cathy’s article is misleading. I frequently get asked about this sort of thing (because of people using Sage (http://sagemath.org) for web backends, trading, etc.). I’m not aware of any popular open source license that make it mandatory to give back changes if you use a project internally in an organization (let alone the GPL, which definitely doesn’t). The closest is AGPL, which involves external use for a website. Cathy — you might consider changing “Sethi said it well…”, since I think his quote is misleading at best. I’m personally aware of quite a few people that do use Sage right now who wouldn’t otherwise if Sethi’s statement were correct.

Categories: finance, open source tools
  1. August 11, 2013 at 11:01 am | #1

    I really like this presentation on “corporate open source anti-patterns”: http://smartos.org/2012/07/27/corporate-open-source-anti-patterns-doing-it-wrong/

  2. August 11, 2013 at 2:39 pm | #2

    I’m not sure about “open source”, but as far a free software is concerned, everyone is free to use the software as they see fit, which includes modifying it. There is generally no obligation to share. The only requirement triggers when you release modified versions, at which point you must also share the modified source code.

    And, by the way, DE Shaw is right: if you modify free software, the modifications belong to you. It’s bad business to keep them private (you usually benefit more from having your patches accepted into the official version than by keeping your modifications secret), but it’s not wrong.

    • bob
      August 12, 2013 at 2:17 am | #3

      The only requirement triggers when you release modified versions, at which point you must also share the modified source code.
      This is only true for restrictive open source licenses. There are completely free licenses where this is not the case.

  3. August 11, 2013 at 3:51 pm | #4

    “It is customary, if not mandatory, for these improvements to be released back into the public domain for use by others.”

    It is only “mandatory” for GPL licensed code *if* you distribute binary versions as far as I know. As long as you don’t distribute binaries or use software with a less-restrictive license, you don’t have to give away your source-level improvements.

  4. E.L. Wisty
    August 11, 2013 at 6:53 pm | #5

    Reblogged this on Pink Iguana and commented:
    DE Shaw and Python is plausible. Shaw himself you might expect to know better considering his background in architecture if he is executing low latency trades. But A. I think Shaw’s background out of Morgan Stanley was more stat arb, pairs and B. Shaw did do APL at MS I believe. The is room for a disconnect.

  5. Kaleberg
    August 11, 2013 at 11:18 pm | #6

    My initial feeling about HFT is that basically lets you run a wire con and collect a nice chunk of the difference between the bid and ask. But now I’ve been wondering if it might play another role, the role of an old fashioned floor specialist. On the old NYSE trading floor there used to be certain designated members who made and managed the markets in particular securities. They were responsible for maintaining an orderly market. In exchange, they got to collect a nice chunk of the difference between the bid and ask. If HFT actually maintains orderly markets, then, one might argue, that it deserves to collect nice chunks. My first guess is that HFT should decrease stability for the same reason that driving at 200mph makes one more likely to crash into something than driving at 20mph, but recent experience suggests that HFT can maintain market stability by providing an undo mechanism whenever the market is blown off the rails. This sounds pretty drastic. The stock exchange shouldn’t be a feel good soccer game for four year olds, but I keep wondering about the homologous form.

  6. artp
    August 12, 2013 at 12:49 am | #7

    HFT is technically possible, and in the future will become more and more possible at faster and faster speeds.

    What is missing is the question “How fast is fast enough?” I am an engineer, not a mathematician, so I cannot compare methods, but in some engineering curricula, ethics are taught. Assumptions are examined, and questions are asked as to whether the project really needs to be done. What benefit comes out of this?

    Then you get out in the real world, and are told that someone else is answering those questions.

    My view of HFT, from both a technical and an ethical standpoint, is that it is perfectly designed to siphon money off from human, real-time traders. The money doesn’t appear out of nowhere. It is lost by someone, as the market is a zero-sum game. In that respect, it is very unethical. It steals from small children, grandmothers… Have I jerked any tears yet?

    I have been told that the original purpose of the stock market was to generate capital for companies so that they could expand or improve their operations. I also know from organizational dynamics that any organization eventually comes to the point where its sole purpose is to perpetuate itself. It forgets why it was created. And it will never allow itself to die.

    That is where the stock market is. Most of the current activity has nothing to do with funding corporate expansion or improvement. In fact, it actively works against both. The decline will continue until they are forced to reform, kicking and screaming all the way.

  7. EJD
    August 12, 2013 at 7:53 am | #8

    Finally something comes up I can contribute to! Been reading and getting smarter, about time.
    Open Source and Corporate ‘merica!
    I work in a field far from finance and can assure you when a corporation looks at open source it is strictly Something for Nothing. By the time it is brought in-house and sufficiently scrutinized it has yet to be cost effective either, otherwise the Open community would be our software process.
    Fortunately the safety embedded community has very high bars they have to meet and actual code writing is a small part of that expense.

  8. August 12, 2013 at 7:04 pm | #9

    Not directly related to the issue of Open Souce but more to the question of “If we allow HFT, then it should at least not cause the meltdown of the whole financial system”…

    http://www.rdmag.com/news/2013/08/digital-signal-processing-could-prevent-wall-street-flash-crash

  9. Thads
    August 13, 2013 at 12:40 am | #10

    Your brother is seriously named Eugene O’Neil? He really should meet my sister’s friend Virginia Wolff.

Comments are closed.
Follow

Get every new post delivered to your Inbox.

Join 886 other followers

%d bloggers like this: