How to use MACD for algorithmic trading Machine Learning.
Let's dive in. 🧵
MACD (Moving Average Convergence Divergence) is most commonly used in Technical Trading.
But, it can be used as part of a factor model.
Let's see how.
1. What is MACD?
MACD is a trend-following momentum indicator that shows the relationship between two moving averages of a security's price.
The MACD is calculated by subtracting the long-term exponential moving average (EMA) from the short-term EMA.
2. Components of MACD:
MACD Line: This is calculated by subtracting the 26-period EMA from the 12-period EMA.
Signal Line: This is a 9-period EMA of the MACD Line itself.
MACD Histogram: This is the difference between the MACD line and the Signal line.
3. How MACD is used:
The primary method is to look for crossovers between the MACD line and the signal line.
When the MACD line crosses above the signal line, it is a bullish signal.
Conversely, when the MACD line crosses below the signal line, it is a bearish signal.
4. Factor model with MACD
We can add MACD as features.
These features power our Machine Learning models.
And allow us to predict: 1D, 5D, 10D, and 21D returns forecasts.
🚨 NEW WORKSHOP: How I built an automated algorithmic trading system with Python.
Hedge funds have better tools & faster execution.
That ends on July 9th.
👉 Register here to learn how to compete in an unfair game with Python (500 seats): learn.quantscience.io/become-a-pro-q…
That's a wrap! Over the next 24 days, I'm sharing my top 24 algorithmic trading concepts to help you get started.
If you enjoyed this thread:
1. Follow me @quantscience_ for more of these
2. RT the tweet below to share this thread with your audience
P.S. - Want to learn Algorithmic Trading Strategies that actually work?
I'm hosting a live workshop. Join here: learn.quantscience.io/qs-register
Share this Scrolly Tale with your friends.
A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.