Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do hedge funds and financial services often use OCaml?

Speaking to a number of quants / hedgies, I came to the conclusion that a large number of them seem to be using either a homebrew language or OCaml for many tasks. What many of them couldn't answer was why.

I can certainly understand why they wouldnt want to use C++ for the most part, but why is OCaml superior for these uses compared to other scripting languages, say Python, Ruby etc?

like image 923
oneAday Avatar asked Dec 17 '09 20:12

oneAday


People also ask

Why does Jane Street use OCaml?

It adopted OCaml as its main programming language early on because the language's functional programming style and clear expressiveness made it possible for code reviews to be performed by traders who were not programmers, to verify that high-performance code would do what it was intended to do.

What is the best programming language for finance?

Java is the top-ranked programming language in finance, according to HackerRank, for reasons that mirror its general cross-industry popularity. The language has a friendly learning curve, can handle significant amounts of data, and boasts rigid security features.

Is OCaml faster than C++?

According to The great computer language shootout, (see also the newer Computer language shootout benchmarks) Ocaml is the second fastest language - slower than C, but faster than C++.


1 Answers

Try reading Caml trading - experiences with functional programming on Wall Street by Yaron Minsky and Stephen Weeks (apologies, while this article used to be hosted for free at Jane Capital, it is no longer there, so I leave the ACM link for reference). They go into great detail about what they feel are the advantages and disadvantages of OCaml, though they for the most part take it as a given that it is better than most other options they considered (i.e. not a lot of direct comparisons with C++, Python, what have you).

The authors work at Jane Street Capital which has invested heavily in OCaml code.

Update: See also the thread What programming language(s) is algorithmic trading software written in?. One of the comments mentions a presentation Yaron Minsky gave at CMU on Jane Street Capital's use of Caml. About an hour long, and very interesting.

Update Two: Yaron has written another overview, this time for ACM Queue, called OCaml for the Masses.

like image 91
Don Wakefield Avatar answered Oct 19 '22 12:10

Don Wakefield