Solved – Train NN or SVM to classify stock signals

machine learningrsvm

I am applying Neural network and SVM to predict buy-hold – sell signals. I have trained nn and SVM in R. I used nnet function to train NN and svm to train SVM. I provided 20,000 data points to train and 2000 data points to test. training data set contain list of 10-15 technical indciators and buy-sell-hold signals. The problem I am having is it is not predicting the buy -sell – hold signals with good accuracy on the testing data. I have used sigmoid function in nnet and radial function in SVM. Any suggestion, how to improve the accuracy of the prediction?

Best Answer

I recommend reading "A Practical Guide to Support Vector Classification" by Chih-Wei Hsu, Chih-Chung Chang, and Chih-Jen Lin

In the work I've done much lower values of C work better - in the range of $10^{-4}$ to $10^{-2}$. 1-100 is a pretty high value of C, at least for the data I've worked with, which means you are not allowing much 'slack' and so its not surprising that you are finding your model over-fits the data. I would recommend trying with much smaller values of C and in orders of magnitude increments. Another alternative is to try nu-SVM rather than C-SVM. The parameter nu ranges from 0 to 1 (.1 to .8 in practice) and is much more intuitive: .1 means a small proportion of your data points are support vectors (and therefore you have a narrow margin and little slack), .8 means a very large percent are support vectors (and therefore a wide margin and a good deal of slack).

Related Question