[R-SIG-Finance] Similar function to filter but allowing time varying coefficient?
Robert A'gata
rhelpacc at gmail.com
Wed Dec 21 03:34:37 CET 2011
Hi,
I have a need to compute something that is similar to exponential
moving average. More precisely:
y[t] = (1-w(t)) x[t] + w(t) y[t-1]
x[t] is my input. I know only filter function in R where filter is a
vector of constant. In my case, my filter will be a matrix of Nx2
where N is number of observations in my time series. I'm wondering if
there is any function that does this? Also, N usually is in an order
of few millions. So it'd be great for me to know a fast
implementation. Thank you.
Regards,
Robert
More information about the R-SIG-Finance
mailing list