I am looking to calculate the moving average for a dataset. I have two options listed below. Which one is more accurate or are they both good?
- Calculate the moving average of an Index for each time period where the Index value is the weighted average of the underlying, so Step 1: calculate the weighted average of each time period for an index, then Step 2: calculate the moving average of the Index values from Step 1
- Calculate the weighted average of the current and last n periods of the underlying of the Index directly.