my work code for time series analysis