3 Ways to smooth the Price Waves (with Python)

B/O Trading Blog
7 min readJun 16, 2022

Photo by driawanadipra605711 on Vecteezy.com

When performing visual technical analysis, developing trading strategies, or strategy validation it can be very helpful to reduce the volatility and noise of a price chart in order to be able to be able to clearly recognize trend lines, levels of support and resistance and pivot points.

This story is solely for general information purposes, and should not be relied upon for trading recommendations or financial advice. Source code and information is provided for educational purposes only, and should not be relied upon to make an investment decision. Please review my full cautionary guidance before continuing.

In this post I would like to review three ways to smooth the price curve and discuss the pros and cons of each. We will also go over the implementation of each method in Python.

Here the three methods we will be using to smooth the price curve:

  • Simple Moving Average
  • Exponential Moving Average
  • Kernel Regression.

Trade Ideas provides AI stock suggestions, AI alerts, scanning, automated trading, real-time stock market data, charting, educational resources, and more. Get a 15% discount with promo code ‘BOTRADING15’.

--

--

B/O Trading Blog

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