Open Source, Quants and Publication

I recently got a call from an old friend that I used to work with. He is a lawyer and had recently accepted a job as COO with a high profile quantitative hedge fund. He called me because he wanted to ask just how frequently “Quants” steal code. My response when asked such an open ended question was simply “More than anyone would hope” He in turn confided in me that the biggest challenge in his current firm is protecting their code base from their own employees.

The reason I mention the issue with intellectual property in investment management, is with Hal and I getting ready to publish some of our work in book form, we are in effect bringing to the world code that helped transform how money was managed at over $400 billion AUM during my time at the University of Utah. The book the beginning of a set of tools that I was asked to create by MSCI many years ago, in effect a condition of my support from them when at the University of Utah. We used many different languages for the courses over the years of the ULISSES Project, among them SAS, R, and then finally Python.

To be clear, the code that will be published is not the research code, which my company Flex Axion is commercializing, That deeper work was done with languages like C, C++, Eiffel and Rust. Instead, I’m instead talking about the code that we used to teach our students practical investment and risk operations, code that in effect allows portfolio managers to do their jobs better and utilize engines via APIs or other calls (optimization engines, reconciliation engines, and research engines).

I’m going to take an opportunity to articulate precisely why we feel we have to publish these books and their associated code. Specifically, I’m going to refer to the three failed attempts MSCI and I had to get others to shoulder the responsibility with us.

Strike One: A Financial Training Company run by a Math Ph.D.

When first approached by MSCI to produce the material, I originally demurred and asked them to find someone who was doing training courses full time. To their credit, MSCI said they’d already looked at the alternatives and they thought that, in my part time, I could do better than the full time efforts that they’d seen. I requested that they allow me to do same assessment, as my first choice was to see if I could find someone else to work with. The best alternative that MSCI presented to me is a well known finance training group based in New York run by a Math Ph.D. who worked in risk management at a few investment funds. Now this group is well known and the founder and his friends (most former investment bankers with gold plated resumes) are working a for-profit endeavor earning their main income from their courses and accompanying computer code.

I flew out to New York to met the founder, and was given full access to the material to evaluate it. In short, I found that over 80% of the code was non functioning, and almost none of it was relevant to practical investment or risk management. Furthermore, upon deeper investigation I found that it had been written by a series of former employees of the company, with none of the creators of code still being employed by the firm. My conclusion was that I could never work with a group like that. Strike One.

Strike Two: A Consultancy led by an Open Source Guru

The next alternative was an open source consultancy that at the time was working with many of the large banks. The founder and guru had tried to start conversations with MSCI several times, but my suggestion brought it to the fore. In our meeting, he said he’d have a demo done in months and having learned to be skeptical, we gave him only the first chapter of my class notes and exercises to translate into proper code. To be clear, everyone of my students had to do this in my classes at the University of Utah so we didn’t think it would be a problem if we gave him the same time to do a chapter (a semester) that we gave my students to do seven chapters.

After three months neither the guru nor anyone at his company had done anything with my class notes and exercises. In short, after follow-up conversations is appeared that they simply did not know applied finance well enough or the advanced applied math routines. In short, after all due diligence we could not verify that the guru or his team had ever written any working code, as the majority of his “seminal work” was done when the founder was a professor and had grad students that could have done much of his work, all of which could be summarized as a simple porting code from R libraries. Strike Two.

Strike Three: Individuals over Organizations

Over the last year I have looked for people at the University of Utah to continue the ULISSES Project classes, but it simply does not seem possible. There are wonderful people there, they just have different priorities and my departure exasperated the problems. In short, it is much easier to facilitate working with people when you’re in the same building as opposed to 900 miles away. Add to this the fact that typical university professors do not program as well as practitioners and that adds to the problem. Of course, I already understood this but my hope was MSCI could help. While we worked with incredible people at MSCI over the years, it has become obvious that they cannot “fill-in” as their priorities (rightly so) exist elsewhere. This last realization is what caused Hal and me to polish up the model code ourselves and the accompanying text and present it to the world in a book form, so students (and even professors) can learn on their own time. We hope that it proves useful to at least a few people.

This is in marked contrast to what happened with Barr Rosenberg’s old lectures that were published by two of his former students in two different books. You see, to this day there are two rather well known investment books that have questions that the “authors” do not know how to solve, because quite simply Barr did not provide solutions to them nor did he wish to publish a book on the matter. While I consider Barr a mentor, I also try to improve on what he did in the last “revolution in investment management.” In this case, I consider an improvement to not only provide the questions, but also model solutions of how a good programmer would solve them. We hope this helps the investment world progress.

Protecting the Innocent

Now publishing the books means that the code will be freely available to the world, but we will have it copyrighted not because we want all the credit for it, but because we don’t want others using our work to present themselves as people that they can do things that they clearly cannot. In today’s world, there are just too many people who are not doers and yet who wrongly present themselves as such. From this perspective, we provide the code as “model code” to be practically applied, but the first time we see anyone presenting our work as their own we will take legal action. We do this not for the honor, but to protect the innocent from the wolves that come dressed in sheep’s clothing. We’ve just seen too many examples of those that are not able to do the work saying they can and the negative consequences of relying on that. One more thing publication does.

There is a very famous case in which an investment bank sued a former programmer for stealing code when upon further investigation it was found that it was the investment bank that was attempting to make open source code proprietary. Publication of the code protects us if anyone every takes it and then attempts to incorrectly state that it was them that created it first.