Write a program that does the calculations in Section 5.6.4. Experiment
with the number of scenarios discarded in each step. What do you observe?
Use the plot function in a for loop to plot time series of returns for each
microcap stock in microcap.ts so that you can get an overall visual
grasp of the behavior of each stock in this microcap group with respect to
outliers and time-varying volatility. Use the plot function with arguments
as in Code 6.1, except use a generic first argument returns, setting
returns equal to one of the stock’s returns series for each cycle of the
for loop. Use the graphics command par(mfrow(n1,n2)) to automate
plotting a number of time series of returns per page for each of the market
cap groups. Use the S-PLUS Windows toolbar menu choice “Options >
Graph Options” and select “Every Graph” from the Auto Pages drop-down
list in the “Traditional Graphics” region of the dialog, as this will result in
each new page of plots appearing as a separate page of the Graph Sheet.
Make similar plots for each of the groups smallcap.ts, midcap.ts,
and largecap.ts.