[R] Exponentially Weighted Moving Average
livia
yn19832 at msn.com
Tue Jul 3 12:51:07 CEST 2007
Hi, I have got a series of data "x" and some parameter "a", and I would like
to take some Exponentially Weighted Moving Average to the data in the
following fomula, and obtain the return series y
y1=a^265*x[2]+a^264*x[3]+a^263*x[4]+...+a^0*x[267]
y2=a^264*x[4]+a^263*x[5]+a^263*x[6]+...+a^0*x[268]
....
y265=a^1*x[530]+a^0*x[531]
y266=a^0*x[532]
Could anyone give me some advice how can I achieve this?
Many thanks
--
View this message in context: http://www.nabble.com/Exponentially-Weighted-Moving-Average-tf4017572.html#a11409874
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list