Step-by-Step Database Setup with Python for Trading (Python Tutorial)

B/O Trading Blog
6 min readMar 17, 2023

Photo by Gerd Altmann on Pixabay.com

Storing data locally can make the backtesting and analysis process of your algorithmic trading system a whole lot more performant. In this post we are going to go over the steps how to set up, configure and use the MySQL relational database to load OHLC price data.

What is MySQL database?

MySQL is a popular open-source relational database management system (RDBMS), used by millions of websites. It is produced by for a number of different platforms, including Windows, Mac OS, and several versions of Linux. MySQL is also used in conjunction with Apache, PHP, and Perl to create the popular content management system (CMS) WordPress.

Useful links

Why use MySQL for Algorithmic Trading?

There are many advantages for using a local database instead of fetching price data from a data provider via API. First, large sets data are accessible faster when retrieving them locally versus via an API. By reducing the number of API calls depending on your data provider’s plan you may also reduce the…

--

--

B/O Trading Blog

Blogging about algorithmic trading, Python utilities and passive income opportunities.