This is an interesting question!
The short answer is that there doesn't seem to be any built-in that could perform the required task, something which is already alluded to in the question,
There is, however, a way to use MovingMap
on any number of series in a way reminiscent of using MapThread
on ordinary expressions.
The idea is to first bundle the series in a single TemporalObject
with appropriate ValueDimensions
and then feed it to MovingMap
.
Such a solution has the downside that one needs to pick the series apart and put them back together again. It could also be argued that if it comes down to extracting "Paths"
and/or "Values"
from the series, one can simply then use ListConvolve
or probably Partition
to get the job done without having to reconstruct a new TimeSeries
in order to feed it to MovingMap
.
Even though this doesn't sound altogether unreasonable, it wouldn't seem completely useless to attempt a solution along the lines of 'solving a TimeSeries
problem using TimeSeries
', even in a somewhat roundabout way:
(* one series, two paths *)
bundle = TemporalData[{tsA, tsB}, ResamplingMethod -> None];
(* resample using avail t-val pairs *)
union = TimeSeriesResample[bundle, "Union"]
(* take the 'ResamplingMethod' value with a grain of salt *)
tsopts = {ResamplingMethod -> {None, None}, ValueDimensions -> 2,
MissingDataMethod -> {"Interpolation", InterpolationOrder -> 0}};
(* one series, vector-valued single path *)
tsx = TimeSeries[Transpose[union["Values", All]], {union["Times"]},
Apply[Sequence][tsopts]]
finally,
MovingMap[f[Differences[#]] &, tsx, Quantity[30, "Events"]]
should do the trick. Obviously, Quantity[30, "Events"]
can be replaced with any other desirable wspec
and f
is used as a stand-in for an appropriate fitting function; probably Differences
is something that can be incorporated later into f
, too.