I have data points from irregular time intervals
I need to find the weighted moving average (WMA) for each these data points based on the last k records. Specifically, when computing the WMA for point p, value corresponding to pth record should be assigned a weight of 1 and the weight assigned to each of the k previous points should be inversely proportional to date difference between those points and the pth point. The older a historic record, the lesser the weight assigned to value of that record.
How do I achieve this in Excel?
From my understanding, the key piece I am missing is the ability to transform cell ranges. If theres a way to do this, I could just compute the reciprocal of date diffs and use that as weight.
Data Example
Here is an example illustrating the required computations for just one data point (the one corresponding to 11-Feb-21). This needs to be repeated for all the data points.
Formulae used:
Weight = 1/(1+ Date diff between 11-Feb-21 and data of current data point)
Weighted Value = Value * Weight
Weighted Average = Sum of Weighted Values/Sum of Weights



kconstant? - JSmart523