Consider the monthly simple returns of GE stock from January 1926 to December 2003. Use the last three years of data for forecasting evaluation.
(a) Using lagged returns rt-1, rt-2, rt-3 as input, build a 3-2-1 feed-forward network to forecast 1-step ahead returns. Calculate the mean squared error of forecasts.
(b) Again, use lagged returns rt-1, rt-2, rt-3 and their signs (directions) to build a 6-5-1 feed-forward network to forecast the 1-step ahead direction of GE stock price movement with 1 denoting upward movement. Calculate the mean squared error of forecasts. Note: Let rtn denote a time series in S-Plus. To create a direction variable for rtn, use the command