MAD (Median Absolute Deviation) as an Indicator of Volatility?
Author: Carova
Creation Date: 2/10/2018 6:19 PM
profile picture

Carova

#1
superticker:
QUOTE:
Personally, I don't like using ATR for gauging volatility, but it's the best robust volatility metric Wealth-Lab has to offer. One can't rely on a normal standard deviation metric because outliers will throw it completely off. In modern statistics, we do have something called "robust" standard deviation, which is what we should really be using in noisy environments (like stock trading), but it's harder to compute. And WL doesn't have an indicator for that. :(


Based on a conversation that started in another thread by Superticker about the limitations of ATR and Standard Deviation as very imperfect measures of Volatility (for a variety of reasons) I am suggesting that WL incorporate a robust measure of variability, the Median Absolute Deviation (http://www.statisticshowto.com/median-absolute-deviation/).

Vince
profile picture

Eugene

#2
Is this good enough for you? Check System.Core in Editor's "References..." dialog before executing:

CODE:
Please log in to see this code.
profile picture

Carova

#3
Thanks very much Eugene! Works like a champ!!

Will this be added to the Community Indicator Library?

Vince
profile picture

Eugene

#4
Vince,

My pleasure. Sure I'll add it as a formal indicator with caching etc.
profile picture

superticker

#5
There are a number of volatility metrics used in "robust" statistics. I've been meaning to review them sometime in the far future. The problem is many require either sorting or ranking, which is cpu intensive. For fuzzy system analysis, we prize efficiency over precision. Higher precision won't buy you anything in fuzzy system analysis.

For improved efficiency, it would be best to avoid Linq queries. But version 1.0 of the indicator doesn't need to be that efficient. The initial research goal here is to see how much better it performs over ATR or "robust" standard deviation. Efficiency can be added later (version 2.0) if the new indicator shows promise.
profile picture

Eugene

#6
LINQ queries are used all around in Community Indicators and TASCIndicators. Parts of MS123 Visualizers heavily rely on PLINQ.
profile picture

Eugene

#7
Vince,

MAD is added to Community Indicators v2018.03. Please update the extension.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).