Back to Community
Alpha Factor based off of News Sentiment with Accern

This is a simple long/short trading strategy that attempts to profit off the drift following a positive or negative news sentiment release. Accern analyzes millions of news and blog articles through their multi-layer deep learning approach to provide two scores for their Alphaone datafeed:

  • 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

In this strategy, I use the sentiment to rank each security within the Health Care & Energy Sector (found through the Factor Tearsheet). My economic hypothesis being that overall news & blog sentiment may have a following drift, similar to the one found for earnings announcements.

Strategy Notes

  • Data set: The full dataset used is Accern's Alphaone Dataset
  • Weights: The weight for each security is determined by the total number of longs and shorts we have in that current day. This number as well as the rebalance is done on a weekly basis.
  • Days held: Positions are currently held for 7 days but are easily changeable by modifying the rebalance schedule_function period
  • Article Sentiment: Look at the 40 day article sentiment average
  • Sectors: Using the Factor Tearsheet I found that my factor held the highest IC for stocks in the Energy & Healthcare. This may change with liquidity constraints, time periods, and even the factor that you are using.
  • The full Accern Alphaone datafeed includes availability for live trading.

For out-of-sample results, please view the first reply to this thread.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

8 responses

Here is the out-of-sample version of the algorithm above. The premium data feed is required in order to run this backtest.

Clone Algorithm
33
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 570435598fdfef0dff0f9f4d
There was a runtime error.

What caused the abnormal jump in February 2016?

Looks like for February 2016, the news sentiment indicators went short on health care securities (TEVA, BIIB, VRX) that were having a large number of internal conflicts. I.E. the VRX scandal -> http://etfdailynews.com/2016/04/05/valeant-pharmaceuticals-intl-inc-vrx-stock-soars-after-its-own-board-clears-itself-of-any-more-wrongdoing/

Here's a different, more simplified alpha factor that isn't restricted to sector.

In-sample dates are 2013-01-01 to 2014-04-01. This one simply looks at the previous day's article sentiment with an impact score > 90.

class AccernAlphaOne(CustomFactor):  
    """  
    Baseline Accern Factor  
    """  
    inputs = [alphaone.article_sentiment]  
    window_length = 1  
    def compute(self, today, assets, out, sentiment):  
        out[:] = sentiment  
Clone Algorithm
33
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 57057f6026ccfa0f4b986889
There was a runtime error.

@Seong...I know you all like to post algos that only run on near term time frames, but is there anyway you could show an out-of-sample result? I think it would be much more realistic in showing how effective these types of algos really could be with different market trends.

Hi Daniel,

The out of sample results are posted for the first algo on this thread.

And here is the out of sample for the second, previous day look back algo

Clone Algorithm
33
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5702ed84c601500e0c9a9a92
There was a runtime error.

@Seong - Thanks, I apparently wasn't paying attention, seeing that you already posted it!