Hopefully self explanatory. Am interested in questions around computational speed for common quant finance applications, feels more like QF than SO I would argue. You see a lot of generic benchmark testing of C++/C#/ even JavaScript etc, but would like to canvas views from a more specific cohort. Probably this kind of thing has been asked before. Anyway, interested in opinions as to whether ok for QF.


You asked about 'building an automated options trading system with realtime greeks/PnL' as a specific example. To be clear, this can be a very low bar to clear. You don't need a large amount of memory or cubic time algorithms to compute PnL. Between myself and the immediate colleagues I've worked with, we've dealt with automated options trading systems written in C, C++, Java, C# Mono/.NET, Scala, Objective C, Go. All of the languages are suitable.

There's advantages to all of them:

  • For server-side programming, the general experience is that you can quickly get a good runtime performance to development time ratio in a language with concurrency primitives baked into the language, such as Go, or a language inspired by a functional paradigm, such as Scala. This makes it easy for you to build components like a spooler, PnL or risk server etc.
  • For front-end development, C# has easy hooks to Windows APIs for visualization and same with Objective C for Cocoa. However, this runs into platform dependence issues, which is why there is an increasing popularity behind Javascript.
  • For network-side programming, sockets and threading, it's often easier to do this in C/C++ because of a large amount of examples behind this and libraries that provide access to low level facilities, but it's not impossible to do this in nearly any other language.
  • For scripting, it's often easier to do it in an interpreted language with an out-of-box REPL environment, like R (R Studio), MATLAB (MATLAB IDE), Python (IDLE, iPython). OCaml (utop), Groovy (groovysh). Type inference also helps.

  • Performance-wise, there's no clear winner in speed among the compiled languages, provided you are not exploiting compiler-specific tricks or abstractions around architecture-specific primitives. A skilled developer in C#/Java can easily out-optimize an unskilled developer in C++, and vice versa. The memory management practices will be different of course, which is why you'll find 1 language 'faster' than the other if you stuck to a particular paradigm. In the former, you would want to minimize the odds of your objects getting promoted into the tenured generation, which when filled, would trigger a garbage collection cycle; in the latter, you want to be careful with where you make memory allocations.


Yes it's OK here if your provide exactly enough context.

For example:

Which technology is the quickest between python or C#?

is clearly off-topic.

But something like:

Is Python fast enough to perform a crossing moving average indicator over 1000 symbols and send orders within 2 seconds?

would be OK. Obviously, the more details you provide the more interesting the question is because it makes it more specific and hence can be answered more precisely.

  • $\begingroup$ Thanks - what I would say is that clearly your 'OK' example is binary and indeed probably near an extreme of a specificity spectrum, sometimes it's useful pre project to get the opinion of those experienced as to whether a given language may be a strategically unwise choice eg vs C++. The kind of scopes I have in mind are potentially quite large, eg from modelling a desk's derivative portfolio for regulatory metrics, to building automated options trading systems with specific focus on realtime greeks/Pnl explain. I guess it can get a bit SO in nature when you start discussing $\endgroup$ – Mehness Jan 22 '17 at 18:01
  • $\begingroup$ multithreading capabilities etc, but anyway am glad that at least a small part of this forum could address this kind of question, even if pure implementational optimisation rather than modelling. $\endgroup$ – Mehness Jan 22 '17 at 18:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .