Since corr applies to corresponding indices, why not
corr
s.rolling(window=5, min_periods=lag+1).corr(s.shift(lag))
?