Simple moving average, weighted moving average, exponential smoothed moving average

Source: Internet
Author: User

Types of moving Averages

The moving average can be divided into "arithmetic moving average", "weighted moving average", "exponential smoothed moving average" three kinds.

1. Arithmetic moving average (MA)

The arithmetic moving average is a simple and popular moving average. The average line is an arithmetic mean, and the calculation method adds a set of numbers divided by the number of components of the group's data.

With a 5-day moving average, the method is calculated as follows:

Ma= (C1+C2+C3+C4+C5)/5

General formula : Ma= (C1+C2+C3+C4+C5+....+CN)/n

C: first day closing price

N: moving average period

"Moving average" means a period based on a certain number of days (the above example is 5th), and when the new data is added, the data from the previous day of the basis is excluded. Because the arithmetic moving average does not care about the first day of data in the base period. Because the arithmetic moving average does not care about the influence of the price of one day in the base period on the future price flow, the daily price effect of the cycle is treated equally, according to the principle of statistics is not reasonable. Statistically, the theoretical point of view: for the period of the 5th moving average, the 5th day of the closing price on the 6th day of the impact of prices should be greater than the first day of the close, in order to reflect this fact, someone invented the weighted moving average to compensate.

2. Weighted moving Average
The reason for weighting is that based on the moving average, the last day's closing price has the greatest impact on future prices fluctuations, giving it greater weight. The weighting method is divided into four types:
1. Doomsday Weighted Moving average:
Calculation formula: MA (N) = (C1+C2+......+CNX2)/(n+1)
2. Linear weighted Moving average:
Calculation formula: ma= (C1X1+C2X2+......+CNXN)/(1+2+...+n)
3. Ladder-type weighted moving average:
Calculation method (take 5th as an example):
[(1th Day closing price + 2nd day closing price) x1+ (2nd day closing price + 3rd day Close) x2+ (3rd day closing price + 4th day Close) x3+ (4th closing price + 5th day closing price) x4]/(2x1+2x2+2x3+2x4) is the ladder weighted moving average of fifth day
4. Square coefficient weighted moving average:
Formula (take 5th as an example):
ma=[(1th day closing price x1x1) + (2nd day closing price x2x2) + (3rd day closing price x3x3) + (4th day closing price x4x4) + (5th day closing price x5x5)]/(1x1+2x2+3x3+4x4+5x5)

3. Exponential smoothed Moving average (EMA)
When the base period of the exponential smoothed moving average is different, the result of the late calculation of the initial base period differs from the earlier number of the base period. For example, from October 30 the 5th index smoothed moving average of the person, he calculated the number of November 5 general and 9 andTenThe exponential smoothed moving average of November 5 is different for people who have been on the day. This difference will tend to be consistent after a slightly longer smoothing operation, and will not have a big difference. Therefore, when the investor calculates the EMA or uses the EMA skill technical indicators such as RSI and KD line, such as calculates the discrepancy with others number, the close non-operation has the error.

According to the above phenomenon, investors do not necessarily need to use the arithmetic moving average to calculate the first value of the EMA, in fact, the second day can be calculated 5th EMA or 10th EMA.

From the 5th exponential smoothed moving average, the calculation is first calculated with the arithmetic moving average to calculate the first moving average, and the second moving average is: (6th day closing price X1/5) + (the previous one moving average X4/5)

Formula EMA=C6*1/5+EMA5*4/5

The calculation of the above three moving averages can be found after the exponential smooth moving average is a more convenient method, both omitting the trouble of storing data, and omitting the trouble of the operation, so almost all statistical indicators are using the EMA technique to master This method can be extrapolate.

"Reprinted from": Http://blog.sina.com.cn/s/blog_525b8ce90100hv3r.html

Simple moving average, weighted moving average, exponential smoothed moving average

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.