Question: Problem 4.19 The data set SUBSP to be used for this problem are contained in the ascii file subsp.asc. Read it in an S-Plus object
Problem 4.19 The data set SUBSP to be used for this problem are contained in the ascii file subsp.asc. Read it in an S-Plus object of the same name, It is a single column containing 1000 rows giving the daily returns on a sub-index of the S&P 500 index (the Electronic Equipment subindex, to be specific) during the period beginning January 1993 and ending December 31, 1996. In other words, the first row gives the closing on January 4, 1993, the second row the closing on January 5, 1993 . . . . . . and finally the last row contains the values of the subindex at the closing bell on Tuesday December 31, 1996. The markets are open approximately 250 days each calendar year so that SUBSP contains four years worth of daily quotes.
The goal is to produce a forecasting for the future changes in the index. We shall use the first three years for training of our prediction system and we shall test them on the last year.
1. Construct a neural network using the first 750 daily values of the sub-index to predict the 5-day move in the future (i.e. the variable which on day I has the value SUBSP[I+5]-
SUBSP[I]) using only the past changes over the last day, the last week, the last three weeks and the last twelve weeks (i.e. the variables which on day I have the values SUBSP[I]-
SUBSP[I-1], SUBSP[I]-SUBSP[I-5], SUBSP[I]-SUBSP[I-15] and SUBSP[I]-
SUBSP[I-60]). Use this neural net to predict the next 245 values of the five day increment in the index (i.e. the same response variable SUBSP[I+5]-SUBSP[I] for I=751,....,995)
and compute the sum of the squares of the errors made.
2. Compute the same sum of square errors using now the latest value of the 5-day increment available (i.e. SUBSP[I]-SUBSP[I-5]) instead of the neural net prediction and compare to the result of question 1. Any comments?
Problem 4.20 Import the data set BLIND contained in the ascii file blind.asc in S-Plus and denote by X1, X2, U1, U2 and Y the 5 columns.
1. We consider the problem of the prediction of variable Y from the variables X1 and X2.
Use the first 100 rows as training sample and compute the sum of square residuals for the prediction of the last 28 values of Y from the corresponding values of X1 and X2 • using a projection pursuit regression (with a number of terms between 2 and 4);
• using a neural network regression (with two units in the hidden layer)
Compare the two results.
2. The results obtained with the neural network regression should be UNUSUALLY good. Try to explain this fact by regressing, using the projection pursuit regression (with the same min & max numbers of term as above)
• Y versus U1 and U2;
• U1 versus X1 and X2;
• U2 versus X1 and X2.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
