Trading ebook Finance - Neural Prediction of Weekly Stock Market Index

As seen from fig 1 the stock index is higher for the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 50 100 150 200 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

Ask a homework question - tutors are online