Back to Community
Alpha Factor based off StockTwits Trader Mood (Long/Short)

This is an algorithm that was inspired by a study documenting the non-linear evidence of social media on stock prices. In the study, Thársis T.P. Souza finds that social media has an effect on stock prices that cannot be explained away by other fundamental factors. My main takeaway from the study wasn't the researcher's findings, but rather the universe he examined (DJIA). In previous algorithms, I had used a blind factor ranking regardless of message volume. In this algorithm, I constrain my universe to purely securities with the highest levels of message volume and get more consistent and stable results through 2015 than my previous work.

Before cloning the algorithm, please read through these strategy notes:

  • This algorithm is basically a culmination of parts 3~4 of the Trader Mood Research Series: Hypothesis testing and crafting a signal to begin strategy creation.
  • This algorithm provides a simple framework for working with Trader Mood by only looking at the previous day's mood. In order to evaluate that signal independent of other factors, slippage and commissions have been set to zero. The algorithm itself is not geared for practical trading and will perform poorly with slippage & commissions on.
  • It uses the StockTwits Trader Mood dataset by PsychSignal between January of 2014 ~ December 2015. The full sample data feed is available from 10 Jul 2009 - two months delay from today.
  • The algorithm uses a weighting of message volume and bullish/bearish intensity to determine positions. The message volume is used as a filter (the top 500 securities with the highest volume of messages are looked at) and the previous day's bullish/bearish intensity is used as the ranking methodology.
  • Basic liquidity floors are used: ADV > 10,000,000 and only looking at the top 1,000 stocks by liquidity ranking

I'm excited to see what progressions we can make with this, please post back with your own variations if you want suggestions/feedback.

Finally, join us for our recorded webinar as we walk through this series with James Crane-Baker from PsychSignal.

This algorithm is for education - the algorithm is not intended to provide investment advice.

Clone Algorithm
Backtest from to with initial capital
Total Returns
Max Drawdown
Benchmark Returns
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: 56fecb03e199f10f401e380e
There was a runtime error.

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.

1 response

For those who missed the webinar, you can view it here:

Also attached is the tearsheet for this algorithm and a few notes:

  • Turnover seems pretty stable (approx 30% per month 1.5% per day)
  • Returns are higher in 2015 than in 2014
  • Overall performance is stable
Loading notebook preview...
Notebook previews are currently unavailable.