Skip to content

Bot tournament

Gianluca Detommaso edited this page Feb 15, 2021 · 3 revisions

In order to argue whether the information provided by Volatile were any useful in the past, we offer the possibility to run a "tournament", where a set of bots trades daily according to some pre-fixed strategies, which are described further below. Please mind that the tournament is a simplified market scenario where bots are allowed to buy and sell once a day, only and exactly at adjusted closing prices. Price variations intra-trading session, transaction fees, slippage and dividends are currently not simulated. You can run the tournament as follows:

python tournament.py

By default, the tournament runs over the last month. However, you can change approximate start and end date by adding corresponding flags to the command above , e.g.: --start 2020-12-01 and --end 2021-01-26. Furthermore, bots start with an initial capital of 100000 USD; if you instead wanted, let us say, 5000 EUR, you can add the flags --capital 5000 and --currency EUR.

While the tournament is running, you will be able to see its current state parsed in your shell. For example:

Screenshot 2021-02-01 at 19 57 11

For every day of the tournament and each bot, you can see its total capital, how much of it is invested and uninvested, a list of stock the bot owns and a portfolio risk measure (see technical section). When the tournament is over, plots of capitals and risks over time like the following ones are respectively saved in the current directory as tournament_capitals.png and tournament_risks.png.

Screenshot 2021-02-01 at 19 48 58 Screenshot 2021-02-01 at 19 49 12

In this case, Betty and Eddy lead the way, but they also own the most risky portfolios.