Early rough draft, haven't proof read it yet. But just wanted to share the math behind creating an efficient Exponential Moving Average with a finite length/cut off. I found this was needed for a project I am working on where the EMA much be determined by random access to various points in a time series and couldn't be calculated for the entire time series in one go.
I needed to modify the EMA for a finite back-length. The standard EMA is only really efficient when calculated sequentially for the entire time series. This implementation is an efficient design that allows for calculation at a point by using finite back-length.
This is an early draft, did not proof read it yet, just whipped it together, though pretty sure the math is close to the final form. I will publish it sometime tomorrow but want to share what I have and welcome and questions or feedback before I publish it.
https://beta.jeffreyfreeman.me/an-efficient-exponential-moving-average-of-finite-length/
#Programming #Math #Maths #Mathematics #algorithms #Science #QOTOJournal