wma
Calculate the Weighted Moving Average (WMA).
A Weighted Moving Average puts more weight on recent data and less on past data. This is done by multiplying each bar's price by a weighting factor. Because of its unique calculation, WMA will follow prices more closely than a corresponding Simple Moving Average.
obb.technical.wma(data: Union[list, dict, pd.DataFrame, List[pd.DataFrame], pd.Series, List[pd.Series], numpy.ndarray, Data, List[Data]], target: str = close, index: str = date, length: int = 50, offset: int = 0)
Parameters
- Standard
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| data | List[Data] | The data to use for the calculation. | None | False |
| target | str | Target column name. | close | True |
| index | str | Index column name to use with data, by default "date". | date | True |
| length | int | The length of the WMA, by default 50. | 50 | True |
| offset | int | The offset of the WMA, by default 0. | 0 | True |
Returns
The WMA data.