Algorithmic trading for cryptocurrencies: Avoid these coding traps

Many coders and programmers have been working from home for years, and many more have joined their ranks recently because of the COVID-19 pandemic. Some are finding ways of using their home computer for activities that are, shall we say, non-work related. And with the explosion of trading in cryptocurrencies, many a coder is thinking he or she has the making of becoming the next bitcoin billionaire. So it’s not surprising some programmers are using their skills to dabble in algorithmic trading.

While algorithmic trading has been around for years, it is finding new popularity as a tool to trade cryptocurrencies. Algorithmic trading may seem like a godsend for any programmers willing to strike out on their own. If you are good at math, know the basics of trading, and understand coding, you have all the makings of a successful algorithmic trader. However, in reality, things are not that simple, which is why algorithmic traders are rarely spectacularly successful and often experience severe problems. The good news that most causes of failures can be boiled down to just a few mistakes, and knowing them can significantly improve your chances. In this article, we will cover the most common and mistakes and pitfalls you should know about.

First, let us get the definition out of the way. Algorithmic trading is when you trade (usually in the stock market, but also foreign exchange, financial derivatives, and, as we already mentioned, cryptocurrencies) based purely on rules and algorithms. You do not make decisions on how to behave in each situation — you create a set of rules and stick to them. The advantage of this approach is that you can backtest your strategy — that is, run it against the historical data and see how it would have worked if applied in the past. And this is precisely where most beginner algo traders find their demise. So before you set out to become the next crypto king, here are five traps you must avoid.

1. Over-complicating

Algorithmic trading

First, if you can run a deep analysis of the market and program a highly complicated model that would take into account dozens of variables and rules, it does not mean that you should. While financial markets are incredibly complex systems with thousands of interdependent factors, it would be a mistake to think that they are logical. Most of what happens in them is just noise, with real signals lying deep under the layer of meaningless data. More variables and rules may fit the past data better, but with every new rule, you go further from the real market signals and closer to modeling the noise. Most successful algo traders use simple models — they may not be as spectacular on backtests, but they are better at predicting future behaviors.

2. Over-optimizing

Remember, your purpose is not to create a model that will perform wonderfully in backtests but one that would be good at predicting future performance. One behavior new algo traders often fall into is called over-fitting — extensively tweaking the model so that it would show excellent results based on historical data. However, nine times out of 10, it means that you’ve optimized the model for a specific situation that existed in the past and is highly unlikely to repeat in the future.

3. Ignoring real-time testing

Algorithmic trading

As backtesting allows you to test your model against historical data for as far behind as you want, many algo traders focus specifically on it. It is a natural consequence of the first two errors. Again, basing your model only on historical data means that you refuse to test it against real-life situations. The right approach would be to avoid perfecting your backtest. Find a model that shows decent results and run some real-time tests. If it continues to be successful, try it out in earnest.

4. Falling for models that look too good to be true

Almost any algo trader, sooner or later, stumbles upon a model that shows fantastic historical results. The usual rule applies: If something looks too good to be true, it probably is. It may be the result of over-fitting, a programming glitch, a mistake in a backtest engine, but these excellent strategies usually fail to perform nearly as well in real-time.

5. Not considering slippage and commissions

Algorithmic trading
Freepik / Macrovector

Beginner traders often fail to include slippage and commissions into their backtests. What may look like a perfectly viable edge in theory immediately gets you into the red once you start including commission expenses into your calculations.

Algo trading is not nearly as simple as it may seem in theory, especially when you throw in the volatile nature of cryptocurrencies. There is no Holy Grail you can discover once and reap the benefits indefinitely — it means working in a constantly changing environment, learning new tricks, and finding new ways of doing things. Reading too much into your calculations can be just as detrimental as not understanding how something works in the first place. However, with these tips, you can strike out on your own and, just maybe, strike it rich.

Featured image: Shutterstock

About The Author

Leave a Comment

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top