morsi time series code