Here’s a couple of more callouts on Moving Averages and then I’m moving on to trend analysis indicators.

I have to say, I’m pretty impressed with all the different ways to come up with moving averages, and studying the math behind each and every one of them (as well as implementing them in Ruby – my programming language of choice), it has been quite the rabbit hole of learning something new every day.

## Kalman Filter

One novel way to smooth out the price action curve doesn’t rely on periods (or range) of candles at all and that is the Kalman Filter, which has been taking from physics realm for describing physical motions and dynamics and applied to stocks.

The Kalman filter uses a system’s dynamic model (e.g., physical laws of motion), known control inputs to that system, and multiple sequential measurements (such as from sensors) to form an estimate of the system’s varying quantities (its state) that is better than the estimate obtained by using only one measurement alone. As such, it is a common sensor fusion and data fusion algorithm.

Noisy sensor data, approximations in the equations that describe the system evolution, and external factors that are not accounted for all place limits on how well it is possible to determine the system’s state. The Kalman filter deals effectively with the uncertainty due to noisy sensor data and to some extent also with random external factors. The Kalman filter produces an estimate of the state of the system as an average of the system’s predicted state and of the new measurement using a weighted average.1

This is what the Kalman Filter does on a Bitcoin/USD 5 minute chart (light blue/cyan line):

## John Ehlers MAMA – The Mother of Adaptive Moving Average

This is a moving average indicator designed with trending in mind. From personal observation and experimentation over the last few days, I have to say this one beats EMAs and cross-over hands down. It’s earlier to detect those trend reversals and mutes the whipsaw issues prevalent in utilizing two indicators against each other to find trend changes via their cross-overs.

The MESA Adaptive Moving Average (MAMA) adapts to price movement in an entirely new and unique way. The adapation is based on the rate change of phase as measured by the Hilbert Transform Discriminator I have previously described. The advantage of this method of adaptation is that it features a fast attack average and a slow decay average so that composite average rapidly ratchets behind price changes and holds the average value until the next ratchet occurs.

An interesting set of indicators result if the MAMA is applied to the first MAMA line to produce a Following Adaptive Moving Average (FAMA). By using an alpha in FAMA that is half the value of the alpha in MAMA, the FAMA has steps in time synchronization with MAMA, but the vertical movement is not as great. As a result, MAMA and FAMA do not cross unless there has been a major change in market direction. This suggests an adaptive moving average crossover system that is virtually free of whipsaw trades.

This is the MAMA/FAMA indicator2 on same chart as Kalman Filter above:

## Zero Lag EMA

If you’re a fan of moving averages cross-over trading strategies (buy when fast/short period MA cross slow/long period MA), then give this Zero Lag indicator3 a spin. It’s an extremely simple offset EMA based on the EMA of the period plus it’s difference with the EMA of the EMA of same period.

## Kaufman Adaptive Moving Average

Developed by Perry Kaufman, Kaufman’s Adaptive Moving Average (KAMA) is a moving average designed to account for market noise or volatility. KAMA will closely follow prices when the price swings are relatively small and the noise is low. KAMA will adjust when the price swings widen and follow prices from a greater distance. This trend-following indicator can be used to identify the overall trend, time turning points and filter price movements.4

Kaufman’s Adaptive Moving Average (KAMA) is based on the concept that a noisy market requires a slower trend than one with less noise. The basic principle is that the trendline must lag further behind the price in a relatively noisy market to avoid being penetrated by the price. The moving average can speed up when the prices move consistently in one direction. According to Perry Kaufman, who invented the system, KAMA is intended to use the fastest trend possible, based on the smallest calculation period for the existing market conditions.7

What I’m really liking about this filter is how it levels out quickly when the price action starts moving largely sideways. This is similar to properties of the VMA indicator covered earlier.

## Fractal Adaptive Moving Average (FAMA)

FRAMA stands for Fractal Adaptive Moving Average and we have classed it as a Log-Normal Adaptive Moving Average (LAMA). Created by John F Ehlers (See his original paper or the article from the 2005 edition from Technical Analysis of Stocks and Commodities – Fractal Adaptive Moving Averages), it utilizes Fractal Geometry in an attempt to dynamically adjust its smoothing period to suit the changing price action over time.5

Below, I have added the FAMA indicator (light blue line) to same chart alongside the Kaufman MA:

- NOTE: this indicator has a component that leverages Kaufman’s MA above, so it’s somewhat of a “super moving average” – that is one that is composed.