what is algorithmic trading

Algorithmic trading, also known as algo trading or automated trading, refers to the use of computer algorithms (sometimes called robots) to execute trades. It involves the use of pre-defined rules and instructions to automatically make and execute trades, eliminating the need for manual trading. In this article we will do a quick run down of what algorithmic trading is and give you a global view of how it is done.

The Start

When starting out with algorithmic trading you will need a few things. Knowledge of a programming language, like python or C. And a trading strategy that is suitable for algorithmic trading. This can be any strategy you would normally use such as a trend following or a mean reversion strategy. Furthermore with algorithmic trading some strategies are easier to execute than manually, like scalping or using statistical arbitrage.

Ones you have got a trading strategy selected, we want to create pre-defined rules in order to analyze and trade the market data. This includes how your strategy should behave when different parameters, such as: volume, the order book data, the spot price and liquidity change. As these parameters will have (and should have) an impact on how you execute a trade, whether through the numbers themselves or the technical indicator you use.

When you have the trading strategy with its corresponding rules programmed, i would start backtesting. Ofcourse you have backtested before in order to come up with this strategy. But by backtesting it after programming it, you will catch bugs more easily without harming your portfolio. During this phase you generally use the historical market data and look at the performance of the strategy with the algorithm. You can improve it and adjust the parameters in order to increase the profitability. But be aware that you don’t fit your model to the ideal backtest instead of a real time working algorithm.

It’s alive

Great! After a lot of work you got it running and now can finally sit back and relax. We’ll not quite. Even though that it’s now alive still want to do a few things. Which are generally speaking: taking a look at the speed and efficiency, how or risk reward ratio is and if there are any bugs still around.

I will start with what i think is in general the most important part and that is the risk reward ratio (and the risk management associated with it). Make sure that the algorithm is setting the right stop-loss levels and the right position sizes. As there might be errors with this when switching from a test environment to a live environment (with potentially disastrous consequences). If this is all well and good you want to keep a general eye on the profitability and if the risk reward ratio is still within your liking. If not, go back to the backtesting phase and see if you can improve it some more.

In case that the algorithm is working far worse than what it is supposed to do according to the backtest, then this might be caused by a low efficiency/general speed. Even though this influences high frequency traders the most, it can impact anyone. To discover this, look at the trade history and see if the opening and closing of the positions is not according to your estimates. If that is the case, do a speed test of the program to find out if it is programming related and a speed test for your internet to see if this causes the problem. Out of the two problems the programming one is generally harder and more cumbersome to fix, as it relies on either improving the efficiency of your coding or to switch programming languages. Generally speaking, make sure that you have a internet connection capable of the task (so not every minute data scraping on a low bandwidth internet speed), Either a program written efficiently in python (with no endlessly long loops) or in C , as it generally is faster and should be the programming language used for high frequency trading. Other low level coding languages are generally also good for high frequency trading, however there is more information findable for algorithmic trading in C or C++ than other low level languages.

General time estimate

The time it takes to develop an algorithm for trading is very hard to estimate as it relies heavily on your programming skills and how advanced the trading strategy will be. If you are experienced in coding and want to make a simple trading system (like a trend following system) than i would predict that it would take between 1-3 month from start to finish in your off-time. Now if you are inexperienced in coding it can take a lot longer as there is a lot or learning involved. Now for a very advanced strategy like a risk/reward adjusted monte carlo based algorithmic trading system, that reorganizes the portfolio based on presumed/historical risk and reward, it will take much longer. For an experienced coder (as in 10+ at google coder) I predict it will take between 1-3 years of full time work to have a somewhat working model (which won’t be perfect). If you are inexperienced, I would personally advice to go for a simpler strategy. Mostly because of the work amount but also because algorithms like that are for hedge funds that try to minimize risk for billions of euro’s. Instead of making the most gains on a few thousand euros which generally speaking is easier due to volatility and liquidity.

Is it worth it?

In general I would say, YES it’s worth it. Even if it is not profitable. As it learns you a different way of looking at the markets and lets you learn a strategy all by yourself. Now financially speaking it can definitely be worth it. But that all depends on whether or not your algorithm is efficient enough and your strategy is working or not. If either of those isn’t up to par, than you will probably lose money on a 24/7 autopilot instead of having the trades manually in your hands, which can be scary speaking from a psychological viewpoint.

Key take-away

If your serious about stepping into the world of algorithmic trading than I would say, go for it. It can be an amazing learning experience that teaches you programming, statistics and trading. Now if you want truly fast, lazy money i would shy away from it. As the development time (and the learning needed to get to a point in which you can even create an algorithm) would be too long. Furthermore it is also no passive money as you need to update your algorithm and fix bugs/errors when its needed.

Leave a Comment

Your email address will not be published. Required fields are marked *