Working on the SMA for unevenly spaced time series