Weighted average of group of time series
Posted: Tue Nov 16, 2010 7:22 am
Could you point me the optimal way of calculating weighted average of time series without using loops?
There is a group (A) of indices available and another group (B) containing some absolute values i.e weights. The group of weights (B) should be normalized first. The number of time series to be weighted is not known a priori...
=(A.1*B.1 + A.2*B.2 + A.3*B.3 + ...)/sum(B)
There is a group (A) of indices available and another group (B) containing some absolute values i.e weights. The group of weights (B) should be normalized first. The number of time series to be weighted is not known a priori...
=(A.1*B.1 + A.2*B.2 + A.3*B.3 + ...)/sum(B)