## Definition of EWMA (Exponentially Weighted Moving Average)

The Exponentially weighted moving average (EWMA) refers to an average of data that is used to track the movement of the portfolio by checking the results and output by considering the different factors and giving them the weights and then tracking results to evaluate the performance and to make improvements

Weight for an EWMA reduces exponentially way for each period that goes further in the past. Also, since EWMA contains the previously calculated average, hence the result of Exponentially Weighted Moving Average will be cumulative. Because of this, all the data points will be contributing to the result, but the contribution factor will go down as the next period EWMA is calculated.

### Explanation

This EWMA Formula shows the value of moving average at a time t.

**EWMA(t) = a * x(t) + (1-a) * EWMA(t-1)**

You are free to use this image on your website, templates etc, Please provide us with an attribution linkHow to Provide Attribution?Article Link to be Hyperlinked

For eg:

Source: EWMA (wallstreetmojo.com)

Where

- EWMA(t) = moving average at time t
- a = degree of mixing parameter value between 0 and 1
- x(t) = value of signal x at time t

This formula states the value of moving averageMoving AverageMoving Average (MA), commonly used in capital markets, can be defined as a succession of mean that is derived from a successive period of numbers or values and the same would be calculated continually as the new data is available. This can be lagging or trend-following indicator as this would be based on previous numbers.read more at time t. Here is a parameter that shows the rate at which the older data will come into calculation. The value of a will be between 0 to 1.

If a=1, that means only the most recent data has been used to measure EWMA. If a is nearing 0, that means more weightage is given to older data, and if a is near 1, that means newer data has been given more weightage.

### Examples of EWMA

Below are the examples of Exponentially Weighted Moving Average

#### Example #1

**Let’s consider 5 data points as per below table:**

Time (t) | Observation (x) |
---|---|

1 | 40 |

2 | 45 |

3 | 43 |

4 | 31 |

5 | 20 |

And parameter **a = 30%** or 0.3

So EWMA(1) = 40

EWMA for time 2 is as follows

- EWMA(2) = 0.3*45 + (1-0.3)*40.00
- = 41.5

Similarly calculate exponentially weighted moving average for given times –

- EWMA(3) = 0.3*43 + (1-0.3)*41.5 = 41.95
- EWMA(4) = 0.3*31 + (1-0.3)*41.95 = 38.67
- EWMA(5) = 0.3*20 + (1-0.3)*38.67 = 33.07

#### Example #2

**We are having the temperature of a city in degrees Celsius from Sunday to Saturday. Using =10%, we will find the moving average temperature for each day of the week.**

Weekday (t) | Temperature ^{o}c (x) |
---|---|

Sunday | 24 |

Monday | 30 |

Tuesday | 36 |

Wednesday | 25 |

Thursday | 22 |

Friday | 29 |

Saturday | 30 |

Using **a =10%,** we will find an exponentially weighted moving average for each day in the below table:

Below is the graph showing a comparison between the actual temperature and EWMA:

As we can see, smoothing is quite strong, using =10%. In the same way, we can solve the exponentially weighted moving average for many kinds of time series or sequential datasets.

### Advantages

- It can be used to find averageFind AverageThe average value represents the set of data values; the average from the whole data is calculated by adding all the set values and dividing them by the number of values. Average = (a1 + a2 + …. + an)/nread more using an entire history of data or output. All other charts tend to treat each data individually.
- User can give weightage to each data point at his/her convenience. This weightage can be changed to compare various averages.
- EWMA displays the data geometrically. Because of that, data doesn’t get affected much when outliers occur.
- Each data point in the Exponentially Weighted Moving Average represents a moving average of points.

### Limitations

- It can only be used when continuous data over the time period is available.
- It can be used only when we want to detect a small shift in the process.
- This method can be used to calculate the average. Monitoring variance requires the user to use some other technique.

### Important Points

- Data for which we want to get an exponentially weighted moving average should be time ordered.
- It is beneficial in reducing noise in noisy time series data points, which can be called smooth.
- Each output is given a weightage. The more recent data is, the highest weightage it will get.
- It is quite good at detecting smaller shifts but slower in detecting the large shift.
- It can be used when the subgroup sample sizeSample SizeThe sample size formula depicts the relevant population range on which an experiment or survey is conducted. It is measured using the population size, the critical value of normal distribution at the required confidence level, sample proportion and margin of error.read more is greater than 1.
- In the real-world, this method can be used in chemical processes and day-to-day accounting processes.
- It can also be used in showing website visitors fluctuations on days of the week.

### Conclusion

EWMA is a tool for detecting smaller shifts in the mean of the time-bound process. An exponentially weighted moving average is also highly studied and used as a model to find a moving average of data. It is also very useful in forecasting the event basis of past data. Exponentially Weighted Moving Average is an assumed basis that observations are normally distributedNormally DistributedNormal Distribution is a bell-shaped frequency distribution curve which helps describe all the possible values a random variable can take within a given range with most of the distribution area is in the middle and few are in the tails, at the extremes. This distribution has two key parameters: the mean (µ) and the standard deviation (σ) which plays a key role in assets return calculation and in risk management strategy.read more. It is considering past data based on their weightage. As the data is more in the past, its weight for the calculation will come down exponentially.

Users can also give weight to the past data to find out a different set of EWMA basis different weightage. Also, because of the geometrically displayed data, data doesn’t get affected much because of the outliers. Hence more smoothed data can be achieved using this method.

### Recommended Articles

This article has been a guide to EWMA (Exponentially Weighted Moving Average). Here we discuss its formula to calculate EWMA along with step by step examples to understand it better. You can learn more from the following articles –

- Average vs. Weighted Average
- Weighted Average in Excel
- AverageIF in Excel Example
- Formula of Weighted Mean