Monday, April 12, 2021

[ CryptoCurrency ] Here's what I learned after building and testing algorithmic crypto trading bots for the past year

Topic originally posted in CryptoCurrency by CyberPunkMetalHead [link]

For the past year, I have been building and testing crypto trading bots, pulling reports and analysing their performance. During my testing, I have trialled different strategies, with various degrees of success and I think that can provide a brief overview of which strategies tends to work and which ones don’t (in my experience anyway).

Machine Learning Bots

These are bots that typically ingest vast amounts of historical data on coin, in order to calculate a predicted price. I used an LSTM model in order to try and predict the price of the top 10 coins. After multiple tweaks and optimisation, I decided that a prediction 4 hours in the future is the most accurate one. Even so, the machine learning bot only got 50% of the trades right, meaning that it performed as well deciding how to trade based on a coin toss.

The issue with machine learning algorithms in finance is that, if they are only ingesting financial information, they remain ultimately blind to all the external factors which contribute to sharp fluctuations in price. Yes, machine learning can detect patterns in the price change with great accuracy if you feed it a big enough dataset, but it cannot account for anything outside these numbers: news, regulations, holidays, behavioural patterns etc..

In essence, machine learning bot that only works on financial data will always be at the mercy of whatever else is happening outside the historical dataset. A more robust algorithm would take into account news, major crypto events and behavioural patterns, as well as the historical data.

Technical Indicator Bots

This category is looking at financial indicators and technical analysis in order to make a short or long term decision on a cryptocurrency. Some of the technical indicators that I tried are: MFI, RSI and Awesome Oscillator. My conclusion is that technical indicator bots have a higher rate of success than a simple machine learning bot, but they are not without faults.

Taking the example of the RSI indicator - or the Relative Strength Index, this is supposed to show you much much momentum is there on a market from a scale of 0 to 100. A value over 70 is considered a strong bullish movement while a value under 30 is typically a bearish sign. The use I used this indicator is once the value goes over 70 and then back under again, let the bot place a sell position. If the value goes under 30 and back over, buy instead.

As you might expect this isn't exact and many times the bot registered false positives. Again, this proves that unidimensional data isn't enough for an informed decision.

Trend bots

In this categories we have bots that determine the current movement of the market and make an entry in the direction of the market. Let's say that Doge is currently going up and has gained more that 5% in the last 10 minutes. The bot would compare the current price with the one from 10 minutes ago and determine that it's a strong bullish sign and the trend will continue. Of course, this strategy is not bulletproof either and requires careful calibration.

For example you would need a strong exit strategy. You want to ride the trend for as long as the trend persists, so you need a trailing stop loss, and not a fixed take profit. During my testing the bot was also prone to false positives, but it seems that overall it outperformed the technical and machine learning bots and actually turned a good profit on XLM!

Social bots

Single Input

In this category we have bots that listen to what a given Twitter handle has to say about a coin and then place an appropriate position based on the sentiment of that tweet. The most recent example that I have is a twitter bot that buys Bitcoin when Elon Musk tweets about bitcoin.

Unfortunately there's no easy way to back test this, but by manually looking that the historical data and tweet correlation between Elon, Bitcoin and Doge, I am actually more confident that social bots have a higher success rate than either of the two types of bots described above. The main reason behind this is that such bots are able to look at the crypto market the same way we're looking at it. I'm sure many of you have speculated on a coin when some massive news happened.

The bot needs to understand what makes people act, in order to understand the human impulse and behaviour. The previous bots just analyse what we did in hindsight, but not what we're going to do based on a social input. In the medium-term I believe we will become increasingly aware of what influent people have to say about cryptocurrencies, and that's why I am continuing the development of this idea into a usable application.

Aggregators

Another example in this category are news aggregators, the hungry ones. In this category we have bots that consume vast amounts of news by scraping the web for every article related to a certain coin. The bots then analyses the sentiment of the news and places a position according to how the media is portraying that coin. This is a new project that I started, as I became increasingly aware of the importance of news, hype and sentiment and this affects cryptocurrencies.

The key for such a bot to work properly is accurate analysis of the news headline sentiment, something that I'm still trying to optimise. I have just begun integrating this system into a bot and will probably be a while before I will have any pertinent insights, but from a subjective level I am quite stoked about how this strategy would work.

In my opinion, the crypto bots of the future will take into account social media sentiment, news volume and other more socially-related metrics to make decisions on the crypto market. WallStreet boys have been using this strategy for a long time, but the freedom of the internet and the blockchain means that we can all start doing the same!

If you are using or have used crypto bots, I am curious to know what your experience was like!


/u/CyberPunkMetalHead your post has been copied because one or more comments in this topic have been removed. This copy will preserve unmoderated topic. If you would like to opt-out, please send a message using [this link].

[deleted comment]


No comments:

Post a Comment