I added two kinds of moving averages to the
sentiments.py script, and as you can see from the results below, whether you go with the
numpy version or the Technical Analysis library,
talib, of the running average, you get the same results: NP starts its running average at the beginning of the window; TA at the end. Here, the window was 10% of the total sentence count, which was approximately 700 overall. I entered the following in Python:
my_file = "/Users/john/Code/texts/sentiment/mdg.txt" smooth_plots(my_file, 70)
And here is the graph:
The entire script is available as a [gist]gh.
Next step: NORMALIZATION!