# Splitting Stock Price data for SVM classification

I'm trying to use SVM to predict whether the price of a security will go up in the next 7 days using a prediction of the last 14 days of data. So far, I have extracted a dataset with 15 features and around 3000 samples (dates). However, I'm a little confused on how I should split my data for the x training set and y training set (and also for the testing sets for that matter).

Would this kind of split make sense in training?

x training set: (Pseudo code)

[Features from days 1-14 , Features from days 22-35, ......]


y training set: (Pseudo code)

[1 if price(day 21) > price(day 14) else -1 ,1 if price(day 42) > price(day 35) else -1, ....]


However, I feel like I'm losing alot of data due to the nature of the y-training set. Are there any better ways to model this?

Thanks

• Take your 3000 samples with your 15 features, and add a new feature with meaning the price went up in the last 7 days. This new feature will be simply your y
• As for your test and training set, you could just order your samples by date, take the X% older as your training set, and the remaining as test set