
Many people who are interested in the topic of finance are interested in the question of which programming language is best suited to work, say, in the stock market. It can not be answered unambiguously, since different languages are suitable for different tasks.
In our today's material we will talk just about how to understand which of the existing technologies should be used in a specific situation in the stock market.
')
Investment Decision Making
First of all, we should decide why we needed to program something. Frequent applications are software development for trading on a stock exchange or analyzing large data sets. The choice of programming language will largely depend on the style of work on the market. More precisely, it will depend on the requirements for the speed of the applications.
Here is what Jeffrey Shek, the developer of the YCharts service, says in the relevant
thread on Quora:
If this is not about high-frequency trading, then it is obvious that investment decisions will not be made on the basis of seconds of processing time. Rather, the main tasks here will be the search and collection of information. For example, many hedge funds invest only in well-defined niches (unique industries, illiquid debt markets, problem companies, etc.). In such a case, it will not be easy to collect the necessary information, even if working with different APIs - expect that the information can be easily pumped out from various sources without “dances with a tambourine”.
Thus, if you need to aggregate data for analysis, then most likely you will want to use something with a large number of libraries, a fairly high-speed, with a lot of code already written to solve different problems (so as not to reinvent the wheel every time). Most often it will be something like C #, Java or Python .
If you need a fast trading robot
There are situations where speed is a priority. In this case, developers resort to the use of effective low-level languages.

Aleksey Afanasyevsky, the head of algorithmic trading at Finam JSC, in one of our
publications called the following technologies suitable in a similar situation:
C ++ and pure C are very well suited for these tasks. It also happens that fast robots are created and almost assembler - here it is worth mentioning the mechanisms of direct reading and writing data into the memory of a network card, bypassing the standard mechanisms for working through drivers, as well as working with "super-fast programmable hardware" like FPGA.
Under the hood of a business
Programming of trading algorithms is a “business card” of exchange technologies; however, real success in the market cannot be achieved if one does not pay attention to software components that are responsible not for the trading itself, but for the “accounting” of this process.
One such aspect, according to Jeffrey Shek, is data storage.
Languages for working with databases are extremely important. Want to save every application for Microsoft shares per day? Try to do this with a SQL database (MySQL, SQLite, etc.). It is very likely that in this case you will have to spend many hours on optimization before you can make a deal based on this data.
I would recommend to pay attention to languages that allow storing data in a column format (and not in a string) - this is well suited for tick data. Among such technologies can be called KDB , OneTick , SECDB (created in Goldman Sachs). If you just need to store stock prices, then MySQL with PosgreSQL will work just fine.

All in the same thread at Quora PhD, a professor at Princeton University and the head of the development department at Flexport, Andrew Ledwin, focused on programming languages that can be used to work "at the strategy level."
Here we need to generate profitable operating rules based on different signals. [...] At this level, the key point is the expressiveness of the language. It often uses languages like Python or even C ++ with Java, but I consider it ideal for Haskell or Ruby as a “wrapper” with the subsequent development of key modules in lower-level languages.
Another important step is the search for signals. Most often this is offline activity, during which a large amount of statistics is analyzed taking into account the limitations of real-time systems. They use tools like R or Matlab (like the same Goldman). Important is the possibility of machine learning and working with large amounts of data with minimal effort. But in general, the main result here is - if you manage to achieve it using Excel, then who cares?
If you just want to work as a programmer
Above, we talked about choosing a programming language in the context of writing our own trading systems. However, one should not forget that the infrastructure of the stock exchange and brokers is also written by someone in some languages, and the entire ecosystem must be supported by the employees of the respective companies.
In the financial industry, experts who know C ++ well are always appreciated, since a significant part of broker and stock exchange systems is written with its use. They write anything on it: from libraries for calculating pricing models of derivatives to infrastructure solutions, processing various streams and data storage. Therefore, specialists who are well aware of C ++ will always find work (for example, on the same
Moscow Exchange ).
Investment companies also often use C # and Java more often,
says the famous Quant and Quantstart blog founder Michael Halls-Moore. The expert notes the popularity of these technologies in infrastructure projects - various frontend interfaces, data feeds, and sometimes even modules for calculating the prices of derivatives write on them.
The developer of the
SmartX trading terminal
, Andrei Gorkovenko, agrees with this. In an interview, he
advised developers who would like to try their hand at the stock market to start learning these languages:
I would advise you to turn your attention to high-level platforms and languages such as .NET and Java. The latter is very popular in Western stock markets, we still have less, but there are good prospects for wider dissemination of this language. This means that Java programmers will be in demand in financial companies, funds and brokers.

Conclusion: Everything is interconnected
The line under the discussion of programming languages in the field of finance can be summed up by quoting a quant from
Joseph Wang, a large investment fund in Hong Kong. In the opinion of this expert, programming languages used to solve various tasks complement each other.
To implement things that require a lot of work with the processor, use C ++ or CUDA. For processes related to the exchange of data, use Java. For research and prototyping of trade applications, they use Python, R, TradeScript (used in the SmartX terminal) or even Matlab scripting languages. In turn, many traders use Excel / VBA to create reports.
All these languages are interconnected. You can write a price analysis module for C ++, then feed the obtained data to the Java trading engine, analyze the data using Python or R, and then upload it all to a report via Excel.
Related Links: