A simple AWS Trading System Architecture Design
Image created with Cacoo.com
I recently wrote a series of introductory articles about how to use different Amazon Web Services (AWS) components. In this post I wanted to wrap it up and present a simple AWS design that could be used to build an algorithmic trading system..
I’m not an AWS expert but I wanted to share the insights I have learned about AWS architecture in the last weeks. There are probably a million and two ways to architect a trading system on AWS so this is just one sample proposal of how I would implement it.
This story is solely for general information purposes, and should not be relied upon for trading recommendations or financial advice. Please review my full cautionary guidance before continuing.
Previous Tutorials
The following posts are suggested reading for this post to get you started:
Building an AWS Trading System - Registration & Environment Setup (Part 2)
Building an AWS Trading System - Basic EC2 Operations (Part 3)
Building an AWS Trading System - Basic S3 Operations (Part 4)
Building an AWS Trading System - Basic Aurora RDS Operations (Part 5)
Building an AWS Trading System - Basic DynamoDB Operations (Part 6)
Building an AWS Trading System - Basic Lambda Operations (Part 7)
StockDads.com is a thriving trading community with AI trading stock/crypto alerts, expert advice and a ton of educational materials. Get a 30% forever discount with code ‘BOTRADING’.
Basic Guidelines
Here some basic guidelines I suggest if you are planning to implement an AWS-based trading system:
Research available trading platforms
Probably not the first topic you were expecting in this tutorial but it should be mentioned. Building an AWS trading system is a tall order and if you go that route, I can guarantee you will spend a lot of time building out the infrastructure and less time developing and optimizing trading strategies. So the question arises: where do you want to spend your time?
Algorithmic trading platforms such as TradingView, QuantConnect or CryptoHopper offer trading systems that offer a lot of flexibility in developing trading strategies.
AWS is designed to support all systems for any kind of purpose so it needs to offer a lot of different services, features and configuration options. This makes it hard to select the right options to built a system for trading. So in my view AWS can be overkill for a simple trading system.
My recommendation before you jump into the AWS adventure is to see which trading platforms are already out there and find out if their features fit your needs.
Understand the AWS architecture components
Next, I suggest to start by getting a good basic understanding about what the different available AWS components are, what they are used for and how they work. Check out my introductory post about AWS Components for Algorithmic Trading Systems (Part 1) or browsing the AWS home page.
If you would like to use Python, check out the Boto3 documentation for the different services you want to use. Boto3 is the AWS SDK for Python.
Less is more
Amazon offers a gazillion services, features and configuration options that can be used to build a trading system of infinite complexity. However, building a system like that may not get you into production in this decade.
Instead, focus a few core components that can use to accomplish what you need and then expand to a more sophisticated architecture as the need arises.
Start with small prototypes
Before tackling the task of building an AWS trading system I found it useful to build small prototypes for each component that accomplish a single task such as loading price data into a Aurora RDS or loading news data into a DynamoDB.
Using this approach cuts down frustration as you learn how to work with the different components and you are building blocks of the trading system that you can use later on to construct your system.
Think about how to structure your architecture
Before you start creating EC2’s and databases, I suggest to think about what the end goal of your trading system is and how you envision this system to look like in 5 years. Which data providers do you want to use? Which asset types do you want to trade? Which strategies do you want to run? Which exchanges do you want to interface with?
Having a vision can help structure the architecture. For example, you may want to create a naming convention for S3 buckets and files that supports multiple asset types, assets data provides and time periods. Or you may want to organize EC2 farms by the asset type you want to trade.
Mapping out your architecture in an architecture diagram like the one below can help visualize and plan the system architecture for your trading system.
Use an incremental building approach
Instead of creating all the architecture components at once, I suggest to start building components out one by one.
Building the architecture incrementally prevents you to pay for components you are not using and reduces complexity overload as you are still learning to use the different AWS services.