This preview shows page 1. Sign up to view the full content.
Unformatted text preview: sed on 275
weeks before the testing data. As, seen from Fig. 1, the stock index is higher for the test
data than for the training data, so that the neural network never sees the desired values in
the range of the test data during training. This can be seen from Fig. 6, which shows the
normalized value for the training and testing data of the S&P500 index. In the first 275
data points, which constitutes the training set, the normalized index has a maximum value
of 0.7339, while in the test region the maximum value is 0.9211. Thus, the network cannot 8 be expected to learn the relationship and give the correct output and this was confirmed
after training and testing of the network using this kind of normalization.
Fig. 6: Normalized index in training and test regions Normalized S&P 500 index 0.9
50 100 150
Data number 250 300 To remove this problem, the solution chosen was to detrend the data by taking the
logarithm of the S&P 500 index and then removing the linear trend from it. The
detrending was done by fitting a line (using polyfit() in MATLAB) to the training data
only and then removing this l...
View Full Document
- Spring '12