Hot answers tagged

36

The other posters have already noted that the prevalent use of C++ appears to be due to historical reasons and unwillingness to change. Those reasons aren't the ones that people should be applying. If you want real reasons to use C++, how about the following: Powerful infrastructure. Take a look at Intel Parallel Studio for an example. Performance compared ...


30

A choice of C, C++, or Java is practically required somewhere in the stack since most data vendors only supply bindings for one of those languages. Once the data arrives, though, the trading desk can use whatever it wants. In addition to the above three, I've seen these used in production: Visual Basic / Excel q / kdb+ R Python MATLAB OCaml I've also ...


30

Searching http://www.quantfinancejobs.com for "C#": 62 jobs, 54 (2011) "C++": 209 jobs, 236 (2011) "Java": 72 jobs, 121 (2011) "VBA": 35 jobs, 20 (2011) Searching http://www.quantcode.com/modules/jobs/ for "C#": 228 jobs, 277 (2011) "C++": 696 jobs, 813 (2011) "Java": 291 jobs, 328 (2011) "VBA": 157 jobs, 190 (2011)


28

I'll just add that with Interactive Brokers you have to be aware of their cancel fees. Remember, Interactive Brokers owns Timber Hill, a very large and active market maker. They will discourage you from competing with Timber Hill through monetary disincentives, among other things. For example, if you send a directed order (i.e., you don't allow IB to SMART ...


21

Credit Suisse has publicly stated that they use F# for some valuation tasks (which tend to be very parallelizable). Here's a link to a talk abstract from a Commercial Users of Functional Programming workshop: http://cufp.org/archive/2008/abstracts.html#MansellHoward I'm not sure if there's a video of the talk floating around or not. Since F# targets the ...


18

The main reason is traders/quants currently in business often learned C++ in their formation rather than C#, they naturally used this language when starting new projects. It will gradually evolve, I guess you could have asked "what's the reason cobol is still the most popular language in Finance" 20 years ago. Also most projects in production use C++ but I ...


17

For linear algebra etc, I am partial to Armadillo with Eigen as an alternative. Both are modern (eg templated), actively developed and fairly high-performance. I like my C++ together with R and stand behind a few projects like Rcpp and RInside which facilitate that integration; RcppArmadillo then brings Armadillo to R. For quant stuff, there is of course ...


16

Garbage Collection. The amortized performance between C++ and more modern languages is similar, but when your heap gets large, a GC can still take 100ms or more! That's an eternity, and just isn't acceptable for anything with real-time requirements


15

This has nothing to do with IB in particular. The primary issue with retail data feeds is that they run over the Internet. That means dealing with a shared line and all of the latency spikes that comes with it. Institutional traders, even when they aren't co-located, build a private network pipe to their data vendor since that's the only way to prevent ...


15

Look at Genesis Trading. Most of the sales guys there are kinda like used car salesmen but they will work with you. Starting up with 50K should not be a problem for them. The offer full depth of book feeds if you are colocated with them. They do offer DMA and you can specify all routing instructions for your orders rather than getting stuck on IBs router. ...


14

Holding period and trade frequency are two different things. If you have a high trade frequency, the name of the game is negotiating lower commissions. That being said, the TWS API gives you the same quality feed as you get using TWS itself. From Article on HFT Provided by Dirk Eddelbuettel in this question about HFT: High-frequency trading (HFT) is ...


14

There are tons of languages used in this field. As for Java-based trading platforms, Marketcetera is popular with customers. To justify switching languages, you'd need to show that there is a bottleneck preventing your team from collecting more P&L. Have you run a profiler and compared the results with tcpdump? You must show that your existing platform ...


14

This is off-topic and maybe belongs to StackOverflow, but here goes. 1. Compile QuantLib The best way is to open the Visual Studio Command Prompt using a shortcut under Programs→Microsoft Visual Studio→Visual Studio Tools. Now, you need to navigate to the QuantLib folder inside the folder where you have QuantLib (there are other folders such as ...


13

F# was used at credit suisse and I believe a number of other desks. From people I know at Microsoft the banks told MS to make it a supported language, otherwise it would have stayed a project at Microsoft Research. I have also seen Haskell used for derivatives trading.


13

I believe that C++ is the most common quantitative infrastructure language. I don't know of a single hedge fund or investment bank that doesn't use it extensively or completely (and I spoke to a lot of them at some point in the past). In some cases, as the former Lehman brothers-now-Barclays, C++ was the only language of choice, which is a bit extreme, given ...


13

I don't know if it the most popular but it is popular for sure - I think there are several reasons for that, which not only apply to QF: It is a mature language with many years of development behind it There are many people who are able to program it Many books, tutorials, websites, communities are available (network effect!) It is fast There are many ...


13

Of course it is fast enough. But what is fast enough? I know guys who trade off Excel sheets and they make millions, but those guys are clearly not active in high frequency space. So, it entirely depends on your trading frequency and average holding period. I also know of shops that run live trading systems by calling R functions, so, obviously Matlab ...


12

Oracle hosted a Trading Applications Developer Workshop in New York on March 15th, 2011. The slides from each of the presentations are here. One of them covers java for Trading Applications, and it seemed to me that the biggest issue raised by the audience was garbage collection. The presentation talks about some configuration parameters that can limit ...


12

At discretelogics we just released a file format to store time series in flat files called "TeaFiles". In addition to raw data they can store the binary item layout and a description of the contents. C#, C++, Python APIs are available open source, licensed under the GPL, see discretelogics.com/teafiles/ Using memory mapping, read performance reaches that ...


11

I help organize the F#unctional Londoners Meetup group. A good number of our 450+ members work in London's finance sector. Over the past 2 years we have hosted a number of talks related to F# in trading: Simon Cousins on F# in the Enterprise - F# at E.ON Energy Trading Daniel Egloff - F# on the GPU with Alea.CUDA - developed for derivative pricing Adam ...


11

Regarding your order management issue, every order should have a unique identifier that the user can reference; in FIX, this is the ClOrdID. The parameters of every order the user requests should be stored in a table keyed by this identifier. If your goal is to prevent duplicate orders from going out, consider having a trade volume limit per each symbol. ...


11

The only way to find out is to try it! It shouldn't take very long to write some simple code to simulate the computations you plan to do, and run it in a loop. With current versions of Visual Basic (VB.net), performance should be comparable to Java in most cases because the basic technology (compiling to intermediate code and then running a just-in-time ...


11

As of April 2014, the 32-bit version of kdb+ is now free to try. This free version may not be used in production systems. The only technical limitation vs. the 64-bit version is that you can only address up to 4GB of memory per process.


10

I recently did a 'Poll' on 'LinkedIn' about this topic that got 160 votes and generated some great conversation on this subject. http://linkd.in/gHNOgt (Poll Results: Java won out) I realized after the fact that I should have structured the question more specifically" Ultimately, depending on what component of a trading system you are tasked with building ...


10

In a typical HFT scenario (process incoming UDP quotes and send TCP order entry responses) well written Java can compete with C++ for pure speed. If you need more speed, look to improve the following: Your code (setup a good benchmark and then profile and tune) Your networking environment (low-latency switches, DMA NICs) Your architecture (are you doing ...


10

I haven't had the time to try them personally, but if I were you I'd try The Solver Foundation or maybe you can find something useful within these libraries. What I did was to compile a MATLAB algorithm and used the produced DLL. UPDATE: I read yesterday in the Wilmott Magazine that the NAG Library is also available for .Net now. Again, I haven't used it ...


10

Here's a blog post with a general overview of some possible implementations. howtohft_howtobuildafastlimitorderbook - (mirror of the original posting) The posting was originally on the website www.quantcup.org - this site is up for sale but I leave the broken URL to help future searchers:


10

All .NET languages are perfectly able to compete with the speed of C and even FORTRAN. It all depends on if they are used the correct way. 1) Both Java and .NET have considerable longer startup times than most native app. Therefore, you will have to have the application running and not starting it over and over on request. 2) Memory management is crucial ...


10

You could look into Pandas, a Python library that integrates with PyTables. It was created by someone at AQR and has some similar features as KDB.


10

A popular open-source option for the numerics in .NET is Math.NET (https://github.com/mathnet/mathnet-numerics). It has both managed implementations and allows you to use the optimized MKL native libraries. This use of .NET as a front-end to an optimized native library is quite common. Meta.Numerics (http://www.meta-numerics.net) is an alternative ...



Only top voted, non community-wiki answers of a minimum length are eligible