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. ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
