MarketMakerBot

Challenge

Create a bot that tries to stablise a fictionary market, with four stock assets and two ETF's, out of which two are sustainable and two aren't. Another challenge is to move the market from the liquid fossil-fuel based market to the sustainable market. (Read more at the first link)

Our Strategy

Because we were a team of introverted informatics students and don't like to take risks, we developed our trading bot to only trade when he sees that a profit can be made. The bot calculates the theoretical value of the ETFs based on its current stock prices and calculates whether the ETF's value is above or below it's actual value. Based on that, the bot rotates it's position and either sells the ETF and buys the stocks instead or the other way around. This is done in the right ratio and only as much volume is traded as the current asks / bids are offering.

By doing this over and over again, the bot makes a lot of transactions with small margins of money resulting in a considerable profit after a while.

Furthermore, the bot constantly looks for opportunities to sell its stocks, if it can sell them for more money than it invested when buying them (and the other way around for its short stocks).

Our Issues that we ran into

We ran into the given limits pretty quickly and were wondering why our bot keeps crashing and disconnecting, but once we found the limits at the bottom of the challenge page, nobody could stop us. Actually, we stopped ourselves, because we were so tired that we implemented our logic wrong (only for a short time) and made an infinite money glitch for other teams to exploit. Once we were stuck with ~(-500) ETF Stocks. nobody wanted to sell ETFs, only buy them. Our bot still wanted to do trades, but we unfortunately had to stop it every time. Fortunately there were plenty of resets, out of which we only used the last two to really test our code. By that time most of the teams had already finished or weren't trading anymore, so the marked wasn't saturated enough to be able to test successfully. We had some logistical issues as well, because each of our team members took at least an hour to arrive at university and unfortunately we haven't thought at the beginning to partake in the race to reserve a room.

How would our bot work on a very busy market?

As previously stated, our bot did not have enough buy options for ETFs, that's why it failed. With a more active market where more people (and bots too) were involved, there would soon be one clear winner (our bot, obviously). We wouldn't have only stabilized the market liquidity, but also made one hell of a PnL.

Summary

We did enjoy working on this challenge, especailly given all the tools provided by the challenger - Optiver - such as the free EC2 instance where we could test our python scripts and convert to a Jupyter notebook. The interesting and amusing part was also the dashboard (first link below), where we could instantly see any advancements or mistakes that our bot and other teams' bots made.

Thank you very much for reading these long paragraphs, if you have gotten this far, whenever you see us at Uni just come to us and say "Hey Mate!" and it will be our honor to personally present to you a gift. (The gift will be a strong handshake)

Built With

Share this project:

Updates