rollingRate function

function to compute a rolling fn of a TS data