How to compute the golden cross with Pandas in Python

• 2 min

The golden cross is a chart pattern that tells us when a short-term moving average (e.g. 50 SMA) crosses above a long-term moving average (e.g. 200 SMA).

It is often known as a trigger point for a trend reversal.

It is approximative of course, no one can truly know the moment when a bearish trend turns into a bullish trend.

Furthermore, the lagging effect is a bit annoying and past predictions most often fail to predict the future.

However, it is a widely used indicator for technical analysis.

Here is how to compute it

Here you are! You now know how to compute the golden cross with Pandas in Python.

More on financial analysis

If you want to know more about financial analysis in Python without headaches... check out the other articles I wrote by clicking just here: