# Exponential moving average values before the data range is met? The above chart plots a 300 weekly exponential average. With 52 weeks per year, the indicator would start calculating the EMAVG after 5.77 years, in 2016.

What technique could it be using to be able to calculate EMAVG values for the weeks before 2016?

note: that is a bitcoin price chart, there is no data before 2010

• Is this really an Exponentially Weighted Moving Average or an ordinary moving average of 300 weeks ? Feb 22 at 23:12
• Yeah, exponential. Pretty sure that is a bloomberg terminal screen and it is using EMAVG. Source: twitter.com/RaoulGMI/status/1363910890924441605 Feb 22 at 23:56
• It''s probably starting at 2005 or whatever is needed for the exponential smoothed series to begin at 2010 and change or wherever it's actually beginning. Feb 23 at 6:32
• That is a bitcoin price chart, there is no data before 2010. Should have mentioned before, sorry. Feb 23 at 22:08
• Hi: In that case, it's probably doing what kermittfrog explained. Note that his formula puts $(1-\lambda)$ on the previous estimate and $\lambda$ on the current value. You need to flip it, if bloomberg does the opposite thing. Feb 23 at 23:48

The exponential weighting scheme yields an estimate $$Z_t$$ from observations $$X_t$$

$$Z_t=\sum_{k=0}^{\infty} w_k X_{t-k}$$

where the (infinite) series of weights sums to one, i.e. $$\sum_{k=0}^{\infty} w_k=1$$.

Let's call the exponential weighting parameter $$\lambda$$. For a 'lookback window' of length $$N$$ elements, this results in a weight for the elements $$k=0,1,\ldots,N$$ of

$$w_N(k)=\lambda^k\frac{1-\lambda}{1-\lambda^{N+1}}$$

So for the first $$M elements, you would simply calculate the EWMA using a smaller data window, increasing until sufficient length $$N$$, and then simply roll with the $$w_N(k)$$ weights.

HTH?

The initial price values on the chart are close to the EMA values which suggests that the EMA was calculated over an 'incomplete' window.

The EMA function is unbounded and is calculated recursively over all preceding values. It doesn't require a minimum number of samples to be present. But it needs a smoothing parameter α in the range [0, 1] to deflate far-away samples. The parameter is non-intuitive and is often substituted with the N parameter (number of periods) which relates to α as α = 2/(N+1). For instance, EMA(N=300) is converted to EMA(α=0.00664) behind the scenes.

Another explanation is that the EMA was calculated over raw data prior to 2010 and this raw data is not displayed.

The screenshot below shows weekly crude oil prices from FRED. Raw prices are in blue.

The top chart shows EMA functions with various N parameters applied to time series starting with January 2010. The bottom chart shows the same EMA functions calculated from 2000 onward. Notice how EMA(300) shows different values on January 2010. 