Alan Hull Articles
Hull Moving Average

The Hull Moving Average (HMA) solves the age old dilemma of making a moving average more responsive to current price activity whilst maintaining curve smoothness. In fact the HMA almost eliminates lag altogether and manages to improve smoothing at the same time. To understand how it achieves both of these opposing outcomes simultaneously we need to start with an easily understood frame of reference. The following chart contains a 16-week simple moving average which constantly lags the price activity and has poor smoothness.

16-Week Simple Moving Average

Firstly, solving the problem of curve smoothing can be done by taking an average of the average, ie. 16 period SMA(16 period SMA(Price)). The bad news is that it causes a huge increase in lag as seen below.

16-Week Nested Simple Moving Average

Solving the problem of lag is a bit more involved and requires an explanation with numbers rather than charts. Consider a series of 10 numbers from '0' to '9' inclusive and imagine that they are successive price points on a chart with 9 being the most recent price point at the right hand leading edge. If we take the 10 period simple average of these numbers then, not surprisingly, we will determine the midpoint of 4.5 which significantly lags behind the most recent price point of 9. Here's the clever bit... first let's halve the period of the average to 5 and apply it to the most recent numbers of 5,6,7,8, and 9, the result being the midpoint of 7.

16-Week Hull Moving Average

Finally, to remove the lag we take the midpoint of 7 and add the difference between the two averages which equals 2.5 (7 - 4.5). This gives a final answer of 9.5 (7 + 2.5) which is a slight overcompensation. But this overcompensation is very handy because it offsets the lagging effect of the nested averaging. Hence the result of combining these 2 techniques is a near perfect balance between lag reduction and curve smoothing.

Axis averages

The HMA manages to keep up with rapid changes in price activity whilst having superior smoothing over an SMA of the same period. The HMA employs weighted moving averages and dampens the smoothing effect (and resulting lag) by using the square root of the period instead of the actual period itself... as seen below.

Integer(SquareRoot(Period)) WMA [2 x Integer(Period/2) WMA(Price) - Period WMA(Price)]

Unfortunately the MetaStock version of the indicator requires the 'Integer part of the square root of the period' to be entered manually as an input. For example, if the period is 25 then 'sqrtperiod' equals 5 and if the period is 30 then 'sqrtperiod' also equals 5. ('sqrtperiod' increments up to 6 when period = 36 and so on.)

MetaStock Formula

period:=Input("Period",1,200,20) ;
sqrtperiod:=Input("Square Root of Period",1,20,4);
Mov(2*(Mov(C,period/2,W))-Mov(C,period,W),sqrtperiod,W);

SuperCharts Formula

Input: period (Default value 20)
waverage(2*waverage(close,period/2)-waverage(close,period), SquareRoot(Period))

To download a free copy of Alan Hull's latest Active Trading course notes and a copy of a recent ActTrade newsletter, visit his new website at www.acttrade.net.

First Published: 18 May 2004 - Copyright © Alan Hull

This document is copyright. This document, in part or whole, may not be reproduced or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise without prior written permission. Inquiries should be made to Alan Hull on phone +61-03-9778-7061 or via e-mail at enquiries@alanhull.com. This article needs to be viewed as educational reference only. It is not intended, nor is it to be regarded, as investment/securities advice or any other advice.

ActVest Pty Ltd is a Corporate Authorised Representative (CAR No.306718) of Avestra Capital Pty Ltd AFSL 292 464 ("Avestra"). This article has been prepared for the general information of investors and does not take into account the investment objectives, financial situation and particular needs of any particular person.

Persons intending to act on information in this document should seek professional advice to confirm that the investments or strategies mentioned are appropriate in the light of their particular investment needs, objectives and financial circumstances prior to taking any action.

While reasonable care has been exercised and the statements contained herein are based on information believed to be accurate and reliable, neither ActVest, Avestra, nor their employees or agents shall be obliged to update you if the information or its advice changes or be liable (unless otherwise required by law) for any loss or damage suffered or caused to any person or corporation resulting from or contributed to by any error or omission from such statements including any loss or damage caused by any fault or negligence on the part of ActVest or Avestra, whether direct, indirect, consequential or otherwise, whether foreseeable or not.

Direct investing in the stock market can result in financial loss. This article, and any associated files, is intended solely for its intended recipient. The contents are confidential and may be legally privileged.