Introduction: Building a Production-Ready Algorithmic Trading Framework in Python

Joseph Edginton-Foy
4 min readApr 17, 2023

--

Photo by Dayne Topkin on Unsplash

Introduction

Hello there, and welcome to my new series on how to build a production-ready algorithmic trading framework. Medium has been in my life for over a year. Thanks to the countless articles I have read, this series is dedicated to the authors I learned from and to readers like me who have a thirst for knowledge.

This series will be broken into sections that outline how to get the project setup, some basic design patterns in software development and the essential components of any algorithmic trading framework. Then, after we have built the framework on our local machines, I will take you through the deployment steps and how to schedule the tasks to run regularly.

Please note this requires some investment if you want it to be fully operational. However, if you have a machine sitting around not doing anything at home, that will work too.

Final note, I assume you have a reasonable level of python. I will be using some more advanced topics of software development. I will explain why I am using these methods, but I will not explain how they work. Google is your friend.

Setup

This section is about getting you up and running. I will provide links to everything you need. Still, as with anything on the internet, it is always good practice not to trust links from strangers, so I encourage you to go find them yourself. Below are some of the topics I will be discussing:

Photo by Sean D on Unsplash

Software Design Patterns

Writing code for yourself is one thing. Writing code for a framework that will be left unattended on a server is another. In this section, I will cover the following topics that are essential for any system you want to design in the future:

Mastering these topics will make any senior developers very happy. Best of all, you will have a system you can troubleshoot quickly.

Photo by Armand Khoury on Unsplash

Algorithmic Trading Framework

On to the juicy fillet of the project, I will begin to build the libraries used throughout the project. The topics covered here include:

  • Broker Interface
  • Preparing data
  • Feature Engineering
  • Creating Indicators
  • Analysing the features into signals
  • Backtesting
  • Creating trades algorithmically
Photo by Maxim Hopman on Unsplash

Framework Deployment

Finally, I will walk you through the steps to deploy to a server and get everything scheduled to be left as your own personal trading bot. This section is more involved than others as it is done through the command line, nerd alert.

Photo by Lala Azizli on Unsplash

Wrapping up

And that’s all she wrote, folks. Please learn things along the way and help me to improve this framework. I could be better, and I always love to improve my software. So please drop me a message here or on git if anything in this project can be improved. All the code will be available there when the series is finished.

I will add links to each article as they become available alongside the bullet points above. So please follow me and give me a clap if you are excited about this project as I am to write about it.

If you want to help buy me a coffee that fuels these articles’ late nights of research and development, please consider donating to my PayPal link below. Thanks so much, and have a great day.

paypal.me/JEFSBLOG

May you forever be profitable.

Photo by Jonathan Kemper on Unsplash

--

--