Overview of Trading Bots: Can They Generate Profits?
In this article, we will look at different approaches to creating trading bots and look at their effectiveness. To answer the question of the effectiveness of bots, we spent a lot of time on research in the field of neural networks, algorithmic trading, and classic trading and can now draw conclusions for further research and practical application.
This article assumes that you are familiar with the stock and cryptocurrency markets and have a general understanding of why you need a bot or are simply interested in the theory behind them. This article will not contain any code parts and is intended for educational purposes only.
Exploring Trading Bots: A Comprehensive Guide
Let's start with the facts. The idea of trading robots is not new, there are many publications about them, they are used by financial institutions and banks, but do they really help? There are quite a few studies and thoughts on the topic of algorithmic trading, but they all come to a vague conclusion.
Most often, the authors of these bots are either traders with some thoughts and reflections, or programmers without trading experience. We will try to dissect this topic as much as we can.
If you are a programmer or are familiar with the basics of scripting, you can write your own bot in a few hours. But will it make enough money for you? Will there be a stable income? Will it ever reach $100,000 in annual income? In this post, We will answer these questions and give you some tips on how to move forward.
What is a Trading Bot?
A trading bot is an algorithm that transforms market conditions into trading decisions (usually buy, sell or hold). Nothing special here.
What Types of Trading Bots are There?
A trading bot (usually a computer program) used by traders in the market is based on algorithms created by programmers. Such a bot is capable of accepting various types of strategies since it can be embedded with various logical schemes or rules that determine its behavior in the market. This means that programmers can add various trading strategies and tactics to the bot, making it a flexible tool for traders.
By type of traders and types of trading, the following options can be distinguished:
- Long-time traders - investors.
- Swing traders - are those who place trades for a week, month, or year.
- Day traders - are those who place a small number of trades throughout the day without moving them overnight.
- Scalpers - are those who make many trades per day, hour, or even minute.
All these types of traders can be implemented as a bot.
Where Can a Trading Bot Place Orders?
Wherever you want and can access the broker's API or through reverse engineering (may be considered fraud/hacking by some brokers, so it is better to clarify this point in their policy).
But no one forbids you to model your own brokerage conditions, commissions, spreads, prices, and receive current prices for shares or cryptocurrency without having funds directly from the broker. Thus, it is possible to test the bot without resorting to real trading, and depending on the quality of the simulator implementation and the chosen type of trading, how well the strategy fits the real market will depend.
What Types of Bot Implementations are There?
Simply put, types of algorithmic trading. Since the bot is a complete program that implements the trader’s trading behavior automatically.
-
Neural network or artificial intelligence - there could be simple bots with a single perceptron, based on several neurons, complex LSTM networks, or even news analysis based on keyword heuristics, and semantic search with NLP.
-
Quantitative trading (quantitative trading) - based on a strategy that combines any criteria for decision making, this could be comparing indicators, price behavior, searching for patterns, etc.
-
Semi-automated, alert bot - will use some algorithms to tell traders what to do. This type includes indicators based on any strategy.
-
Genetic Algorithms - This could be classified as a subset of machine learning/neural networks but is not really studied enough to define this type of algorithm as a machine learning approach. Implementations of genetic algorithms vary, are being researched by universities around the world, and are part of a larger topic beyond the scope of this publication.
So, we have answered the basic questions that can already reveal a little theory before you start writing your bot. But what next? Once we understand what a bot is, we can think about measuring its KPIs.
Measuring the Quality of a Trading Bot
To measure the quality of a bot, we can use the backtesting technique.
Backtesting is a technique that involves simulating trading using a certain time range of previously available data and/or additionally simulated situations (the so-called side cases, these include a crisis, sudden collapses or market growth, massive movements of sharks, etc.).
Let's take some heuristics to work with, such as available funds, the time frame it works with, stop loss, and take profit ranges. We can use other heuristics based on whatever trading strategy we want to use (for example, neural network bots can determine their heuristics based on market conditions using the same news).
The best way to determine the quality of a strategy is to write its prototype using TradingView. Using their documentation, you can easily write a strategy in Pine Script (which has a very simple syntax).
As you can see in the picture above, a simple scalping strategy is implemented, based on a bull trade (long order) after each green candle.
However, despite the exponential growth of the account in TradingView, this strategy is not applicable on any of the exchanges, as it uses a stop loss of 0.01% and a profit of 0.5%. At this percentage, you can automate trading and even place a stop-limit order in its range, but you won’t be able to survive with the commissions that the broker offers.
Calculation of the Trading Bot: Binance offers a commission of 0.04% for any market trade (make order) at the first VIP level. Thus, any stop loss will be executed with the following result: 0.01 + 0.04 * 2 = 0.09% loss for 0.5% profit (multiply by 2 since the commission is applied both for opening a trade and to close it).
This strategy will not survive with a profit ratio of 1:5, since we only have a 2.79% percent profitable (meaning that only 2% of all orders placed are profitable, the rest are executed with a stop loss).
Using fairly detailed analytics taken from TradingView, we can quickly develop our bot strategies before using the real market or demo trading. Especially if we plan to create a server bot with a complex structure and a small interface.
This is what successful implementation of a trading algorithm looks like:
If you have a good net profit combined with a percent profit above 60 (at a minimum), you may want to consider implementing a real trading bot. Does this mean bots are effective? Can we answer this question now? Yes, sure. They are effective. But let's take a closer look at this issue.
Do Trading Bots Help You Make Money?
Yes, sure. This is why many hedge funds, banking institutions and large financial companies hire machine learning and algorithm specialists. These people are responsible for implementing automated trading bots to trade international markets with specific data.
So how much money do they make from trading bots? Can we count and answer?
Below is a strategy with a daily growth of 1% with compound interest will give about 40% monthly returns. But this is only realistic in theory.
Profit depends on many factors. At least from the heuristics that programmers put in place. Risk management, market conditions, available funds, etc.
It can be noted that a good forecast within a trading day with low volatility can give about 0.6-1% of stock movement. If your bot does not lose any trades during the trading month, you will earn about 20% every month, for the “all in” strategy, a $10,000 account will earn $2,000.
We can use margin accounts and use leverage, manage risk or use pyramiding, short stop loss or long take profit or different types of trading bots, they will all work differently.
You need to understand that a bad algorithm can destroy your entire deposit if any mistake is made. So make sure you have completed all the tests and used your bot for demo trading before you start using it with real money.
So can he make $100,000 in a year? Of course, proper risk management, strategy and a proportional amount of money can give you such profits.
Stability of Financial Bots
Stability in our time is becoming an increasingly blurred concept. In terms of constant profit, it depends on stock and market conditions, the chosen strategy, and the type of algorithm. The bot can make a 2% profit in a couple of hours, and then the market will change its direction, and it will close positions in the red several times and as a result, suffer a 3% loss at the end of the day.
Programmers must follow risk management measures. To do this, study the fundamentals of trading archivally.
Below you can see the NASDAQ collapse in 2020 by 30% in a month. If the bot had bought back the drawdown at the end of the month, then after a few weeks it would have recouped the entire loss.
Market conditions change from year to year, month, day, or even minute. These points can break many algorithms, including complex neural networks if they do not implement risk management and the correct placement of order stops.
Conclusion
Trading bots are an effective way to organize your trading or investment, but they need to be thought out and well-tested before you start using them with your own money. Make sure you are knowledgeable about the technologies you use to create algorithmic trading. Automating trades with bots requires careful planning and testing before risking real money.