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:
from QuantConnect.DataSource import * self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol self.dataset_symbol = self.add_data(ExtractAlphaTrueBeats, self.aapl).symbol
using QuantConnect.DataSource; _symbol = AddEquity("AAPL", Resolution.Daily).Symbol; _datasetSymbol = AddData<ExtractAlphaTrueBeats>(_symbol).Symbol;
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 ExtractAlphaTrueBeat objects, which have the following 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 AddDataadd_data method. Save a reference to the dataset Symbol so you can access the data later in your algorithm.
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
namespace QuantConnect { public class ExtractAlphaTrueBeatsDataAlgorithm: QCAlgorithm { private Symbol _symbol, _datasetSymbol; public override void Initialize() { SetStartDate(2019, 1, 1); SetEndDate(2020, 6, 1); SetCash(100000); _symbol = AddEquity("AAPL", Resolution.Daily).Symbol; _datasetSymbol = AddData<ExtractAlphaTrueBeats>(_symbol).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.
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}")
public override void OnData(Slice slice) { if (slice.ContainsKey(_datasetSymbol)) { var dataPoint = slice[_datasetSymbol]; Log($"{_datasetSymbol} True beat at {slice.Time}: {dataPoint.TrueBeat}"); } }
To iterate through all of the dataset objects in the current Slice, call the Getget method.
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}")
public override void OnData(Slice slice) { foreach (var kvp in slice.Get<ExtractAlphaTrueBeats>()) { var datasetSymbol = kvp.Key; var dataPoint = kvp.Value; Log($"{datasetSymbol} True beat at {slice.Time}: {dataPoint.TrueBeat}"); } }
Historical Data
To get historical True Beats data, call the Historyhistory 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 history_bars = self.history[ExtractAlphaTrueBeats](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<ExtractAlphaTrueBeats>(_datasetSymbol, 100, Resolution.Daily);
For more information about historical data, see History Requests.
Remove Subscriptions
To remove a subscription, call the RemoveSecurityremove_security method.
self.remove_security(self.dataset_symbol)
RemoveSecurity(_datasetSymbol);
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.