QuantConnect
US Equities Short Availability
Introduction
The US Equity Short Availability dataset provides the available shares for open short positions and their borrowing cost in the US Equity market. The data covers 10,500 US Equities, starts in January 2018, and is delivered on a daily frequency. This dataset is created using information from the exchanges.
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 US Equities Short Availability dataset, including CLI commands and pricing, see the dataset listing.
About the Provider
QuantConnect was founded in 2012 to serve quants everywhere with the best possible algorithmic trading technology. Seeking to disrupt a notoriously closed-source industry, QuantConnect takes a radically open-source approach to algorithmic trading. Through the QuantConnect web platform, more than 50,000 quants are served every month.
Getting Started
The following snippets demonstrate how to request data from the US Equities Short Availability dataset.
Interactive Brokers Data
security.set_shortable_provider(InteractiveBrokersShortableProvider())
security.SetShortableProvider(new InteractiveBrokersShortableProvider());
Axos Clearing Data
security.set_shortable_provider(LocalDiskShortableProvider("axos"))
security.SetShortableProvider(new LocalDiskShortableProvider("axos"));
Example Applications
The US Equities Short Availability dataset enables you to accurately design strategies harnessing information about short availability. Examples include the following use cases:
- Avoiding short orders that the brokerage will reject
- Selecting securities based on how many shares are available to short
For more example algorithms, see Examples.
Requesting Data
To add US Equities Short Availability data to your algorithm, set the shortable provider of each US Equity in your algorithm.
class ShortAvailabilityDataAlgorithm(QCAlgorithm): def initialize(self) -> None: self.set_start_date(2019, 1, 1) security = self.add_equity("AAPL") # Set shortable provider as IB security.set_shortable_provider(InteractiveBrokersShortableProvider()) self._symbol = security.symbol
using QuantConnect.Data.Shortable; namespace QuantConnect { public class ShortAvailabilityDataAlgorithm : QCAlgorithm { private Symbol _symbol; public override void Initialize() { SetStartDate(2019, 1, 1); var security = AddEquity("AAPL"); // Set shortable provider as IB security.SetShortableProvider(new InteractiveBrokersShortableProvider()); _symbol = security.Symbol; } } }
Accessing Data
To check how many shares are available for a security to short, call the ShortableQuantityshortable_quantity method of the ShortableProvidershortable_provider
var shortableProvider = Securities[_symbol].ShortableProvider; // Get the shortable quantity of the selected symbol at the selected time var shortableQuantity = shortableProvider.ShortableQuantity(_symbol, Time); // Check if there are a certain quantity of shares available var quantity = 100; var isShortableQuantity = Shortable(_symbol, quantity);
shortable_provider = self.securities[self._symbol].shortable_provider # Get the shortable quantity of the selected symbol at the selected time shortable_quantity = shortable_provider.shortable_quantity(self._symbol, self.time) # Check if there are a certain quantity of shares available quantity = 100; is_shortable_quantity = self.shortable(self._symbol, quantity)
To check borrowing cost, call the FeeRatefee_rate or RebateRaterebate_rate method of the ShortableProvidershortable_provider
var feeRate = shortableProvider.FeeRate(_symbol, Time); var rebateRate = shortableProvider.RebateRate(_symbol, Time);
fee_rate = shortable_provider.fee_rate(self._symbol, self.time); rebate_rate = shortable_provider.rebate_rate(self._symbol, self.time);
Example Applications
The US Equities Short Availability dataset enables you to accurately design strategies harnessing information about short availability. Examples include the following use cases:
- Avoiding short orders that the brokerage will reject
- Selecting securities based on how many shares are available to short
For more example algorithms, see Examples.