One of the new methods in machine learning is spectral regression (SR). SR works great for pattern recognition and so I built testbed in node.js to determine if it’s possible to predict future sentiment based on trained data.
I proceeded by taking 360 days of sentiment data for Apple and Google, and then split each into 3 sets. I cross validated the sets by using 2 for training and the last one for predicting, run for each of the 3 permutations. The 7 days ahead prediction values would be calculated on the prior 14 days of data. After running the 3 permutations I then sliced the 3 prediction windows together to create the predictions over 360 days.
The results are very encouraging, as can be seen from the data whilst the magnitude of the sentiment does sometimes have large over estimates the overall direction change does follow closely with reality.
- blue line is actual data, green line is predicted data
This does imply the ability to predict 7 day sentiment for keywords, and from my previous experiments with stock correlations, could allow you to determine future market indicators.