The Aleynikov Code Dump Uncovered

Sergey Aleynikov's code dump page has been uncovered, courtesy of the Sergey Aleynikov Fan Club on Facebook. The site can be found here. Intrepid hackers, nascent program traders, Goldman lawyers and DHS lackeys should be all over this. As Zero Hedge will be out of pocket for the next few hours, it might make sense for a reader to create a mirror of the content as I have a sinking suspicion this Google page will be taken down faster than Tila Tequila's modesty.The Google Code linked wiki page is already responding with a 502 Server Error and it is odd that this page has not also been removed.

Among the projects on the Code site include:

TheErlang Plus Interface library (EPI) is a tool set of C++ classes to
easily build applications in C++ what comunicates with Erlang. The
intention of the library is to cover the holes that EI library offers:

An object oriented implementation

A simple API

Extensibility

Abstraction of comunication mechanism

Simplified management of incoming messages (mailboxes)

Which Sergey was allegedly putting together in conjunction with user "Keymon."

I hope some of our enterprising readers take the time to make some sense of all this code in my immediate absence. While the probability of a smoking gun contained here is marginal at best, strangers things have happened.

Comment viewing options

I don't understand a single word. Are the electronic exchanges written in Erlang? Maybe this is completely unrelated. I can't make any sense of it without any background information about how the exchanges work and what technologies they use.

Erlang is a language for more easily writing distributed programs. OCaml is just another language which is nice for writing equations (or functions). Neither has anything to do with the exchanges, because you still submit orders to the exchange the same way.

Superficially it seems like open source libraries that he and others have been modifying under the GNU Lesser License provisions. That means anyone can see it and anyone can change it as long as the changes are made public. There should be nothing specific to a HFT platform. These are generic Erlang libraries written in C++.

Serge is an established Erlang/OTP hacker, which is an open source platform. For example:

This is beginning to sound suspiciously like poor Craig Neidorf's trial in 1990 for downloading a memorandum from AT&T. The prosecutors were humiliated when Neidorf's legal team was able to show that the document had already been published in the Bellcore Technical
Journal, available in any research library in the country.

This may be a nice excuse for re-reading Bruce Sterling's book, The Hacker Crackdown.

I just looked briefly, but his code just appears to be interfaces, that is code to make it possible to do things with differing libraries. You'd use C++ for the superfast code and then Erlang would allow for a functional programming style command structure. Nothing interesting here.

If anything, this Google code dump demonstrates that Sergey was somebody community-minded. He's making an effort to share code that he or his fellow proggers have developed. It tells us more about the person than what he was doing. We already know he was using Erlang and you have to use C++ to write micro-second fast programs.

Community minded in the sense that he's abiding by the GNU open source licenses.

This is not proprietary code and Goldman should understand that, otherwise not use it in their systems. It is also not the code with the smoking gun on the alleged front running done with HFT platforms.

Can someone get Serge a good lawyer? This can turn out to be something that didn't need the criminal justice system involved.

But, who says that this code is the actual code that Serge took from GS? As far as I can tell, this might not be it.

This is not proprietary code and Goldman should understand that, otherwise not use it in their systems. It is also not the code with the smoking gun on the alleged front running done with HFT platforms.

Of course it's not the code he took from GS. It could only be some helper code but nothing more. I just wondered if he could have used it at all. Only if the exchanges are written in Erlang it would make it really interesting. Joe Armstrong would be very happy about it. He asked for an Erlang killer applications. Now he would have it. :-)

But I am not sure that this is significant or of any value since the original code is open source written by Vlad Dumitrescu in 2004 and Serge added to it in 2009, it should thus be technically still be open source:

V 0.5, January 2009 / Serge Aleynikov-------------------------------------- More robust error handling- Added delegates for connection state changes- Support for pid monitors- Support for short node names- Optional disabling of local epmd registration and inhibiting creation of connection acceptor- Support for local processing of io_request's - RPC API extended to supply the pid of a local io server mailbox.- Support for IEEE 754 double encoding/decoding - Support for big-num decoding.- Otp.Erlang.Tuple and Otp.Erlang.List now take variable number of parameters- Argument lists of OtpNode and OtpConnection constructors changed (some of these changes are not fully backward-compatible).

It looks like the Test applications were used in the testing of the library modifications. It's plain vanilla unit or integration test code. The underlying Erlang/OTP libraries are open source. The AssemblyCopyright line was probably inserted automatically by the GS internal build system. So that trivial source file was most likely generated at GS. If that's what was taken, then I don't see a criminal case here, just a civil case.

Visual Studio automatically fills in the AssemblyCompany with whatever value it obtains from the laptop. As I have a Hewlett Packard, all code I start to write is Copyright Hewlett Packard 2009, autogenerated. Pisses me off each time.

Tyler,
svnarchive is probably just a Subversion archive. You can wikipedia Subversion if you're not familiar with it - but it's an open source version-control archive. For those less technically-inclined: Subversion lets you save a log of code changes made during development. If this is in facr a log of changes made by Sergey to the trading code - it could provide some insight.

Gotta agree with this here. Everything I'm hearing people talk about just sounds like run of the mill open-source code.

I've got to think GS's lawyers are smart enough not to press charges for criminal trade secret misappropriation on open source code, or code that has become open source code by operation of the GPL/etc.

All this sounds like to me is that someone noticed Sergey's name on some SVN check-ins on various open source projects and then assumed that was the crowl jewels.

a small note on the definition of terms: proprietary software means that the user doesnot have access to its source code. this is the case for windows, oracle to give just 2 examples. goldman software however is not proprietary software. it is used and developed in-house - afaik - and - as Richard Stallman explained in one of his talks - it is custom software. the user - GS - can always get the source code and modifies it to its needs.
if we mean by proprietary software the software that must not be seen by other eyes than GS', well, if they use gnu software, and especially GNU GPLv3 software , i am not sure that they have a case. gnu software and derived software from it can be shared, it is stated in the license. if that software has other license - though i am not sure, usually in house code is written with no care to licenses, then that license must specify that the code must not be shared, and on that license aleynikov can be judged upon. i wonder if that license is ok and respects the gnu license of the software their code is built upon.

I'd like to remind folks that IF THIS WERE the actual code, and it were protected by copyright and/or trade secrets, then you should consider the legal ramifications for accessing or disseminating it.
But I doubt its the real code from what I've read.

Don't think there is an issue there. As long as it is posted online and not clearly labeled you cannot know what you are actually looking at until you have thouroughly examinated it.

However, once you are reasonably sure you should stop and not knowingly keep any copies of it.

Anyway, I'm not sure that the 'trade secret' classification holds anyway here. This is software based on known programming languages and know mathematical formulas, so where is the trade secret? Of course GS would have to make their case in court to establish that this indeed falls under the term trade secret.The criminal case is probably already dead anyway, see 18 USC § 1839 (http://www.law.cornell.edu/uscode/18/usc_sec_18_00001839----000-.html)

Well, this is a criminal case. The DOJ may have big trouble proving that Goldman Sachs took the measures to prevent this from happening.

One last point about this code, it's not the exact code that Serge took, which he encrypted and hasn't distributed (sold) according to his lawyer. So, I doubt the real code will be exposed unless it's part of the criminal trial.

So it seems like the code posted here is just a false lead. I for one don't care too much about the actual code, but would REALLY like to know how some of the program trading algorithms actually work. Are they mostly involved with high-frequency trades and extracting pennies by acting as pseudo market makers? I suspect some algorithms probably attempt to manipulate the market by causing bigger moves as well, for example setting off a short squeezes and such. However, having a software background but no expertise in stock analysis, I wonder how the Goldman Sachs and Renaissance Technologies of the world are pulling this off.

Perhaps a ZH reader who is a domain expert can write a quick article and shed some light on how a successful program trading algorithm actually works. What kind of inputs are being monitored? Is there some market data that is available to certain market participants but not to all? I think having some knowledge like this would do a lot to potentially even out the playing field.