You will need to use the data contained in the files enelr.txt and dynlr.txt. Each file contains the daily log return of a large energy company.
1. Fit an AR model to the part of the time series contained in dynlr.txt corresponding to the period of the 500 trading days ending January 1, 2001. Use this model to predict the values of the log return for all the remaining days after January 1, 2001, and compute the sum of square errors.
2. Same question for the time series contained in the file enelr.txt
3. Concatenate the two time series in a bivariate time series, fit an AR model to the bivariate series so obtained for the same period as before, and use this model to predict the values of the two series following January 1, 2001. Compute the sum of the squares errors and compare to the previous results. Comment your results.