hma#

API documentation for pandas_ta.overlap.hma Python function.

hma(close, length=None, offset=None, **kwargs)[source]#

Hull Moving Average (HMA)

The Hull Exponential Moving Average attempts to reduce or remove lag in moving averages.

Sources:

https://alanhull.com/hull-moving-average

Calculation:
Default Inputs:

length=10

WMA = Weighted Moving Average half_length = int(0.5 * length) sqrt_length = int(sqrt(length))

wmaf = WMA(close, half_length) wmas = WMA(close, length) HMA = WMA(2 * wmaf - wmas, sqrt_length)

Args:

close (pd.Series): Series of ‘close’s length (int): It’s period. Default: 10 offset (int): How many periods to offset the result. Default: 0

Kwargs:

fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method

Returns:

pd.Series: New feature generated.