Take the 2-minute tour ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 11 down vote accepted

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.

share|improve this answer
    
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. –  Feral Oink Sep 22 '11 at 22:52
    
the second option is the way to go on something like this. –  Michael WS Sep 23 '11 at 2:14
add comment

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).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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