Given a TimeSeries
object tsts
, how do I implement ExpandingMap
similar to MovingMap
, where the window is not moving but expanding. In pseudocode,
tsNew[tf] = f[TimeSeriesWindow[ts,{t0,tf}]],
where t0=Min[ts["FirstTimes"]]
.
For example, the function Accumulate
does exactly this with f=Total
. I would like to have this functionality for an arbitrary function f.