Say you have an Exponential Moving Average being continuously updated over a time series using 1-second-long time periods. What should happen if there is no value for the next second, e.g. there were no price updates? Should the function decay in some way since there are no new values? Is there a correct or accepted way of handling this case?


2 Answers 2


You can either

  • reuse the last computed EMA, or
  • fill-forward the previous period's sample data and recompute the EMA.

I generally prefer the second option, which should cause a decay. Only go for the first option if your application won't change its logic based on missing data.

  • $\begingroup$ Yes, the second option actually works well. It is practical and less prone to error because there isn't excess computation required. I presume there isn't lots of missing data. There shouldn't be if the data frequency is generally available at 1-second intervals. $\endgroup$ Sep 22, 2011 at 22:52
  • $\begingroup$ the second option is the way to go on something like this. $\endgroup$
    – Michael WS
    Sep 23, 2011 at 2:14

You should look into inhomogeneous time series operators. The original reference for this work is Zumbach and Muller (2001). An excellent introduction to the material can be found in An Introduction to High-Frequency Finance, starting on page 59. I also found online a book chapter from Modeling Financial Time Series with S-PLUS that includes code for the inhomogeneous EMA (section 9.2.4).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.