Inspiration

Interest in finance, money.

What it does

We built an algorithmic trading bot which primarily has two functions, removing market inefficiencies using hedging and market making for illiquid markets to make them more efficient. Our final strategy is solely market making but also checks that we specifically do not create a hedging opportunity for others. Why just market making? Optiver is a market maker so I wanted to impress them to give me a job. jk, hedging alone was causing more problems with managing limits rather than giving profits

How we built it

We used Python and the Optibook API for building the bot. We maintained an internal average holding price book since it was not provided by an API and used it to place trades smartly for the hedging part. For market making, we followed a standard method inspired from a research paper, simplified it for the current use case and tweaked the parameters to obtain an optimal return to risk tradeoff. The core idea is to take our positions into account while proposing a quote and smartly exploiting the current order book for optimal returns.

What makes our approach unique?

Our market making strategy performs fairly well in all markets, be it the highly liquid fossil etf or the green etf. Additionally we consistently have high sharpe ratios than others, which is a true indicator of the long term performance, confirms that our profits are not based on chance. Even though we might not have the highest PnL (we hope we do), we are confident we will have a good sharpe ratio since our philosiphy is to be risk averse. Additionally, we put emphasis on fighting adversaries with lots of sanity checks eventually improving spreads all while preventing risks.

Challenges we ran into

Making money was quite easy initially using the hedging strategy since the order book was iliquid, there were less market players using the same strategy and opportunities were more readily available. Although, it became harder and harder as people started making markets in the same order book, to the point, where we decided to altogether discard that from our final strategy.

There were other issues related to limit checks, which we often ran into, we implemented a self check to prevent any sort of penalty arising from that. Besides that, we used exception handling to restart trading, close positions automatically in case of any disruption.

Accomplishments that we're proud of

We managed to reduce the spread in an illiquid market and made it more efficient. During the process we also managed to make some profit. Particularly we tried to maintain our position as neutral as possible in order to minimise risk.

What we learned

Making money in High Frequency Trading is very challenging, a strategy which works now may not work in the future and you have to constantly analyze, adapt and iterate on your strategies to stay above others. Handling risk and doing sanity checks is very important. I myself blowed up the whole portfolio several times due to not handling carefully crafted orders by adversaries.

What's next for the Optiver Trading Bot

Exploring more complex market making strategies making use of deeper trade histories, possibly using indicators to identify pricing trends to get an asymmetrical spread when required.

P.S. Thanks to my teammates for their moral support xD, we wanted both the iphone and apple watch so they left me alone :( ~ Naman

Built With

Share this project:

Updates