Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
7D SMA of Sentiment as an overbullish or overbearish indicator

We look at the 7D SMA of the News Sentiment on Apple stock and use it as a over-bullish or over-bearish indicator

If the 7D SMA is > to 5,5 (validated empirically), but it starts to decline, we sell. If the 7D SMA is < 5 (also validated empirically), but it starts to rise, we buy. News sentiment data are generated by our InfoTrie FinSentS engine. They rank from 1 (very bearish) to 10 (very bullish). We generate scores on Equities, FX, commodities ...
Note that this daily scores represent average of sentiment scores of articles mentioning Apple in business and financial news. 6 months scores can be downloaded for free on http://portal.finsents.com
Post on our blog : http://www.infotrie.com/blog/capm-sentiment-and-oscillators/item/sentiment-analysis-as-a-contradictory-indicator-aapl-in-2013
This is a very basic scenario. I will soon post more advanced ones.

5 responses

Implemented a slightly more aggressive version of the algo. By checking previous day 7D sma of Sentiment it gives better results

    if ((sma  5.5) or (prev_sma > 5.5)) and (prev_sma > sma):  
           order(c.security, -c.order_size)  
           #log.info('go short')  
           traded_price = data[sid(24)].price  

Corrected a few bugs and added a few checks on the way we cover

Corrected typos

Works as well with an EMA, even though need to change thresholds to trigger buy/sell

Similar example on MSFT, results are less good there: the stock took more than 40% during that period and I can only reach a maximum of 27-28% by tweaking my thresholds. Still there are multiple interesting signals detected and tradable.