PART ONE: Setup — Building a Production-Ready Algorithmic Trading Framework
Hello there, and welcome to PART ONE of THREE on how to set up the project.
If you want a specific part of this series, you can find all the information here!
Before we get going, we need to do the groundwork and ensure we have all the correct API keys, software and file structure; a house is only strong if the foundations are proper.
OANDA’s API
The broker of choice for this project is OANDA. They have a nice API with significant historical data going back to 2005. You can, of course, choose any other broker, but I cannot guarantee my framework will work with them. Below is the link to get going with their service. Of course, whilst we are developing, it is safer to use the DEMO account, but if you have more zeros than you know what to do within your bank balance, you can live dangerously and use a live account.
- Oanda API Sign Up: (https://www.oanda.com/apply/select)
Once you are set up and logged in, head to the ‘Manage API Access’. Here, we will generate the API access token used in our framework. Click the generate button, and a long sequence of numbers and letters will appear on the screen, take note of this and keep it safe, as we will need it later on. If you forget or lose it, don’t worry. Navigate to the same area. Only this time, it will say ‘Revoke’. Click it and then click ‘Generate’ again.
Finally, you want to head back to the main dashboard and click ‘Manage Funds’. A new window will load; we are looking for the ‘v20 Account Number’. Please make a note of this, as we will need this later also.
IDE, Python & Tools
The framework is built in Python 3.9, and you will need to have this version or more installed on your machine. To develop the library, I use Pycharm, and you can use any IDE of your choosing, but I cannot help with any problems outside of this IDE.
- PyCharm: (https://www.jetbrains.com/pycharm/download/)
Next, we are going to install python using Conda. You can install it any way you like, but this is quick and easy and gives us access to a wealth of features that you might not have if you install manually:
There are hundreds of tutorials out there on how to install python. I am not going to go over it here.
Finally, you will need the following two applications installed on your local machine:
- FileZilla: (https://filezilla-project.org)
- Data Base Browser (https://dbeaver.io)
FileZilla transfers files between our local machines to the development server, and DB Beaver allows us to query the database to look at the data generated from the framework.
In the following article, we installed our tools, python version and IDE.
In Setup PART TWO, I will review Python Environments and the software packages that help the project run. Stay tuned for more.
If you want to help buy me a coffee that fuels the late nights of research and development of these articles, please consider donating to my PayPal link below. Thanks so much, and have a great day.
May you forever be profitable.