Tiingo

Tiingo News Feed

Introduction

The Tiingo News Feed dataset by Tiingo tracks US Equity news releases. The data covers 8,000 US Equities, starts in January 2014, and is delivered on a second frequency. This dataset is creating by Tiingo integrating over 120 different news providers into their platform.

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.

For more information about the Tiingo News Feed dataset, including CLI commands and pricing, see the dataset listing.

About the Provider

Tiingo was founded by Rishi Singh in 2014. Tiingo goes beyond traditional news sources and focuses on finding rich, quality content written by knowledgeable writers. Their proprietary algorithms scan unstructured, non-traditional news and other information sources while tagging companies, topics, and assets. This refined system is backed by over ten years of research and development, and is written by former institutional quant traders. Because of this dedicated approach, Tiingo's News API is a trusted tool used by quant funds, hedge funds, pension funds, social media companies, and tech companies around the world.

Getting Started

The following snippet demonstrates how to request data from the Tiingo News Feed dataset:

self.symbol = self.AddEquity("AAPL", Resolution.Minute).Symbol
self.dataset_symbol = self.AddData(TiingoNews, self.symbol).Symbol
_symbol = AddEquity("AAPL", Resolution.Minute).Symbol;
_datasetSymbol = AddData<TiingoNews>(_symbol).Symbol;

Data Summary

The following table describes the dataset properties:

PropertyValue
Start DateJanuary 2014
Asset Coverage28,000 US Equities
Data DensitySparse
ResolutionSecond
TimezoneUTC

Data Point Attributes

The Tiingo News Feed dataset provides TiingoNews objects, which have the following attributes:

Requesting Data

To add Tiingo News Feed data to your algorithm, call the AddData method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.

class TiingoNewsDataAlgorithm(QCAlgorithm):
    def Initialize(self) -> None:
        self.SetStartDate(2021, 1, 1)
        self.SetEndDate(2021, 6, 1)
        self.SetCash(100000)

        self.symbol = self.AddEquity("AAPL", Resolution.Minute).Symbol
        self.dataset_symbol = self.AddData(TiingoNews, self.symbol).Symbol
namespace QuantConnect.Algorithm.CSharp.AltData
{
    public class TiingoNewsDataAlgorithm : QCAlgorithm
    {
        private Symbol _symbol, _datasetSymbol;

        public override void Initialize()
        {
            SetStartDate(2021, 1, 1);
            SetEndDate(2021, 6, 1);
            SetCash(100000);

            _symbol = AddEquity("AAPL", Resolution.Minute).Symbol;
            _datasetSymbol = AddData<TiingoNews>(_symbol).Symbol;
        }
    }
}

Accessing Data

To get the current Tiingo News Feed data, index the current Slice with the dataset Symbol. Slice objects deliver unique events to your algorithm as they happen, but the Slice may not contain data for your dataset at every time step. To avoid issues, check if the Slice contains the data you want before you index it.

def OnData(self, slice: Slice) -> None:
    if slice.ContainsKey(self.dataset_symbol):
        article = slice[self.dataset_symbol]
        self.Log(f"{self.dataset_symbol} article description at {slice.Time}: {article.Description}")
public override void OnData(Slice slice)
{
    if (slice.ContainsKey(_datasetSymbol))
    {
        var article = slice[_datasetSymbol];
        Log($"{_datasetSymbol} article description at {slice.Time}: {article.Description}");
    }
}

To iterate through all of the articles in the current Slice, call the Get method.

def OnData(self, slice: Slice) -> None:
    for dataset_symbol, article in slice.Get(TiingoNews).items():
        self.Log(f"{dataset_symbol} article description at {slice.Time}: {article.Description}")
public override void OnData(Slice slice)
{
    foreach (var kvp in slice.Get<TiingoNews>())
    {
        var datasetSymbol = kvp.Key;
        var article = kvp.Value;
        Log($"{datasetSymbol} article description at {slice.Time}: {article.Description}");
    }
}

Historical Data

To get historical Tiingo News Feed data, call the History method with the dataset Symbol. If there is no data in the period you request, the history result is empty.

# DataFrame
history_df = self.History(self.dataset_symbol, 100, Resolution.Daily)

# Dataset objects
self.History[TiingoNews](self.dataset_symbol, 100, Resolution.Daily)
var history = History<TiingoNews>(_datasetSymbol, 100, Resolution.Daily);

For more information about historical data, see History Requests.

Remove Subscriptions

To remove a subscription, call the RemoveSecurity method.

self.RemoveSecurity(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);

If you subscribe to Tiingo News Feed data for assets in a dynamic universe, remove the dataset subscription when the asset leaves your universe. To view a common design pattern, see Track Security Changes.

Example Applications

The Tiingo News Feed enables you to accurately design strategies harnessing news articles on the companies you're trading. Examples include the following strategies:

  • Creating a dictionary of sentiment scores for various words and assigning a sentiment score to the content of each news release
  • Calculating the sentiment of news releases with Natural Language Processing (NLP)
  • Trading securities when their news releases are tagged by Tiingo with current buzzwords

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: