Algorithmic Trading Strategy Using MACD & Python

randerson112358
8 min readJun 21, 2020

Determine When To Buy & Sell Stock

In this article you will learn a simple trading strategy used to determine when to buy and sell stock using the Python programming language. More specifically you will learn how to perform algorithmic trading. It is extremely hard to try and predict the stock market momentum direction, but in this article I will give it a try. Even people with a good understanding of statistics and probabilities have a hard time doing this.

Algorithmic trading is a process for executing orders utilizing automated and pre-programmed trading instructions to account for variables such as price, timing and volume. -investopedia.com

Python is one of the hottest programming languages for finance along with others like C#, and R. The trading strategy that will be used in this article is called the MACD crossover.

MACD Chart

What Is MACD Crossover ?

The Moving Average Convergence Divergence (MACD) crossover is a technical indicator that uses the difference between exponential moving averages (EMA) to determine the momentum and the direction of the market. The MACD crossover…

--

--