ExtractAlpha
Cross Asset Model
Introduction
The Cross Asset Model by ExtractAlpha provides stock scoring values based on the trading activity in the Options market. Since the Options market has a higher proportion of institutional traders than the Equities market, the Options market is composed of investors who are more informed and information-driven on average. The data covers a dynamic universe of over 3,000 US Equities, starts in July 2005, and is delivered on a daily frequency. This dataset is created by feature engineering on the Options market put-call spread, volatility skewness, and volume.
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 Cross Asset Model 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 Cross Asset Model dataset:
from QuantConnect.DataSource import * self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol self.dataset_symbol = self.add_data(ExtractAlphaCrossAssetModel, self.aapl).symbol
using QuantConnect.DataSource; _symbol = AddEquity("AAPL", Resolution.Daily).Symbol; _datasetSymbol = AddData<ExtractAlphaCrossAssetModel>(_symbol).Symbol;
Example Applications
The Cross Asset Model dataset by ExtractAlpha enables you to utilize Options market information to extract alpha. Examples include the following strategies:
- Predicting price and volatility changes in Equities.
- Signaling arbitrage opportunities between Options and underlying assets.
- Using it as a stock selection indicator.
For more example algorithms, see Examples.
Requesting Data
To add Cross Asset Model 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 ExtractAlphaCrossAssetModelDataAlgorithm(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(ExtractAlphaCrossAssetModel, self.aapl).symbol
namespace QuantConnect { public class ExtractAlphaCrossAssetModelDataAlgorithm : 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<ExtractAlphaCrossAssetModel>(_symbol).Symbol; } } }
Accessing Data
To get the current Cross Asset Model 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} score at {slice.time}: {data_point.score}")
public override void OnData(Slice slice) { if (slice.ContainsKey(_datasetSymbol)) { var dataPoint = slice[_datasetSymbol]; Log($"{_datasetSymbol} score at {slice.Time}: {dataPoint.Score}"); } }
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(ExtractAlphaCrossAssetModel).items(): self.log(f"{dataset_symbol} score at {slice.time}: {data_point.score}")
public override void OnData(Slice slice) { foreach (var kvp in slice.Get<ExtractAlphaCrossAssetModel>()) { var datasetSymbol = kvp.Key; var dataPoint = kvp.Value; Log($"{datasetSymbol} score at {slice.Time}: {dataPoint.Score}"); } }
Historical Data
To get historical Cross Asset Model 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[ExtractAlphaCrossAssetModel](self.dataset_symbol, 100, Resolution.DAILY)
var history = History<ExtractAlphaCrossAssetModel>(_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 Cross Asset Model 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 Cross Asset Model dataset by ExtractAlpha enables you to utilize Options market information to extract alpha. Examples include the following strategies:
- Predicting price and volatility changes in Equities.
- Signaling arbitrage opportunities between Options and underlying assets.
- Using it as a stock selection indicator.
For more example algorithms, see Examples.