SVM (and Random Forest) for stock prediction - training/test accuracy high and validation poor i'm facing this kind of issue. I set up a good model (122 variables) with 1700 records: training accuracy and test are close to 80%. I'm trying to predict 8 days ahead, the movement of a stock index. Basically i did:
use both SVMRadial and RF in R
created a partition 70/30 to split training set and test  use repeatedCV (5 folds x 5 times)
at the end, i got encouraging accuracies in classification, both in training and test set.
Finally i tried to validate the model, testing  unseen data: i performed a direct 8-days step ahead to process current  record (time t) to get the result for time t+8 (the latest Y to feed, the output of the classifier, is from 8 days in the past).Then i carried on training the model with the freshest data and jumping 8 records ahead on and on iteratively. Accuracy dramatically drops down to 50/55% making the classifier pointless. This happens both in SVMRadial and in RF: practically the model, even though always trained till the last available complete data (with the relevant y, that is +1 or -1), is unable to be accurate with new data.I also tried a recursive solution to fill the 8 missing Ys with random forest, getting poor results. Why my model is unable to generalize, providing good results just only  8 records ahead from the last training point? is the cause overfitting with cross validation? How can i manage it?
thank in advance!
regards

While not knowing what your predictors are, it works out that multi-instrument (and multi-market) models usually perform much better on out-of-bag (out-of-training) data.  See the software package called VantagePoint, which uses separate prediction models (neural networks, not too far from SVM) for the 2-day lagged data, 5-day lagged data, and 10-day lagged data - and then determines which time-frame is the most dependable.  Most of their models use data/indices from other markets and exchanges.
Another issue for stock price prediction is that many of the days or epochs of time you are using are redundant, so you may not need 1700 records or 122 predictors.  Thus, you might use PCA on both the days and the 122 predictors to reduce the dimensions (decorrelate/denoise).  Jurik Research sells a module known as DDR (decorrelator, dimension reducer) which can perform two-way PCA on time and features for financial data.
