Interview: how C # and C ++ help make money in the stock market

One of the most popular topics in our blog was the story about Jesse Spaulding - a guy, who earned $ 500k in the stock market, applying your knowledge of programming and understanding of the basics of the stock market (part 1, part 2). In the comments to these texts, some habrap users expressed their doubts about the realism of such a scenario in our country.. There were also phrases like "well, he used to work in this field".

In this regard, the editors of the ITinvest blog spoke with Andrey Gorkovenko, the developer, who followed the path of Jesse Spaulding and managed to turn his life around with the help of the stock market and technological knowledge. With this text, we open a cycle of interviews with direct participants in the processes on the Russian stock market - software developers, traders and company executives.

Note: Andrey Gorkovenko used to work as a programmer at ITinvest. In particular, he worked on a project trading terminal SmartX (the history of its creation is described in a separate habratopic). He later created a universal mechanical trading system, with which you can implement various trading strategies in the stock market. This development brings him the main income., which exceeds the average developer salary in Moscow.

Andrey, Hey! tell, how did you get involved with the stock market?

IN 2007 year I left the fourth year of the Voronezh Military Institute of Radio Electronics and started looking for a job. Since I have always been into programming, And, as it seemed to me, possessed certain skills in this area, then considered relevant vacancies. It happened, that I was offered a place in the local Voronezh branch of one of the largest Russian brokers.

And what were your duties there?

My main task was to develop trading applications for the company's traders.. For example, I made various systems and drives forscalpers. With the help of one of these programs, it was possible to enter orders into the trading terminal not with the mouse., but directly from the keyboard. Now this does not surprise anyone, but in those years there were not very many convenient means for trading. Another development of that period is the arbitration robot, able to carry out arbitrage operations in different markets (futures and spot).

It all started as a simple satisfaction of the organization's own needs., but "out of control", because it turned out, that such products are in demand by a wide range of potential customers. A separate company was organized, which was engaged in the development of trading robots and exchange software. From this company, I have already switched to work at ITinvest, where he took up the development of a new trading terminal SmartX (the history of this project is posted here - note. ed).

And how it all came to independent market entry?

Some time after changing jobs and moving to Moscow, i optional, in free time, wrote a new robot, who could trade everything, anything. It wasn't even a robot., and the trading platform, which could connect to the interfaces of various domestic brokers, to different terminals, to the exchange. It was possible to quickly load a trading strategy into it., and she worked. Something like Wealth Lab or Russian StockSharp and TSlab.

  Risk predisposition

The platform was completely written in C # and all strategies, which could be "put" in it were also written in this language. There were ready-made methods for processing applications, deals, receiving data, etc.. You just need to describe the mathematics of a trading strategy., without the accompanying binding of the necessary processes, and the robot will start trading.

This platform is still alive, this is my main source of income. Certainly, in it, little has survived from 2011 of the year, but the basic designs and philosophy remained unchanged.

image

Such a moment is interesting, you yourself are not trader, and the programmer. You wrote trading strategies yourself, or someone helped you? How to make money on such a system, if you do not understand trading?

It was both so and so. Firstly, it helped me a lot, that I originally worked for the company, which was engaged in direct trading on the exchange. I was assigned just to the department of professional traders, whose requests needed to be implemented programmatically. This gave an understanding of the main market mechanisms., as well as knowledge of basic strategies for working in the market. Secondly, i have a partner, who has significantly more experience in trading. a kind Jeff Dean from trading (laughs). No kidding, his experience and insight have greatly influenced my development as a professional trader. Most strategies, who have survived to this day are the fruit of our brainstorming sessions, disputes and reasoning. I also often communicate with my colleagues in the shop., we discuss market and near-market news. From such meetings, you can often learn a lot of new and interesting things.. I came up with some of the strategies myself, watching the market. I also constantly study various solutions on the forums., websites selling trading robots, etc.. hoping to find at least some adequate idea. At all, to make a robot, you need either an idea - your own or someone else's - that you can adapt to your platform and test.

Besides, that time was a scalping boom, when active trading in the RTS futures was just beginning and developing, etc., I wrote drives for this case - I even attached a joystick to the terminal, so that you can send orders from the buttons. Therefore, the basic trading ideas were familiar to me., and it was not difficult to transfer them into a trading strategy.

Generally, this is quite a fascinating process - separating the grains from the chaff. 90% ideas after testing turn out to be slag, and at best, history shows zero. Remaining ideas are checked for hidden and random errors, then they are launched in the mode of virtual execution of orders, and only 1-2% come to real trading.

Understandably. What is the ultimate return on this project? How successful is he, your way? What can you boast about as a successful trader??

I don’t bother with any outward manifestations of success like expensive cars and cool gadgets. (I even use an old iPhone on the phone 4, quite enough, although I can buy anything). In principle, I try to follow the considerations of expediency in everything and live an ascetic life - this hardens and helps to survive any difficulties without problems. But I do not skimp on travel. Only in 2013 year I visited 6 countries (in winter - in the Czech Republic, Germany and Austria, in summer - in Finland, in autumn - in Spain and France). As for life, then, of course, thanks to trading, I was able to get rid of all the boring things like trips to work and meetings, who gobble up a hell of a lot of time (especially in Moscow).

  Stocks or bonds: what to choose for a novice financier

Now I work from home, I have good equipment, monitors, comfortable environment, comfortable armchair. Have I started to work less? Perhaps, No, but I'm free to build mine schedule according to your needs and mood. The only moment, with 10:00 to 19:00, when is the main trading session on the exchange, you need to keep an eye on the robot, so that he does not fall. Or rather, so that the exchange does not fall (over the past year, the exchange has been failing more, than a robot (laughs)). Although this can be done from anywhere - the system has already grown wiser enough and is able to monitor itself and send SMS-messages and emails about its status. You can pick it up even from a cafe, even from Bali.

image

Are you continuing the development alone or you are already attracting someone?

Yes, I continue to develop one. Now they are rewriting the system completely in C ++. While there is no need to attract hired labor.

Let's talk about technology. What caused the initial choice of C # and the current transition to "pluses"?

Initially, I wrote a project in C # because it was easier and faster for me to make a finished product on it.. Functionality, available in the .NET platform, pretty rich (work with containers, streams, files, with XML, availability of GUI), which makes her a good choice. The reason for switching to C ++ is trivial - lack of performance. Now the requirements for software in this regard are very high - the time to recalculate strategies is measured in units of microseconds. Every microsecond counts.

The process of transition to the "pluses" began several years ago, when was the server purchased, and the robot first started colocation first to the broker, and then to the data center of the exchange. Some of the modules had to be rewritten already then, and then I tackled the core too. If we take the current trading robot, then on C ++ all «mathematics, and adapters to exchange and broker systems. Everything else remains in C #. That is, modules are written in a low-level language, requiring minimal delays, and the logic of making trading decisions, GUI and auxiliary modules implemented in high-level language.

This bunch of languages ​​- C # and C ++ - is extremely viable.. On that, it takes me an hour or two to write a new trading strategy or modify an old one. In the case of complex mathematics - a day and a half. At the same time, the system has a built-in back test function., the new strategy can be immediately tested on historical data. Besides, there are genetic algorithms, with which you can optimize strategies.

  When to Take Profits? Ben Carlson's opinion

image

At all, what is better to study topics, who would like to find a job in the stock market?

Tem, who starts their journey in trading or is somehow interested in this area, 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 a wider spread of this language. This means, what java programmers, will be in demand in financial companies, funds and brokers. After all .NET is a rather closed platform., which also has a number of limitations. It is not very suitable for low-latency and HFT trading..

But both .NET and Java can be used to create complete software products rather quickly.. The main disadvantage is that they are not the fastest. (if the count goes to microseconds).

You talked about, that I bought servers for the system to work. It was done for income, which this robot generated? At all, how quickly the project began to bring tangible income?

Everything was bought and done with trading income. The money for all the hardware was withdrawn from the brokerage account. As for income, until then, how the income from the system was equal to the developer's salary, about half a year has passed.

image

At the same time, it is important to understand, what 2011 year, when the project started, was marked by large fluctuations in the market. Money was literally handed out right and left. Certainly, this contributed to the success of my robot, which quickly began to bring in good income. Until the robot was debugged, I traded one or two contracts futures RTS - the risk of losing real money at that time was very high. When it became clear, that the system is working, well debugged and makes money, the amount was increased to tens, and then hundreds of thousands.

That year was very good for the robot., that's when the venture capital was earned, as i call it, which went on to further develop the system. but, if the market conditions were not so favorable, then there would be a high probability, what i would try, lost all the money and forgot about stock market at all (I'm exaggerating, certainly, I would not leave the market, but the loss of start-up capital would be an extremely negative event for the project).

As in any business, associated with uncertainty and risk, there are ups and downs in trading. Mutability (dispersion) results in stock trading, On the one side, allows you to get significant profits (and it's not just about money; time can also be attributed here, and knowledge and views of the world around), but in other way, she constantly destroys my mind. Bringing the line under almost three years of trading on our own, I asked myself - would I give up in favor of trading from (at that time very, very decent for a 25-year-old programmer) salaries, if I knew, what will I worry about these 3 of the year? Definitely, Yes.

http article original://habrahabr.ru/company/itinvest/blog/223551/

Scroll to Top