---
title: "Tiingo News Feed"
description: "Tiingo News Feed dataset from Tiingo."
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/datasets/tiingo/tiingo-news-feed
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/datasets/tiingo/tiingo-news-feed.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/14%20Datasets/27%20Tiingo/01%20Tiingo%20News%20Feed
modified: 2026-10-31
index: https://www.quantconnect.com/llms.txt
---

# Tiingo News Feed

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > Datasets > [Tiingo](https://www.quantconnect.com/docs/v2/writing-algorithms/datasets/tiingo.md) > Tiingo News Feed

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## Introduction

The Tiingo News Feed dataset by Tiingo tracks US Equity news releases. The data covers 10,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](https://www.quantconnect.com/datasets/quantconnect-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](https://www.quantconnect.com/datasets/tiingo-news-feed).

## About the Provider

[Tiingo](https://www.tiingo.com/) 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:

```python
self.aapl = self.add_equity("AAPL", Resolution.MINUTE).symbol
self.dataset_symbol = self.add_data(TiingoNews, self.aapl).symbol
```

## Data Summary

The following table describes the dataset properties:

| Property | Value |
| --- | --- |
| Start Date | January 2014 |
| Asset Coverage | 10,000 US Equities |
| Data Density | Sparse |
| Resolution | Second |
| Timezone | UTC |

## Requesting Data

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

```python
class TiingoNewsDataAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self.set_start_date(2021, 1, 1)
        self.set_end_date(2021, 6, 1)
        self.set_cash(100000)

        self.aapl = self.add_equity("AAPL", Resolution.MINUTE).symbol
        self.dataset_symbol = self.add_data(TiingoNews, self.aapl).symbol
```

## Accessing Data

To get the current Tiingo News Feed data, index the current [`Slice`](https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/time-modeling/timeslices.md) 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.

```python
def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        article = slice[self.dataset_symbol]
        self.log(f"{self.dataset_symbol} article description at {slice.time}: {article.description}")
```

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

```python
def on_data(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}")
```

## 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.

```python
# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
self.history[TiingoNews](self.dataset_symbol, 100, Resolution.DAILY)
```

For more information about historical data, see [History Requests](https://www.quantconnect.com/docs/v2/writing-algorithms/historical-data/history-requests.md).

## Remove Subscriptions

To remove a subscription, call the `remove_security` method.

```python
self.remove_security(self.dataset_symbol)
```

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](https://www.quantconnect.com/docs/v2/writing-algorithms/algorithm-framework/alpha/key-concepts.md#05-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
- [Detecting impactful news in ETF constituents](https://www.quantconnect.com/research/14902/detecting-impactful-news-in-etf-constituents)

### Classic Algorithm Example

The following example algorithm assigns a sentiment score to each news article that's released for Apple. When the sentiment score is positive, the algorithm buys Apple stock. When the sentiment score is negative, it short sells Apple stock.

```python
from AlgorithmImports import *

class TiingoNewsDataAlgorithm(QCAlgorithm):

    current_holdings = 0
    target_holdings = 0
    # Custom word-score map to assign score for each word in article
    word_scores = {'good': 1, 'great': 1, 'best': 1, 'growth': 1,
                   'bad': -1, 'terrible': -1, 'worst': -1, 'loss': -1}

    def initialize(self) -> None:
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)
        self.set_cash(100000)

        # Requesting Tiingo news data to obtain the updated news articles to calculate the sentiment score
        self.aapl = self.add_equity("AAPL", Resolution.MINUTE).symbol
        self.tiingo_symbol = self.add_data(TiingoNews, self.aapl).symbol

        # Historical data
        history = self.history(self.tiingo_symbol, 14, Resolution.DAILY)
        self.debug(f"We got {len(history)} items from our history request")

    def on_data(self, slice: Slice) -> None:
        if slice.contains_key(self.tiingo_symbol):
            # Assign a sentiment score to the news article by the word-score map
            title_words = slice[self.tiingo_symbol].description.lower()
            score = 0
            for word, word_score in self.word_scores.items():
                if word in title_words:
                    score += word_score

            # Buy if aggregated sentiment score shows positive sentiment, sell vice versa
            if score > 0:
                self.target_holdings = 1
            elif score < 0:
                self.target_holdings = -1

        # Buy or short sell if the sentiment has changed from our current holdings
        if slice.contains_key(self.aapl) and self.current_holdings != self.target_holdings:
            self.set_holdings(self.aapl, self.target_holdings)
            self.current_holdings = self.target_holdings
```

### Framework Algorithm Example

The following example algorithm assigns a sentiment score to each news article that's released for Apple. When the sentiment score is positive, the algorithm buys Apple stock. When the sentiment score is negative, it short sells Apple stock. The algorithm holds positions for 14 days.

```python
from AlgorithmImports import *

class TiingoNewsDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2024, 9, 1)
        self.set_end_date(2024, 12, 31)
        self.set_cash(100000)

        symbols = [Symbol.create("AAPL", SecurityType.EQUITY, Market.USA)]
        self.add_universe_selection(ManualUniverseSelectionModel(symbols))
        self.add_alpha(TiingoNewsAlphaModel())
        self.set_portfolio_construction(EqualWeightingPortfolioConstructionModel())

class TiingoNewsAlphaModel(AlphaModel):

    current_holdings = 0
    target_holdings = 0
    # Custom word-score map to assign score for each word in article
    word_scores = {'good': 1, 'great': 1, 'best': 1, 'growth': 1,
                   'bad': -1, 'terrible': -1, 'worst': -1, 'loss': -1}

    def update(self, algorithm: QCAlgorithm, slice: Slice) -> List[Insight]:
        if slice.contains_key(self.tiingo_symbol):
            # Assign a sentiment score to the news article by the word-score map
            title_words = slice[self.tiingo_symbol].description.lower()
            score = 0
            for word, word_score in self.word_scores.items():
                if word in title_words:
                    score += word_score

            # Buy if aggregated sentiment score shows positive sentiment, sell vice versa
            if score > 0:
                self.target_holdings = 1
            elif score < 0:
                self.target_holdings = -1

        # Buy or short sell if the sentiment has changed from our current holdings
        if slice.contains_key(self.aapl) and self.current_holdings != self.target_holdings:
            self.current_holdings = self.target_holdings
            direction = InsightDirection.UP if self.target_holdings == 1 else InsightDirection.DOWN
            return [Insight.price(self.aapl, timedelta(days=14), direction)]

        return []

    def on_securities_changed(self, algorithm: QCAlgorithm, changes: SecurityChanges) -> None:
        for security in changes.added_securities:
            self.aapl = security.symbol

            # Requesting Tiingo news data to obtain the updated news articles to calculate the sentiment score
            self.tiingo_symbol = algorithm.add_data(TiingoNews, self.aapl).symbol

            # Historical data
            history = algorithm.history(self.tiingo_symbol, 14, Resolution.DAILY)
            algorithm.debug(f"We got {len(history)} items from our history request")
```

## Data Point Attributes

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

*Members of `QuantConnect.DataSource.TiingoNews` (JSON): https://www.quantconnect.com/services/inspector?type=T:QuantConnect.DataSource.TiingoNews&language=python*
