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

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

Select Language:
security.set_shortable_provider(InteractiveBrokersShortableProvider())

Axos Clearing Data

Select Language:
security.set_shortable_provider(LocalDiskShortableProvider("axos"))

Data Summary

The following table describes the dataset properties:

PropertyValue
Start DateJanuary 2018
Asset Coverage10,500 US Equities
Data DensitySparse
ResolutionDaily
TimezoneNew York

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.

Data Point Attributes

The US Equities Short Availability data is a Symbol/decimal pair for ShortQuantity, FeeRate, and RebateRate.

Requesting Data

To add US Equities Short Availability data to your algorithm, set the shortable provider of each US Equity in your algorithm.

Select Language:
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

Accessing Data

To check how many shares are available for a security to short, call the shortable_quantity method of the shortable_provider

Select Language:
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 fee_rate or rebate_rate method of the shortable_provider

Select Language:
fee_rate = shortable_provider.fee_rate(self._symbol, self.time);
rebate_rate = shortable_provider.rebate_rate(self._symbol, self.time);
To get valid borrowing rates, use the InteractiveBrokersShortableProvider.

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.

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: