How I found joy in continuous software delivery again — Part 1
By: Reza Mirzaei
Tags: DevOps, Algorithmic Trading, Stock Market, Azure, AI

A short story about how I got back to developing and delivering software continuously; using Python, React and Azure to create a simple website for stock market analysis.

Covid-19 and the subsequent lockdowns have given me more time on my hands than usual. Having spent the larger part of the last 4 years in management, I decided to use some of this new found time to “get back to my roots” as a software developer. As someone who embraces DevOps, I wanted to once again feel the joy of continuously writing and delivering actual working software.

I had a fair idea of what I wanted to do, but seeing as I hadn’t done any real software development in years, I pretty much had to set up everything from scratch.

In this first part, I will share with you how I began the overall task of setting up necessary tools, services, platform and DevOps process.

For now, I will not go into detail on code or configuration, nor will I explain DevOps or discuss issues related to stock market analysis. These topics will be covered in upcoming parts.

The beginning

It all began with a few Python scripts I had written to support me making decisions in the stock market. These scripts were quite simple and I didn’t even have a proper development environment or code management tool. All I had done so far was out of sheer curiosity, simply using Google Colab:

Google Colab — Simple Python script

I decided to improve on these simple scripts and make them available for anyone else interested. I also wanted to add an extra dimension to it all by using some sort of cognitive service to evaluate market sentiment towards stocks.

Conceptually, what I had in mind looked like this:

Conceptual architecture

Users would simply access a website that displays information about stock prices, indicated movement and market sentiment.

Development environment and platform

Before I could start doing any work though, I needed to establish:

A local development environment

A platform to run it all on

A DevOps environment with CI/CD pipelines for continuous delivery

For local development I chose Visual Studio Code. All backend functionality is programmed using Python. The frontend is written using React and React-Bootstrap. Code management is done with Git.

The cloud platform I opted for was Microsoft Azure. It provides all services necessary to run and operate the website, manage data and provide access (e.g. App Service, Cosmos DB, Key Vault, B2C, Application Insight).

I picked Azure DevOps to manage the development process and as code repository, to plan and execute the actual work and to implement necessary CI/CD pipelines.

Architecture

Once I had established all of the above, I designed the overall architecture of the website using some of the available services in Azure:

Overall architecture

And I went to work…

Starting in November and spending a few hours once in a while in the evenings and weekends (when there was no Formula 1 on, or Liverpool FC wasn’t playing), I managed to create an MVP (Minimum Viable Product).

You can access the MVP (with it’s obvious limitations) on simplestocks.tips. Please make sure to read the disclaimers!

Going forward…

So to begin with I had:

An idea of what I wanted to do

Overall architecture

Basic set up of tools and platform

In the next part, I will cover how to set up the development environment with Visual Studio Code and Azure/Azure DevOps. I will use the frontend React application as an example.

Part 3 will focus on algorithmic trading, which indicators and multiples I chose, and how I implemented the calculations and exposed the results with a REST-API.

In the final part, I will cover the use of cognitive services (AI/text analysis) to assess market sentiment.

In all the upcoming parts, I will refer you to other online resources I found useful in the process.

I hope this article and the upcoming parts prove helpful or maybe even inspirational for someone else looking to start their own DevOps journey (or finding their way back).

If you have any questions regarding architecture, programming, Azure or DevOps, feel free to contact me. I’ll be more than happy to discuss my work or help you get started.

Reza Mirzaei