book
Checkout our new book! Hands on AI Trading with Python, QuantConnect, and AWS Learn More arrow

ExtractAlpha

True Beats

Introduction

The True Beats dataset by ExtractAlpha provides quantitative predictions of EPS and Revenues for US Equities. The data covers a dynamic universe of around 4,000-5,000 US-listed Equities on a daily average. The data starts in January 2000 and is delivered on a daily frequency. This dataset is created by incorporating the opinions of expert analysts, historical earnings, revenue trends for the company and its peers, and metrics on company earnings management.

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 True Beats dataset, including CLI commands and pricing, see the dataset listing.

About the Provider

ExtractAlpha was founded by Vinesh Jha in 2013 with the goal of providing alternative data for investors. ExtractAlpha's rigorously researched data sets and quantitative stock selection models leverage unique sources and analytical techniques, allowing users to gain an investment edge.

Getting Started

The following snippet demonstrates how to request data from the True Beats dataset:

Select Language:
from QuantConnect.DataSource import *

self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
self.dataset_symbol = self.add_data(ExtractAlphaTrueBeats, self.aapl).symbol

Data Summary

The following table describes the dataset properties:

PropertyValue
Start DateJanuary 2000
Asset CoverageOver 5,000 US Equities
Data DensitySparse
ResolutionDaily
TimezoneUTC

Example Applications

The True Beats dataset enables you to predict EPS and revenue of US-listed Equities for trading. Examples include the following strategies:

  • Finding surprise in EPS or revenue for sentiment/arbitrage trading
  • Stock or sector selections based on EPS or revenue predictions
  • Calculate expected return by valuation models based on EPS or revenue predictions (e.g. Black-Litterman)

For more example algorithms, see Examples.

Data Point Attributes

The True Beats dataset provides ExtractAlphaTrueBeats and ExtractAlphaTrueBeat objects.

ExtractAlphaTrueBeats

ExtractAlphaTrueBeats objects have the following attributes:

ExtractAlphaTrueBeat

ExtractAlphaTrueBeat objects have the following attributes:

Requesting Data

To add True Beats 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.

Select Language:
class ExtractAlphaTrueBeatsDataAlgorithm(QCAlgorithm):

    def initialize(self) -> None:
        self.set_start_date(2019, 1, 1)
        self.set_end_date(2020, 6, 1)
        self.set_cash(100000)

        self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol
        self.dataset_symbol = self.add_data(ExtractAlphaTrueBeats, self.aapl).symbol

Accessing Data

To get the current True Beats 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.

Select Language:
def on_data(self, slice: Slice) -> None:
    if slice.contains_key(self.dataset_symbol):
        data_point = slice[self.dataset_symbol]
        self.log(f"{self.dataset_symbol} True beat at {slice.time}: {data_point.True_beat}")

To iterate through all of the dataset objects in the current Slice, call the get method.

Select Language:
def on_data(self, slice: Slice) -> None:
    for dataset_symbol, data_point in slice.get(ExtractAlphaTrueBeats).items():
        self.log(f"{dataset_symbol} True beat at {slice.time}: {data_point.True_beat}")

Historical Data

To get historical True Beats data, call the history method with the dataset Symbol. If there is no data in the period you request, the history result is empty.

Select Language:
# DataFrame
history_df = self.history(self.dataset_symbol, 100, Resolution.DAILY, flatten=True)

# Series
history_series = self.history(self.dataset_symbol, 100, Resolution.DAILY)

# Dataset objects
history_bars = self.history[ExtractAlphaTrueBeats](self.dataset_symbol, 100, Resolution.DAILY)

For more information about historical data, see History Requests.

Remove Subscriptions

To remove a subscription, call the remove_security method.

Select Language:
self.remove_security(self.dataset_symbol)

If you subscribe to True Beats 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 True Beats dataset enables you to predict EPS and revenue of US-listed Equities for trading. Examples include the following strategies:

  • Finding surprise in EPS or revenue for sentiment/arbitrage trading
  • Stock or sector selections based on EPS or revenue predictions
  • Calculate expected return by valuation models based on EPS or revenue predictions (e.g. Black-Litterman)

For more example algorithms, see Examples.

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: