Make Money Sleeping — Really!

Alexandre Stakonski
7 min readJul 5, 2022
a very rich cat sleeping while algorithmic trading bots work for it

One of the things I love the most in computers and programming is the way we can automate work and tasks, allowing us to do the regular human stuff and enjoy more free time — which also allow us to break new grounds.

In the past couple years I’ve been learning on how to tame algorithmic trading and want to share with you my experience and some tricks as well. I truly believe that when we contribute with information and knowledge it also grows even bigger inside of us. So don’t forget to share it with a friend, if you find interesting.

At the end of this article you’ll be able to identify the top characteristics of algorithmic trading approach, the most common strategies used by professionals and even online tools that you can use to “make money sleeping” — with no coding experience required.

Algo Trading? What is that?

In simple terms algorithmic trading (aka algo trading) is a way to make a computer following some strategy that has been determined previously. People often refers to this computers and programs as “bots”, because it works and follow instructions just like a robot.

If you’re familiar with the financial markets or trading options, you know that there’s two kinds of human emotions ruling it all: Fear and Greed. That’s the main reason why investors “feel” the market is going up or down (a.k.a. bullish and bearish markets, respectively).

In algorithmic trading we eliminate the emotional part and focus only in the strategy based in some conditions, no matter what happens. On most cases it can be very useful when avoiding market traps and manipulation - classic human mistakes.

Strategy comes first

The most complicated part is also the core of good results: determining an efficient and consistent strategy. It can be done by using cutting-edge tech such as machine learning and artificial intelligence, applying existent strategies from big players or even using online tools that automate this work for a small slice of the profits.

In the following paragraphs we’ll be discussing different kinds of strategies used by professionals worldwide. The process of creating an algorithm for trading requires some understanding about the market behaviors, common indicators and how to translate this into code.

There will be more explanations, but for now let’s dive into the most popular use cases and approaches.

Sentiment Analysis

The sentiment analysis algorithms is a machine learning technique that uses portions of text to determine if the author’s feeling is positive or negative, generating assumptions about the market conditions. It can be very useful in some cases, specially for mid and long term trades.

The data used to feed this algo can be found in news, tweets, social media posts, blogs, etc. More content tends to increase the chances of generating better results, usually interpreted as tendencies. As every other algorithmic model, it is very important to avoid biases and presumptions when collecting and managing data — which leads to underfitted or overfitted models.

This kind of algorithm is widely used in different types of analysis, not just in financial cases. So it’s relatively easy (and free) to find materials and information about it over the web, specially in opensource communities such as GitHub.

Mean Reversion

This is a very common algorithm strategy, resulting in the assumption that every prices tends to revert to it’s average over time. This phenomenon can be seen often in almost every kind of the daily life — in the markets it’s not different.

One of the ways to evaluate this mean is using moving averages on multiple time frames for confirmation, expecting some price regression between it’s average values. This approach assumes that trends eventually reverts an never lasts forever.

Correlation with related assets also can be very useful for determining how and when it’s gonna return to the “normal state”. Assuming it’s gonna happen is the basis for mean reversion techniques which is presented in different types, depending on the kind of market and it’s interpretations.

Momentum and Trend Following

We can define momentum as the currently trend for something. In financial markets it can be used to interpret the continuation of a moving direction of certain asset, event or even a whole sector. There are may ways to analyze it, such as by news, launches, or even overnight gaps that tends to get filled.

It’s actually the opposite of mean reversion techniques, because it usually assumes that the trend will last longer. This also means that momentum and trend following are used for short term trades, typically resulting on it’s seasonality nature and tendencies.

Trend following is a adapted version of momentum strategy, and as the name suggest it means going with the market flow while identifying opportunities and taking advantages on price trends. It usually take longer a little longer than the momentum time frame, depending on the implementation — which can be used for mid-term trades as well.

Identifying Orders in the Market

This is another common type of algo strategy and means making orders based in the movements of big market players. In stocks and commodity market, institutions and organizations usually don’t buy in the same places as retail investors (aka me and you).

When this players create positions it tends to be so bigger that the whole market would go crazy and move entirely in one direction. For this reason they tend to make orders from different sizes and time of execution, which can be tracked and copied.

In cryptocurrency markets it’s even easier to track the so called “whales”, because of the transparent nature of Blockchain. Websites like Whale Alert do this job to you for free. This data can also be obtained through Telegram channels and different APIs, allowing our algorithm to be even faster and precise.

Basic Steps for Creating an Algorithm

There are some aspects to consider when creating and implementing an algorithm, specially on how to deal with data and model creation. It also will depend on the behavior of your strategy and the time frame of your trades.

It’s also important to notice that besides the strategy, a bot also need other implementations such as dealing with exchanges or brokers interfaces, executing buy and sell orders and being online all the time.

Collecting and Understanding Data

Data can be found in all kinds of different places and it’s very important to understand what this data is and how hard it is to turn it into valuable information. There’s a cycle in this process that usually goes like this:

  1. Getting the data (which is quantitative or qualitative);
  2. Generating relevant information from this collection of data;
  3. Making meaning from this information, which is knowledge.

This is a crucial part for the algorithmic system to succeed, because this process will eventually lead to action and decision making. Good streams of data tends to be APIs which are a different interface to deal with apps and systems in a very fast pace. A good (and free) example is CoinGecko data provider for cryptocurrency, and Yfinance library for stock and commodity markets.

Since you know the ingredients and how to get and deal with them, now it’s time to develop and train a model.

Creating a Model

As spoken before, the most crucial part tends to be the modelling process which is basically translating your strategy into code for the algorithm to properly deal and work with it.

One of the most popular programming languages used in this kind of approach is Python because of it’s versatility and easy comprehension. But it’s OK if you don’t want to code, there will be some ready-to-use tools in the next section of this article.

In computer science, creating a model means telling the computer on how it should deal with certain types of patterns. This model is a set of data used to train the machine to recognize a certain type of information and take automated decisions and actions repeatedly, based on it’s interpretation.

As you can see, there’s no such thing as magic here because in the end a computer is just a sophisticated calculator. The hard part resides in human work for creating the best model for it to follow and succeed.

Backtracking

After creating the model and training the system, it’s time to put it into work in the real world. But instead of sending it directly to the “production environment” and risking losing your capital, it’s always recommended to test it with previous data.

This process is called backtracking and it uses datasets from the past to validate the model. If it’s supposed to work with data from the present, it should also work with data from the past too, right?

Sometimes it can vary too, so you’ll need to reevaluate the model or modifying if necessary. But testing it with data from the recent past usually tends to be the best choice.

Making it Simple: Online Options for Algo Trading

As mentioned before, you don’t need to be a savvy developer or a computer wizard to use algorithmic trading, today we can found easy and accessible solutions in the web. Now I’ll share with you two kinds of “bots” that are easy-to-use and tested by thousands of investors everyday.

The website CryptoHopper offers solutions for both beginners and advanced traders, varying from a range of bots and services that uses different kinds of algorithms to trade in the cryptocurrency market. It’s a very good place to start - go ahead and give it a try!

The Bybit Exchange is now offering grid strategy bots for trading options using artificial intelligence, which can be used to print profits continuously. It is free to create an account and all you need to do is to buy or deposit some cryptocurrencies (or even fiat) to use this bots. It’s easy, try it here.

Conclusion

In this article we explored a little about algorithmic trading, the most used strategies and some online tools for those who are starting in this fascinating field of finance.

I hope you enjoyed the ideas and information I’ve posted here, algo trading is a vast field in the finance universe and also a very profitable one. If you want to ask or discuss anything related feel free to contacting me (via about section).

Please leave a comment if you want to share your experiences in algorithmic trading, different strategies and approaches or any related contribution and feedback. See you soon!

--

--