Jez Liberty on his blog explains the use of Moving Median instead of Moving Average:
[quote]“While searching for robustness, you might come across the term of robust statistical estimator: the median, for instance, is a robust measure of central tendency, while the mean (average) is not (the latter is much more sensitive to outliers).â€
Moving Median: a better indicator than Moving Average?
-
- Roundtable Fellow
- Posts: 98
- Joined: Fri Oct 20, 2006 2:25 pm
- Location: London, UK
Moving Median: a better indicator than Moving Average?
- Attachments
-
- Performance Moving Average vs Moving Median.jpg (89.44 KiB) Viewed 7653 times
-
- Roundtable Knight
- Posts: 123
- Joined: Tue Nov 03, 2009 8:49 am
- Location: London
- Contact:
Yes - the median calculation is a fairly bit more computer-intensive, which is not a real issue nowadays, but I suspect it is one of the reasons why Moving Averages have been so much more popular than the Median (ie the computation difference was probably much more significant in the good old days of paper calculations, handheld calculators, etc. when Technical Analysis was still in its infancy, and the MA has just become legacy - an effective one at that though...)LeviF wrote:I have noticed that moving median takes quite a bit longer to calculate than an EMA.
-
- Roundtable Knight
- Posts: 138
- Joined: Wed Nov 10, 2004 4:36 pm
It doesn't surprise me at all that a moving median performs worse (Jez Liberty's blog post) than a moving average, in terms of a crossover system; the whole idea of robust in the context of a median is that it is resistant to change despite changes in the underlying data. This being the case, why would one expect it to be good at detecting changes in trend?
Out of curiosity I did a simple test of a rolling 45 bar median of the close (EOD) on a few randomly selected commodity futures, detailed below. The percentage figure represents the number of days over the test period in which the value of the median is exactly the same as its previous value.
S&P E-mini 42.3%
Gold 45.2%
Crude Oil 39.5%
10 Yr Treasuries 44.7%
EUR-USD spot forex 40.8%
Live Cattle 40.3%
Dollar Index 39.3%
Soybeans 41.1%
Corn 43.8%
Cocoa 45.7%
It's interesting to note that the median is robust in another context, namely that it is approximately equally unresponsive to change across a range of instruments.
Out of curiosity I did a simple test of a rolling 45 bar median of the close (EOD) on a few randomly selected commodity futures, detailed below. The percentage figure represents the number of days over the test period in which the value of the median is exactly the same as its previous value.
S&P E-mini 42.3%
Gold 45.2%
Crude Oil 39.5%
10 Yr Treasuries 44.7%
EUR-USD spot forex 40.8%
Live Cattle 40.3%
Dollar Index 39.3%
Soybeans 41.1%
Corn 43.8%
Cocoa 45.7%
It's interesting to note that the median is robust in another context, namely that it is approximately equally unresponsive to change across a range of instruments.