Algorithmic Trading with Python and TD Ameritrade

Ryan Kemmer
8 min readSep 9, 2021
Image by the author

We are currently in the midst of a technological revolution in finance. With new advances in computing and artificial intelligence, there is a lot that can and will be automated. In recent years algorithmic trading has become much more advanced, and is continuously becoming more common practice. Someday in the near future, we all might just rely on their our own “robo-advisors” to handle our investments, and never worry about markets again.

In this post I am going to show you how to make your own bot that can trade a simple mean reversion strategy using Python and TD Ameritrade. While I am no expert in quantitative finance, I hope this can help make getting started with algo-trading easy and accessible.

What you will need:

  • Python
  • A TD Ameritrade Developer Account
  • Patience
  • EXTREME Caution

DISCLAIMER: The material in this post is intended for educational purposes only and is NOT financial advice. Please be very careful if working with real money. Use at your own risk.

Getting Started

The first step in getting started with our strategy is creating a TD Ameritrade Developer account, and getting all necessary API keys. The reason we are using TD…

--

--