Sentiment Filter for Equity Investment

Thursday, 27 July 2017 Daniel Chow

Introduction

Sentiment Analysis is the extraction of the positivity or negativity of an asset using news. It has been claimed to be an alternative investment technique to traditional fundamental and technical analysis techniques.

In this report, we hope to introduce sentiment as a viable stock selection criteria and show that sentiment alpha exists using a simple and obvious strategy.

 

Skeleton Strategy

Every trading day, we filter out stocks in our trading universe that meet the filter criteria and invest in them, closing on the next trading day where we repeat the process.

Long-Only Positive Sentiment Filter Strategy

The strategy can be described as follow:

  • At the start of each trading day
  • Select stocks in the universe with previous day sentiment > 7 and invest in them with weightage based on the previous day sentiment holding for 1 trading day

We basically invest in stocks that had a strong sentiment on the previous trading day, believing that the sentiment will drive further gains and profit.

The weightage assigned to each stock will be (sentiment/sum of all sentiment that fits filter) as we want to assign more weightage on stocks with the best sentiment.

For example, if we have the following 3 stocks,

  • Stock1 Sentiment: 8
  • Stock2 Sentiment: 10
  • Stock3 Sentiment: 8

The weightage assigned to each will be

weightage assigned

Testing Methodology

For our tests, we used 30 stocks that are either current components in the Dow Jones Industrial Average or were component of the index in the past and backtested over the whole of 2016 on the Quantopian Platform.

The list of stocks can be found at the end of the report.

 

Backtest Results

Sentiment Filter for Equity Investment **The benchmark used is the S&P500 index

**More details and Source Code on Quantopian

Trading too many Stocks

It is important to ensure that the strategy does not trade too many stocks. With an extremely short holding period of 1 day and high portfolio turnover, trading too many stocks can lead to extremely high transaction costs.

Some of the causes of trading too many stocks:

  • The filter is not strict enough, leading to many stocks passing the filter criteria.
  • Trading universe is too large which also allows many stocks to pass the filter criteria. Tests using the S&P500 Components as our trading universe led to 50+ stocks daily and huge transaction costs.

Some of the solutions to the above:

  • Stricter selection criteria.
  • Smaller trading universe. In our tests, we limited to just 30 stocks so in the worst case, we invest in at most 30 stocks. Though on average, only 3-6 stocks pass the criteria daily.
  • Use secondary selection criteria. If we find that the first filter selects too many stocks, we can further select by taking the n-largest or n-random stocks from the selection based on how many we need. 

Other Possible Filters

Here are some suggestions for other possible filters:

  • Sentiment – 5-day Sentiment SMA/EMA
  • (Sentiment – 5-day Sentiment Low)/(5-day Sentiment High – 5-day Sentiment Low) (Variant of the Stochastic Oscillator in Technical Analysis)

Both above filters work on the concept of relative sentiment, which means that when we look at current sentiment data, we need to also consider the sentiment data of the recent past before we can determine how good or bad current sentiment data is.

For example, if the past sentiment has been extremely bad for successive days and the sentiment today is not as bad, we will view this as a good sign and count the current sentiment as good even though the absolute value of the sentiment is not high. The above filters will allow us to compare how the current sentiment is compared to the sentiment of the recent past. 

Conclusion

The use of sentiment filter conditions allows us to narrow down on a specific stock to invest in, leading to a strong outperformance of the benchmarks even with a simple and obvious filter condition such as investing in stock with good sentiment.

It is possible that more complex methods and models can uncover and lead to even better returns.

 

List of Stocks in Universe

Name Symbol
3M CO MMM
ALCOA INC AA
AMERICAN EXPRESS CO AXP
AT&T INC T
BANK OF AMERICA CORP BAC
BOEING CO BA
CATERPILLAR INC CAT
CHEVRON CORP CVX
CISCO SYSTEMS INC CSCO
COCA-COLA CO KO
DU PONT DE NEMOURS DD
EXXON MOBIL CORP XOM
GENERAL ELECTRIC CO GE
HEWLETT-PACKARD CO HPQ
HOME DEPOT INC HD
INTEL CORP INTC
INTL BUSINESS MACHINES CORP IBM
JOHNSON & JOHNSON JNJ
JPMORGAN CHASE & CO JPM
MCDONALD’S CORP MCD
MERCK & CO MRK
MICROSOFT CORP MSFT
PFIZER INC PFE
PROCTER & GAMBLE CO PG
TRAVELERS COS INC TRV
UNITED TECHNOLOGIES CORP UTX
UNITEDHEALTH GROUP INC UNH
VERIZON COMMUNICATIONS INC VZ
WAL-MART STORES INC WMT
WALT DISNEY DIS

 

Leave a Reply

Your email address will not be published. Required fields are marked *