Community Approval Request #006: Exponential Moving Average
Date: Fri, 4 March 2022
Author: DIA Core Team
Status: Approved
In this sixth Community Approval Request (CAR), the DIA DAO community will discuss, improve and approve the Exponential Moving Average methodology, a very commonly used filter by DIA for its oracle price determination.
The EMA (Exponential Moving Average) filter is a filter that can be applied to a time series of existing price points. These price points originate from one of the other filter methods (e.g., VWAPIR, MAIR, or MEDIR. The EMA filter then produces a moving average over a number of the latest of these price points.
Filter Application
The EMA filter is used as a post-processing filter in our graphql frontend. It uses the underlying MA120 filter points and produces a time series using a moving window approach.
For each EMA filter point, the algorithm takes into account a configurable amount of MA120 filter points from the past and calculated a weighted average. This weighting depends on the age of the MA120 filter points and decreases exponentially towards the past. By that the EMA filter ensures that recent data points have a higher weight in the filter end result compared to older ones.
A detailed writeup of EMA functionality can be found here.
Implementation
The filter is implemented as part of the FiltersBlockService in this file in our Github repository.
Validation
Suggest your ideas and improvements proposals by replying to this entry below.
→ Head over to Snapshot to vote
Timeline:
- Discussion: 4 March - 11 March, 2022
- Vote: 11 March - 18 March, 2022
- Approval: 18 March, 2022