For those interested in using news sentiment data feeds, this thread is dedicated to showing pipeline factor examples created with Accern's Alphaone data feed. These factors are meant for you to build, iterate on, and use in other Pipeline based algorithms you may have.
There will be a number of different factors on this thread and new ones will be updated periodically. To view a complete list of template pipeline factors for all data feeds, please visit this factor library.
So here's what you're going to get:
- Research: You'll get the economic hypothesis behind the factor and the iterations I went through before arriving at the final factor. You'll also be able to clone and visualize this factor yourselves by adjusting the date ranges and data imports available (for those who don't have the premium datafeed). This process is something you can replicate for yourselves easily by using the Factor Tearsheet.
- Pyfolio in-sample and out-of-sample factor performance: You'll get the in-sample (26 Aug 2012 - 14 Apr 2014) and out-of-sample (15 Apr 2014 - 11 Apr 2016) results of a template algorithm using this factor.
- Template algorithm: You'll get the template algorithm used to evaluate this factor. This algorithm is not geared for trading as commissions and slippage are set to zero; however, it provides a good, liquid universe filter for you to build and add other pipeline factors. Commissions and slippage are set to zero in order to analyze the alpha signal of the factor independent of other variables. I recommend using these factors as building blocks for your overall strategy.
- article_sentiment - a score in [-1,1] reflecting the sentiment of articles written about the company in the last day. The higher score, the more positive the outlook
- impact_score - on [0,100], this is the probability that the stock price will change by more than 1% (given by: close - open / open) on the next trading day
- Coverage extends to, on average, 5,000 securities per year
Each factor is linked to the full research and backtest. You can find them all listed here:
class WeightedSentimentByVolatility(CustomFactor): # Economic Hypothesis: Sentiment volatility can be an indicator that # public news is changing rapidly about a given security. So securities # with a high level of sentiment volatility may indicate a change in # momentum for that stock's price. inputs = [alphaone.article_sentiment] window_length = 30 def compute(self, today, assets, out, sentiment): out[:] = np.nanstd(sentiment, axis=0) * np.nanmean(sentiment, axis=0)
class DailySentimentByImpactScore(CustomFactor): # Economic Hypothesis: Accern reports both an `impact score` # and `article sentiment`. The `impact score` is used to measure # the likelihood that a security's price changes by more than 1% # in the following day. The `article sentiment` is a quantified daily # measure of news & blog sentiment about a given security. This combined # measure of `impact score` and `article sentiment` may hold information # about price changes in the following day. inputs = [alphaone.article_sentiment, alphaone.impact_score] window_length = 1 def compute(self, today, assets, out, sentiment, impact_score): out[:] = sentiment * impact_score
Algorithms using Accern's News Sentiment