AFL rq for Cumulative Moving Average.

mohan.sic

Well-Known Member
#1
D/A

Anyone please share if you have the afl for Cumulative moving average.



Cumulative Moving Average
If an investor wants to look at more data points, he might want to use the cumulative moving average (CMA). This is the average of all the data points up to the current time. For example, the CMA price of stock A from January 1 to March 8 is the average of all the prices of stock A from January 1 to March 8. On March 9, there is a new CMA price since the March 9 price is now going to be added in the computations.

In equation form, the CMA is the unweighted average of the sequence of i values x1, , xi up to the current time:
CAi = {{x1 + + xi} / i}
To update the cumulative average if a new datum xi+1 arrives, this formula is used:
CAi+1 = {{xi+1 + i CAi} / {i+1}}, where CA0 can be taken to be equal to 0.

or

https://secure.wikimedia.org/wikipedia/en/wiki/Moving_average#Cumulative_moving_average



Regards.
 

Similar threads