MovingMap is a very convenient tool to calculate the percentage changes of a series.
But one thing bothers me is this error.
series = Range[5];
MovingMap[#[[2]]/#[[1]] - 1 &, series, {2}]
The output is
Power::infy: Infinite expression 1/0. encountered. >>
{1, 1/2, 1/3, 1/4}
However,
MovingMap[f, series, {2}] /. f -> Function[#[[2]]/#[[1]] - 1]
gives
{1, 1/2, 1/3, 1/4}
without an error.
I don't understand what causes that problem.