Helper function to validate and clean the input time series
prepareTimeseries(y)
y
The input time series