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?
Answer
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.
No comments:
Post a Comment