DEV Community 👩‍💻👨‍💻

Play Button Pause Button
Matt Hamilton
Matt Hamilton

Posted on • Originally published at

Writing an Algorithmic Trading Bot

So, this is an idea I've had for a while... doing a video and blog series on writing algorithmic trading bots.

I have been writing these bots for the past 3 years now, and made many different sorts of bots using various different strategies and trading on various different platforms. Some profitable, some not. So I thought I'd do a series of videos following me writing the next one.

I'm not an "expert" in these things, and have no education in finance or trading. But I am a software developer and have some experience with data science, stats and machine learning (AI) and it has been a constant interest and side project of mine over the past few years.

Outrunning a bear joke

The cartoon above is the punchline to a joke about two campers in a forest that come across a bear. One starts running, and the other says "What are you doing?! You can't outrun a bear!" to which the running camper says "I don't have to outrun the bear, I just have to outrun you!"

This is my basic philosophy about my experiments with algorithmic trading. I don't have to beat everyone, but just have to "outrun" the "average Joe" in order to make a profit.

The first bot I wrote in 2017, a market maker that traded on the decentralised exchange on the XRP Ledger, was very profitable in the 2017 and start of 2018. But it relied on a certain trade volume that unfortunately is not there any more (although does seem to be returning slowly). I have since written many other bots, some trying to predict price moves over days, some over seconds. Some arbitrage bots working between exchanges. Some exploiting pricing discrepancies on a single exchange.

So this series of posts and videos is going to chronicle the next one that I'm writing, and hoping to put into production. All of these posts will be for Coil subscribers only, and the videos on Cinnamon as subscriber only videos. So if you want to see what's going on you will need to have a Coil subscription.

The first video, is all about my experiences so far, and talks about the background of algorithmic trading and some of the strategies that can be used. I don't go into any code in this video, it is just a video to set the scene. And might be of interest to those interested in trading, finance, and/or cryptocurrencies regardless of technical level.

The first episode of the series is available on Cinnamon. Cinnamon is a Web Monetization-enabled video streaming platform and so you will need a Web Monetization account, e.g. with Coil to view it.

Latest comments (1)

locked777 profile image

Hi Matt,

I apologize for letting my emotions get the best of me. I simply ask you to look at it from a view such as people like me and how you would have reacted.

As before, I humbly request considering sharing the software with me. It would be in my best interest to rather join in.

Best Regards

🌙 Dark Mode?!

Turn it on in Settings