From the course: Advanced SQL for Data Science: Time Series

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Exponential moving average

Exponential moving average - SQL Tutorial

From the course: Advanced SQL for Data Science: Time Series

Start my 1-month free trial

Exponential moving average

- [Instructor] Another type of moving average you may encounter is called exponential moving average. Now, the exponential moving average is, as the name implies, a type of a moving average calculation. In this case, the weights decrease exponentially, and this is often used to smooth out trends when there's large variance in data, so essentially it reduces the impact of noise in your signal. Now, the formula consists of a couple of pieces. One is a smoothing parameter. This smoothing parameter is typically two divided by the number of intervals that we're working with. So for example, if we want to smooth over a period of seven days, the value would be two divided by one plus seven or eight, so two divided by eight is 0.25. Now that smoothing parameter is called lambda. Now we can go on and complete the formula. An exponential weighted average is basically whatever the value is at the current period times the lambda, plus the previous period's exponential weighted moving average…

Contents