In our blog, we write a lot about technologies related to the stock market (for example, the relevant data transfer protocols - one , two , three ). There is a huge amount of exchange software, the process of creating which is quite interesting. Earlier we talked about the development of the SmartX trading terminal, and today we present you the story of the developers of the StockSharp trading robot project .
In this article we will talk about our product StockSharp, which we have been creating for many years. Why do we do it, who needs it, what advantages and what prospects. The article is divided into separate sections, but read better in order.
')
Background and Causes
The project starts at the end of 2009. At that moment, there were already quite a lot of different programs for trading as well as for algorithmic trading. But the distinctive feature of the dominant number of products created was and is practically complete disregard for the possibility of full automation. The following items are either missing from most programs or made low:
- Preservation of the history of the auction.
- Saving your own trading operations.
- Connect 2 or more sources of market data.
- Connect to multiple accounts / brokers simultaneously.
- Creating your own types of graphs and interface.
- Logging system and error notifications.
- Expanding the capabilities of the standard back tester (the system for the execution of requests is not unified, and depends on both electronic platforms and brokers).
- The absence of tools for the work of 2 or more people on a joint project.
- Normal code editor (and not at the level of Windows 3.1 and with the appropriate features).
You can still add with fifty points that you need for normal work in algorithmic trading. But the meaning is not changed. Products presented to the masses are not oriented to algorithmic trading (due to their narrow niche), and they will never have normal functionality. The capabilities of these automation products are achieved in a significantly short time. These are a few months, and it is pointless to spend them if the plans in algorithmic trading have a length of life.
There are two options to remedy the situation:
- Or buy products focused on algorithmic trading and teamwork. And this is tens of thousands of dollars a month (without exaggeration). With the current course, it looks absolutely awesome for beginner algo traders.
- Or do your own from scratch. Write connectors on exchanges, write your backtester (for example, in Python ). And this entails writing and their graphs, warning systems and much more.
The choice between expensive and long looks like between bad and very bad.
It was in order to fill the gap between the terminal with the basic automation and the professional platform for algorithmic trading, as well as to make it available to consumers (what could be more accessible than the Open Source product
downloaded from GitHub ?) We created our platform —StockSharp .
Architecture
StockSharp is built on the classic model of complex software development. In the beginning, a certain basis is created (in our case it is
S # .API ), and already with the help of it high-level add-ins are created. Today the picture is as follows:

We have already made a number of products that were created exclusively on S # .API. For example, our graphical environment is
S #. Studio (in beta stage at the moment) or
S #. Data / Hydra .
For the current day we have made a full complex for algorithmic trading. There is a system for collecting and storing historical data (which can work via the Internet, and distribute data as a server). There is a testing system for stories. There are a number of graphic components.
All the main functions (algorithms, connectors to external sources, etc.) - all this is standardized by external contracts (interfaces), which allows you to simply use them in your code. Agree, it is much more convenient and faster in Visual Studio to connect the library and invoke the method in it, than to write the code in the trading terminal on the script, which would upload the necessary data to the file and then write another program that would monitor this file.
In fact, in one day you can make a full-featured module for connecting to trading, displaying graphically information, and testing the created strategy on history:

This is done in blocks on WPF. All the graphic components on the screen are all ready from S # .XAML.
What about business?
Of course, doing business with only Open Source is nice. But it is even more pleasant to do business with Open Source and the right business model (“With a
good word and a gun, you can achieve much more than just with a good word .” (C) A.K.).
We distribute our platform as widely as possible among private traders, but for companies we offer paid solutions. This is done through our additional
connectors to connect directly to the exchanges. The model justifies itself by the fact that the connection type itself already segregates customers for us (normal connections are useless for companies, and direct access connectors are useless for private traders and mini-teams).
In addition to everything, we offer
our courses where we teach how to make trading robots for those who have never done them.
All these services together give us the opportunity to further develop the StockSharp platform, keeping it accessible to private traders, but with capabilities like professional solutions.
Instead of conclusion
Giant plans tend not to come true, so we have enough Chet steps for relatively short periods of time.
Task Number 1 is to complete the localization. Already, the number of English-speaking users on the GitHub of our project is comparable to the Russian-speaking audience. And this is despite the fact that all the comments in Russian are still in the code.
I would like to break out of the regional vice and see - what about there, and why are we better / worse? Golden Dream -
Wall Street companies are starting to use StockSharp instead of Bloomberg.