Algobots are open source projects in Github, programed in JavaScript. AACloud calls algobots and puts them to run in specific time intervals. Algobots consume services from the platform and data from other algobots, especially from indicator algobots, and at the same time, produce an output that is stored in the cloud (to be consumed by other algobots).
The AAPlatform handles three different types of bots, differentiating them by their incumbencies:
They extract raw trades and order books data from exchanges and store it in a standardized format for other bots to consume.
You will not need to program these kinds of bots for this competition, as we will be using an existing one –Charly– which gets raw data from Poloniex, the one exchange we will be working with.
They process raw trades data and other indicators to output elaborate data structures, mainly technical indicators, for trading algobots to consume.
You will most likely need to program i-gobots in order to perform Technical Analysis studies or functions. While it is true that you can process data and do all sorts of calculations from within your trading algobot's code, this is not recommended. Advanced Algos Ltd. encourages developers to respect incumbencies assigned to each type of algobot, for several reasons:
-
The AAPlatform's architecture is designed so that algobots can consume data from other algobots, in order for the network to reuse resources. By respecting the incumbencies of each type of algobot you contribute to growing the platform along with the embedded ecosystem in a sustainable manner.
-
The AAPlatform is set up as a marketplace of Extractor, Indicator and trading algobots. If you program and release an i-gobot, you will soon be able to monetize that effort as algobots consuming the data your i-gobot generates will pay you a fee.
-
If instead of creating an indicator algobot, you do the calculations from within your trading algobot, anyone can come at a later time, extract from your trading algobot the code that performs the calculations, and create their own indicator algobot with it. This means you may permanently lose the chance to monetize the indicator functions and effectively allow someone else to do it instead.
They automate trading strategies and place orders through the platform, which connects to exchanges via exchanges APIs to trade cryptocurrency.
Algobots mission is –in essence– creating products that others can consume. To do this, they run processes which produce and store datasets.
Eeach algobot may have several processes, and processes don't necessarily have a one-to-one relationship with products. That is, a product can be the result of the work of one or more processes.
Algobot processes are self-contained entities, meaning that they run when called by the AACloud and stop when they finish the task at hand, to wake up again only when AACloud calls the process the next time (in configurable intervals). The datasets processes create are the actual output of algobots which are stored in Azure Cloud Storage accounts. But process also produce and store a second valuable piece of information: status reports.
Status reports serve as temporal annotations that algobots read every time they are called by AACloud so as to know what was done in the previous run and what the state of affairs is at the present time. Status reports are dynamic, and they change constantly, with updates after every single run of the associated process.
We established that algobots produce products for others to consume. This "others" include other algobots, meaning that algobots usually depend on the datasets produced by other algobots. We call these data dependencies, which are declared on each algobot configuration file.
Algobots consume their own status report and they might as well consume status reports from other algobots. We call these status dependencies, which are too declared in each algobot configuration files.
At this point in time, there are five different types of datasets: market files, daily files, minutes files, single file and file sequence. These types of datasets define the structure of the data and how it is stored.
A market file contains data spanning the whole existence of the market, that is, from the day the pair (e.g. USDT-BTC) started trading up to the present time. The data is stored in one single file, which is appended every time the process runs generating new data.
A daily file contains data segmented by day. That is, the process generates one file per day and stores it in the deepest level of a folder tree structure of the following type: Year > Month > Day.
A minutes file contains data pertaining to one single minute and is stored in the deepest level of a folder tree structure of the following type: Year > Month > Day > Hour > Minute.
A file sequence consists of sequential information that is not necessarily structured on any particular timeframe. The process stores a to files: the one ending in .Sequence.json contains the number of files in the sequence, and the sequence is formed by multiple files ending in a sequential number (e.g. 15.json).
A single file is pretty much just that: a dataset that is stored in one file only.
Let's put all this in perspective by analyzing the processes, products and dependencies of a few existing bots.
Charly is an extractor algobot. As his README file explains, he "gets trades data for all markets –both historic and live– assuring consistency using recursive processes, and store it in a highly fragmented and usable dataset".
Also explained in Charly's README file, Charly offers one product which is defined by the dataset scope and various characteristics. Please, go on and review Charly's README file and become familiarized with the concepts detailed in there.
Charly has three different processes: Poloniex-Live-Trades, Poloniex-Historic-Trades and Poloniex-Hole-Fixing. These three process combined generate the one single dataset that constitutes Charly's single product. The dataset is stored under the minutes file structure.
Now, let's see what Bruce, an indicator algobot, does with Charly's product. As you can learn from Bruce's README file he produces two datasets: candles at 1 minute resolution and volumes at 1 minute resolution. The datasets are stored under the daily file type of dataset.
Now scroll down the README file and see what Bruce's dependencies are. That's right. Bruce depends on Charly's product. Bruce's processes take the trades data that Charly extracted from the exchange, performs calculations to build 1 minute candles and stores his own dataset with more elaborate data. In other words, Bruce is adding value to Charly's product and offering a new value-added product of his own.
But the value-adding chain does not stop there. Let's take a look at another i-gobot, Olivia. According to her README file Olivia offers four different products: candles at sub-hour resolutions, candles in resolutions above one hour, volumes in sub-hour resolutions and volumes in resolutions above one hour. And guess what? Indeed, Olivia uses Bruce's one minute candles and one minute volumes to produce complementary candles and volumes at different resolutions.
And so it goes. The last link in the chain usually comes in the form of trading algobots using data from indicator algobots, as that is the ultimate purpose of the whole algobots ecosystem: to provide trading algobots with quality preprocessed data they can use to make the best possible trading decisions.
Let's take a look at Artudito, for instance. Artudito –a t-gobot– uses candles and volumes from Olivia and regression curves from Gauss to make trading decisions. Of course, the main goal of a t-gobot like Artudito is to perform profitable trading. However, notice that trading algobots too have outputs, and thus offer products that are consumable by others. Trading bots output three different products: Live Trading History, Backtest Trading History and Competition Trading History. Those datasets are available for others to consume. For instance, the AAWeb application uses those datasets to show t-gobots activities on a visual environment resembling typical candlestick charts so that anyone can dive in and analyze what algobots are doing.
Plotters are –too–JavaScript programs created by Algobot Teams. They serve the purpose of creating a visual representation of datasets so that people can easily interpret the data. For instance, Plotters-Candles-Volumes creates the visual representation of candlesticks and volume graphs.
Algobots are usually associated to plotters in order for the AAWeb app to be able to plot the corresponding datasets. For instance, trading algobots use Plotters-Trading.
Table of Contents: Basic Definitions | About The Competition | The AAPlatform | Setting Up Your Development Environment | Trading Algobots | Starting Out Your Own Algobot | Launching Your Algobot