Moving Median: a better indicator than Moving Average?

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
Post Reply
White Cube
Roundtable Fellow
Roundtable Fellow
Posts: 98
Joined: Fri Oct 20, 2006 2:25 pm
Location: London, UK

Moving Median: a better indicator than Moving Average?

Post by White Cube » Thu Oct 07, 2010 7:14 pm

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).â€
Attachments
Performance  Moving Average vs Moving Median.jpg
Performance Moving Average vs Moving Median.jpg (89.44 KiB) Viewed 4660 times

LeviF
Roundtable Knight
Roundtable Knight
Posts: 1428
Joined: Mon Dec 22, 2003 12:24 pm
Location: Des Moines, IA
Contact:

Post by LeviF » Thu Oct 07, 2010 11:12 pm

I have noticed that moving median takes quite a bit longer to calculate than an EMA.

If you want to learn quite a bit more, step the day params for both EMA and MM and see how the goodness curves compare across a variety of values.

Jez Liberty
Roundtable Knight
Roundtable Knight
Posts: 123
Joined: Tue Nov 03, 2009 8:49 am
Location: London
Contact:

Post by Jez Liberty » Fri Oct 08, 2010 11:38 am

LeviF wrote:I have noticed that moving median takes quite a bit longer to calculate than an EMA.
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...)

babelproofreader
Roundtable Knight
Roundtable Knight
Posts: 138
Joined: Wed Nov 10, 2004 4:36 pm

Post by babelproofreader » Fri Oct 08, 2010 4:24 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.

nodoodahs
Roundtable Knight
Roundtable Knight
Posts: 218
Joined: Wed Aug 09, 2006 4:01 pm

Post by nodoodahs » Fri Oct 08, 2010 5:11 pm

How does the moving geometric mean compare to the moving arithmetic mean? :lol:

Post Reply