Time Series Solution Manual

1.7 Solutions to Exercises

1.7.1 Solutions 1: Beaver temperature

Analysis Of Financial Time Series Solution Manual Pdf

  1. Load the beav2 data from the library MASS.
  2. Examine the data frame using summary, head, tail. Query the help with ?beav2 for a description of the dataset
  3. Transform the temperature data into a time series object and plot the latter.
  4. Fit a linear model using lm and the variable activ as factor, viz. lin_mod <- lm(temp~as.factor(activ), data=beav2). Overlay the means on your plot with lines(fitted(lin_mod)) replacing lin_mod with your lm result.
  5. Inspect the residuals (resid(lin_mod)) and determine whether there is any evidence of trend or seasonality.
  6. Look at a quantile-quantile (Q-Q) plot to assess normality. You can use the command qqnorm if you don’t want to transform manually the residuals with qqline or use plot(lin_mod, which=2).
  7. Plot the lag-one residuals at time (t) and (t-1). Is the dependence approximately linear?
Series

1.7.2 Solutions 2: SP500 daily returns

  1. Time Series Analysis Solution Manual works well enough once you know about it, but it’s not immediately obvious. Time Series Analysis Solution Manual Time Series Analysis: Solutions Manual Paperback – June 1, 1991 by Jonathan D Cryer (Author) See all formats and editions Hide other formats and editions Time Series Page 4/25.
  2. Can someone mail me the solution manual for Real Time Systems Analysis & Design by Phillip A Laplante, Wiley 3rd Edition. Please share the same on urgent basis as i have my exams on Saturday. Thanks in Advance.
  1. Download the dataset using the following command
  2. Obtain the daily percent return series and plot the latter against time.
  3. With the help of graphs, discuss evidences of seasonality and nonstationarity. Are there seasons of returns?
  4. Plot the (partial) correlogram of both the raw and the return series. Try the acf with na.action=na.pass and without (by e.g. converting the series to a vector using as.vector. Comment on the impact of ignoring time stamps.
  5. Plot the (partial) correlogram of the absolute value of the return series and of the squared return series. What do you see?

1.7.3 Solutions 3: Simulated data

Building 303B, Matematiktorvet, 2800 Kgs. Lyngby Visitors: Room 004 E-mail: hmad@dtu.dk Direct phone: +45 4525 3408 Division: Dynamical Systems / Statistics. Time Series Analysis and Its Applications With R Examples Fourth ditionE. I i “tsa4trimmed” — 2017/12/8 — 15:01 — page 2 — #2 i i i i i i RobertH.Shumway DavidS.Stoffer TimeSeriesAnalysisand ItsApplications WithRExamples FourthEdition livefreeorbark. ## Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ## 1949 1 2 3 4 5 6 7 8 9 10 11 12 ## 1950 1 2 3 4 5 6 7 8 9 10 11 12 ## 1951 1 2 3 4 5 6 7 8 9 10 11 12 ## 1952 1.

The first 5 parts of the question are straightforward and left to the reader.

  1. Simulate 500 observations from an AR(1) process with parameter values (alpha in {0.1, 0.5, 0.9, 0.99}).
  2. Repeat for MA processes of different orders. There is no restriction on the coefficients of the latter for stationarity, unlike the AR process.
  3. Sample from an ARCH(1) process with Gaussian innovations and an ARCH(1) process with Student-(t) innovations with df=4. Look at the correlogram of the absolute residuals and the squared residuals.
  4. The dataset EuStockMarkets contains the daily closing prices of major European stock indices. Type ?EuStockMarkets for more details and plot(EuStockMarkets) to plot the four series (DAX, SMI, CAC and FTSE).Use plot(ftse <- EuStockMarkets[,'FTSE']) to plot the FTSE series and plot(100*diff(log(ftse))) to plot its daily log return. Play with the ARCH simulation functions to generate some similar processes.
  5. Simulate a white noise series with trend (t) and (cos(t)), of the form (X_t=M_t+S_t+Z_t), where (Z_t sim mathsf{N}(0,sigma^2)) for different values of (sigma^2). Analyze the log-periodogram and the (partial) correlograms. What happens if you forget to remove the trend?
  6. Do the same for multiplicative model with lognormal margins, with structure (X_t=M_tS_tZ_t).
  7. For steps 5 and 6, plot the series and test the assumptions that they are white noise using the Ljung-Box test. Note you need to adjust the degrees of freedom when working with residuals from e.g. ARMA models.

Time Series Theory And Methods Solution Manual

1.7.4 Solutions 4: Mauna Loa Atmospheric CO2 Concentration

  1. Load and plot the CO2 dataset from NOAA. Pay special attention to the format, missing values, the handling of string and the description. Use ?read.table for help, and look carefully at arguments file, sep, na.strings, skip and stringsAsFactors. From now on, we will work with the complete series (termed interpolated in the description).
  2. Try removing the trend using a linear model. Plot the residuals against month of the year.
  3. Remove the trend and the periodicity with a Fourier basis (with period 12). Be sure to include both sin and cos terms together. Recall that the standard Wald tests for the coefficients is not valid in the presence of autocorrelation! You could also use poly or splines::bs to fit polynomials or splines to your series.
  4. Plot the lagged residuals. Are there evidence of correlation?
  5. Use the function filter to smooth the series using a 12 period moving average.
  6. Inspect the spectrum of the raw series and of the smoothed version.
  7. Inspect the spectrum of the detrended raw series.
  8. Test for stationarity of the deseasonalized and detrended residuals using the KPSS test viz. tseries::kpss.test.
  9. Use the decompose and the stl functions to obtain residuals.
  10. Plot the (partial) correlogram for both decomposition and compare them with the output of the linear model.

1.7 Solutions to Exercises

1.7.1 Solutions 1: Beaver temperature

  1. Load the beav2 data from the library MASS.
  2. Examine the data frame using summary, head, tail. Query the help with ?beav2 for a description of the dataset
  3. Transform the temperature data into a time series object and plot the latter.
  4. Fit a linear model using lm and the variable activ as factor, viz. lin_mod <- lm(temp~as.factor(activ), data=beav2). Overlay the means on your plot with lines(fitted(lin_mod)) replacing lin_mod with your lm result.
  5. Inspect the residuals (resid(lin_mod)) and determine whether there is any evidence of trend or seasonality.
  6. Look at a quantile-quantile (Q-Q) plot to assess normality. You can use the command qqnorm if you don’t want to transform manually the residuals with qqline or use plot(lin_mod, which=2).
  7. Plot the lag-one residuals at time (t) and (t-1). Is the dependence approximately linear?

1.7.2 Solutions 2: SP500 daily returns

  1. Download the dataset using the following command
  2. Obtain the daily percent return series and plot the latter against time.
  3. With the help of graphs, discuss evidences of seasonality and nonstationarity. Are there seasons of returns?
  4. Plot the (partial) correlogram of both the raw and the return series. Try the acf with na.action=na.pass and without (by e.g. converting the series to a vector using as.vector. Comment on the impact of ignoring time stamps.
  5. Plot the (partial) correlogram of the absolute value of the return series and of the squared return series. What do you see?

1.7.3 Solutions 3: Simulated data

The first 5 parts of the question are straightforward and left to the reader.

  1. Simulate 500 observations from an AR(1) process with parameter values (alpha in {0.1, 0.5, 0.9, 0.99}).
  2. Repeat for MA processes of different orders. There is no restriction on the coefficients of the latter for stationarity, unlike the AR process.
  3. Sample from an ARCH(1) process with Gaussian innovations and an ARCH(1) process with Student-(t) innovations with df=4. Look at the correlogram of the absolute residuals and the squared residuals.
  4. The dataset EuStockMarkets contains the daily closing prices of major European stock indices. Type ?EuStockMarkets for more details and plot(EuStockMarkets) to plot the four series (DAX, SMI, CAC and FTSE).Use plot(ftse <- EuStockMarkets[,'FTSE']) to plot the FTSE series and plot(100*diff(log(ftse))) to plot its daily log return. Play with the ARCH simulation functions to generate some similar processes.
  5. Simulate a white noise series with trend (t) and (cos(t)), of the form (X_t=M_t+S_t+Z_t), where (Z_t sim mathsf{N}(0,sigma^2)) for different values of (sigma^2). Analyze the log-periodogram and the (partial) correlograms. What happens if you forget to remove the trend?
  6. Do the same for multiplicative model with lognormal margins, with structure (X_t=M_tS_tZ_t).
  7. For steps 5 and 6, plot the series and test the assumptions that they are white noise using the Ljung-Box test. Note you need to adjust the degrees of freedom when working with residuals from e.g. ARMA models.

1.7.4 Solutions 4: Mauna Loa Atmospheric CO2 Concentration

  1. Load and plot the CO2 dataset from NOAA. Pay special attention to the format, missing values, the handling of string and the description. Use ?read.table for help, and look carefully at arguments file, sep, na.strings, skip and stringsAsFactors. From now on, we will work with the complete series (termed interpolated in the description).
  2. Try removing the trend using a linear model. Plot the residuals against month of the year.
  3. Remove the trend and the periodicity with a Fourier basis (with period 12). Be sure to include both sin and cos terms together. Recall that the standard Wald tests for the coefficients is not valid in the presence of autocorrelation! You could also use poly or splines::bs to fit polynomials or splines to your series.
  4. Plot the lagged residuals. Are there evidence of correlation?
  5. Use the function filter to smooth the series using a 12 period moving average.
  6. Inspect the spectrum of the raw series and of the smoothed version.
  7. Inspect the spectrum of the detrended raw series.
  8. Test for stationarity of the deseasonalized and detrended residuals using the KPSS test viz. tseries::kpss.test.
  9. Use the decompose and the stl functions to obtain residuals.
  10. Plot the (partial) correlogram for both decomposition and compare them with the output of the linear model.