Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Moving average
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Weighted moving average== A weighted average is an average that has multiplying factors to give different weights to data at different positions in the sample window. Mathematically, the weighted moving average is the [[convolution]] of the data with a fixed weighting function. One application is removing [[pixelization]] from a digital graphical image. This is also known as [[Anti-aliasing]] {{Citation needed|date=February 2018}} In the financial field, and more specifically in the analyses of financial data, a '''weighted moving average''' (WMA) has the specific meaning of weights that decrease in arithmetical progression.<ref>{{cite web|title=Weighted Moving Averages: The Basics |url=http://www.investopedia.com/articles/technical/060401.asp |publisher=Investopedia}}</ref> In an ''n''-day WMA the latest day has weight ''n'', the second latest <math>n-1</math>, etc., down to one. <math display="block">\text{WMA}_{M} = { n p_{M} + (n-1) p_{M-1} + \cdots + 2 p_{((M-n)+2)} + p_{((M-n)+1)} \over n + (n-1) + \cdots + 2 + 1}</math> [[Image:Weighted moving average weights N=15.svg|thumb|right|WMA weights ''n'' = 15]] The denominator is a [[triangle number]] equal to <math display="inline">\frac{n(n + 1)}{2}.</math> In the more general case the denominator will always be the sum of the individual weights. When calculating the WMA across successive values, the difference between the numerators of <math>\text{WMA}_{M+1}</math> and <math>\text{WMA}_{M}</math> is <math>np_{M+1} - p_{M} - \dots - p_{M-n+1}</math>. If we denote the sum <math>p_{M} + \dots + p_{M-n+1}</math> by <math>\text{Total}_{M}</math>, then <math display="block">\begin{align} \text{Total}_{M+1} &= \text{Total}_M + p_{M+1} - p_{M-n+1} \\[3pt] \text{Numerator}_{M+1} &= \text{Numerator}_M + n p_{M+1} - \text{Total}_M \\[3pt] \text{WMA}_{M+1} &= { \text{Numerator}_{M+1} \over n + (n-1) + \cdots + 2 + 1} \end{align}</math> The graph at the right shows how the weights decrease, from highest weight for the most recent data, down to zero. It can be compared to the weights in the exponential moving average which follows.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)