If I have a time series s, and if you'll pardon the pseudo code, such that
s = {t_i, v_i}
is there an easy way to calculate the series
{t_i, Mean[s[[t_0 ;; t_i]]}
As I say this is pseudo code. In reality s
is a TimeSeries object
s = TimeSeries[v,{t}]
I can generate a new TimeSeries object using MovingAverage with ease, but that is not what I require. What I do require is to create a TimeSeries object which is at time t
the mean of values in the initial time series having a timestamp less than or equal to t
I could code this up for a simple sequence, but given MovingAverage is supported I was hoping for something similar for this case.
Thanks in advance