About Twitter Followers

The Twitter Followers dataset by Quiver Quantitative tracks the number of followers on the official Twitter pages of US-listed companies. The data covers 2,000 equities, starts in May 2020, and is delivered on a daily frequency. This dataset is created by scraping the number of Twitter followers from the official Twitter page of the security.

This dataset depends on the US Equity Security Master dataset because the US Equity Security Master dataset contains information on splits, dividends, and symbol changes.


About Quiver Quantitative

Quiver Quantitative was founded by two college students in February 2020 with the goal of bridging the information gap between Wall Street and non-professional investors. Quiver allows retail investors to tap into the power of big data and have access to actionable, easy to interpret data that hasn’t already been dissected by Wall Street.


About QuantConnect

QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.


Algorithm Example

class QuiverTwitterFollowersDataAlgorithm(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2020, 5, 1)
        self.SetEndDate(2020, 7, 1)
        self.SetCash(100000)
        
        self.UniverseSettings.Resolution = Resolution.Daily

        # add a custom universe data source (defaults to usa-equity)
        self.AddUniverse(QuiverQuantTwitterFollowersUniverse, "QuiverQuantTwitterFollowersUniverse", Resolution.Daily, self.UniverseSelection)
        
    def UniverseSelection(self, alt_coarse):
        for datum in alt_coarse:
            self.Log(f"{datum.Symbol},{datum.Followers},{datum.DayPercentChange},{datum.WeekPercentChange}")
        
        # define our selection criteria
        return [d.Symbol for d in alt_coarse \
                    if d.Followers > 200000 \
                    and d.WeekPercentChange > 0]    

    def OnData(self, data):
        points = data.Get(QuiverQuantTwitterFollowers)
            
        # Get all (symbol, followers) pair
        number = [(point.Symbol.Underlying, point.Followers) for point in points.Values]
        
        # sort the list to get top 5 most followed companies
        sort_number = sorted(number, key=lambda x: x[1], reverse=True)[:5]
        selected_symbols = [x[0] for x in sort_number]
            
        # We liquidate the stocks that fall out of top 5 most followed companies if invested previously
        for symbol in self.Portfolio.Keys:
            if self.Portfolio[symbol].Invested and symbol not in selected_symbols:
                self.Liquidate(symbol)

        # set equal holdings for the 5 selected
        for symbol in selected_symbols:
            self.SetHoldings(symbol, 1/len(selected_symbols))

    def OnSecuritiesChanged(self, changes):
        for added in changes.AddedSecurities:
            symbol = added.Symbol
            self.AddData(QuiverQuantTwitterFollowers, symbol).Symbol

            # Historical data
            history = self.History(QuiverQuantTwitterFollowers, symbol, 60, Resolution.Daily)
            self.Debug(f"We got {len(history.index)} items from our history request")

Example Applications

The Quiver Quantitative Twitter Followers dataset enables researchers to create strategies using the number of Twitter followers for companies. Examples include: