Live data from Hacker News

Jane Street and the OCaml Compiler (2018) [video]

janestreet.com

81–90 of 119 posts

Re: Jane Street and the OCaml Compiler (2018) [video]

#81
post #59

Earlier quoted context omitted.

How would you best describe them

It's a prop trading firm. It's pretty important to distinguish between hedge funds that take public money (which are generally probably low quality, as the OP described) and prop trading firms that only or primarily trade their own money (Two Sigma, Renaissance, Jane Street, Jump trading, etc.). The latter deserve their mystique, because you only trade your own money if you are actually beating the market.

Two Sigma and Renaissance (albeit not Medallion) primarily invest outside capital.

Re: Jane Street and the OCaml Compiler (2018) [video]

#82
post #79

Earlier quoted context omitted.

You can use a language like OCaml without allocating and still capture huge benefits over C++, like a decent type system, ADTs, and better abstractions than templates (modules in OCaml's case).

What about multicore? :) Nowadays Rust seems to cover all those features with zero-cost abstractions.

You still need to write non-consing code to avoid memory allocation/deallocation latency, just as if you were working in Java, Lisp or OCaml.

(In fact, GCs can often give you better latency than malloc/free unless you go into custom allocators with object pools... which is part of writing non-consing code in GCed languages)

Re: Jane Street and the OCaml Compiler (2018) [video]

#83
post #79

Earlier quoted context omitted.

You can use a language like OCaml without allocating and still capture huge benefits over C++, like a decent type system, ADTs, and better abstractions than templates (modules in OCaml's case).

What about multicore? :) Nowadays Rust seems to cover all those features with zero-cost abstractions.

Ah you're right, I forgot about OCaml's ass-tier multicore support. Rust is definitely better there.

Re: Jane Street and the OCaml Compiler (2018) [video]

#84
post #59

Earlier quoted context omitted.

How would you best describe them

It's a prop trading firm. It's pretty important to distinguish between hedge funds that take public money (which are generally probably low quality, as the OP described) and prop trading firms that only or primarily trade their own money (Two Sigma, Renaissance, Jane Street, Jump trading, etc.). The latter deserve their mystique, because you only trade your own money if you are actually beating the market.

Can you comment on relevance for society? Do these companies generate a net positive, or do they only extract value?

I.e. should I look for a job there only because of the money, or also because I can make a difference somehow in the bigger societal picture?

Re: Jane Street and the OCaml Compiler (2018) [video]

#85
post #9
post #6

Earlier quoted context omitted.

Things to consider: The company is >20 years old. OCaml is a general purpose language that provides an equilibrium between the avoidance of bugs introduced by state (like all functional languages), speed, and polymorphic type inference. At the time of adoption, the other choices were Haskell (too academic, not practical), Erlang (no type inference, not suited for large code bases with complex business logic), and lis…

Why C++ now but not then, 20+ years ago? And would F# be suitable for the task? Im genuinely interested

G-Research in London are using F# I believe

Re: Jane Street and the OCaml Compiler (2018) [video]

#86
post #2

i asked this question at my Jane Street interview, but never got a real answer: how does a market making latency arb firm handle GC pauses that are inherent with any GC language? OCaml is better in this regard than, say, the JVM, but it still seems problematic. I know they wrote some FPGA compiler stuff with OCaml, but I can't imagine that all of their execution is running through FPGAs. Even if it's possible, it see…

GC pauses aren't inherent.

I've written a java compiler that does GC and watched that part work; no pauses even for data structures with loops, and generally excellent performance. Not released yet, because I've also watched other parts not work.

But GC without pauses: That worked. And I was relieved² when I saw that my ivory tower worked, after many people had told me it couldn't possibly ;)

Re: Jane Street and the OCaml Compiler (2018) [video]

#87
post #69

Earlier quoted context omitted.

Ive worked a couple java based hft platforms at major firms. You write code that never gcs after startup. That means not using certain language constructs and rewriting almost every library along with using off heap memory. I have personally worked on systems that would run an entire week between deployments and never gced.

Could you maybe elaborate more on how to achieve this with Java, i.e., run an entire week and never get GCed? I would imagine that using immutable types is one of the tricks used in such a scenario.

You basically write Java as C++, you don't use any builtins, write everything yourself from pure java.

Re: Jane Street and the OCaml Compiler (2018) [video]

#88
post #84
post #59

Earlier quoted context omitted.

It's a prop trading firm. It's pretty important to distinguish between hedge funds that take public money (which are generally probably low quality, as the OP described) and prop trading firms that only or primarily trade their own money (Two Sigma, Renaissance, Jane Street, Jump trading, etc.). The latter deserve their mystique, because you only trade your own money if you are actually beating the market.

Can you comment on relevance for society? Do these companies generate a net positive, or do they only extract value? I.e. should I look for a job there only because of the money, or also because I can make a difference somehow in the bigger societal picture?

Difficult question, at least if you'd try to argue without politicizing too much. I'd say it's a false dichotomy to equate 'making money on the stock market on your own investments' with '(negatively) extracting value'. On the whole of it I'd argue that the existence of a stock market is a public good since it makes capital more liquid, more accessible and more transparent. Going from that to argue that firms that invest purely for themselves deliver a whole lot of positive externalities would be hard for me. I'd call it Lawful-Neutral. It's wholly within the rules of society, doesn't create very clear negatives and clearly delivers positives for those involved (employees, stockholders, etc.).

If you have a 'millenial mindset' and want to work where you directly and positively impact society, I'd choose elsewhere. From a Peter Singer-like perspective, if you'd earn top dollar there and spend at least a modest amount giving to the right charities, you might still be making the world a better place, even compared to the other place.

Re: Jane Street and the OCaml Compiler (2018) [video]

#89
post #88
post #84

Earlier quoted context omitted.

Can you comment on relevance for society? Do these companies generate a net positive, or do they only extract value? I.e. should I look for a job there only because of the money, or also because I can make a difference somehow in the bigger societal picture?

Difficult question, at least if you'd try to argue without politicizing too much. I'd say it's a false dichotomy to equate 'making money on the stock market on your own investments' with '(negatively) extracting value'. On the whole of it I'd argue that the existence of a stock market is a public good since it makes capital more liquid, more accessible and more transparent. Going from that to argue that firms that in…

I'd maybe agree with your points, except the last point: if these traders keep all/most smart people from the job market, then even your dollars would not make a difference. Of course this is overblown but it is similar to the concern that "all of our smart people are trying to make people click ads".

Re: Jane Street and the OCaml Compiler (2018) [video]

#90
post #2

i asked this question at my Jane Street interview, but never got a real answer: how does a market making latency arb firm handle GC pauses that are inherent with any GC language? OCaml is better in this regard than, say, the JVM, but it still seems problematic. I know they wrote some FPGA compiler stuff with OCaml, but I can't imagine that all of their execution is running through FPGAs. Even if it's possible, it see…

Worked in HFT and funds, there's a bit more to the taxonomy:

- Trading completely based on the current prices. If you're doing purely arbitrage, eg looking for the ask to go under the bid (elsewhere), you are gonna have to be really, really fast, because that kind of thing is so very obvious nobody hasn't thought of it.

- One step from from that is passively leaving an order in and hoping for the same thing. Eg you leave a bid in a less liquid market, below the bid in the main market, and hope someone hits you. You then immediately throw that onto the main market. Gotta be super fast to do that, because of course everyone else can see someone traded.

- Market making based on some form of ML on the orderbook, basically imbalance. Here you need to do more than just comparing two prices. You also aren't entirely leaning on the current price to offload your position, you might hold onto your position a bit. So now there's risk involved, and you might need to decide how big a position you want. And not everyone will have the same position, so not everyone is after the same trade.

- Market making based on multiple orderbooks. Say you have an ETF basket, and you want to be able to make bids and offers around it, as well as the underlying shares. So then you have a different position to everyone else, there's a fair bit more information to digest, and there's a fair bit more modelling which will mean different participants have different decisions. This means your decisions will not be contested in the same way that obvious arbitrage would be.

Post reply on HN