Short Availability
Supported Providers
Introduction
This page describes all of the pre-built shortable providers in LEAN. If none of these models perform exactly how you want, create a custom shortable provider.
Null Provider
The NullShortableProvider
doesn't provide shortable data, so it allows you to infinitely short assets. It's the shortable provider of the DefaultBrokerageModel
.
security.SetShortableProvider(new NullShortableProvider());
security.SetShortableProvider(NullShortableProvider())
To view the implementation of this model, see the LEAN GitHub repository.
Atreyu Provider
The AtreyuShortableProvider
provides the available shares for open short positions in the US Equity market. For more information about the data, see the US Equities Short Availability dataset from Atreyu Trading.
security.SetShortableProvider(new AtreyuShortableProvider(SecurityType.Equity, Market.USA));
security.SetShortableProvider(AtreyuShortableProvider(SecurityType.Equity, Market.USA))
The following table describes the arguments the model accepts:
Argument | Data Type | Description | Default Value |
---|---|---|---|
securityType | SecurityType | Security type to read data | |
market | string str | Market to read data |
To view the implementation of this model, see the LEAN GitHub repository.
Local Disk Provider
The LocalDiskShortableProvider
sources short availability data from the local disk of a specific brokerage.
security.SetShortableProvider(new LocalDiskShortableProvider(SecurityType.Equity, "atreyu", Market.USA));
security.SetShortableProvider(LocalDiskShortableProvider(SecurityType.Equity, "atreyu", Market.USA))
The following table describes the arguments the model accepts:
Argument | Data Type | Description | Default Value |
---|---|---|---|
securityType | SecurityType | Security type to read data | |
brokerage | string str | Brokerage to read data | |
market | string str | Market to read data |
To view the implementation of this model, see the LEAN GitHub repository.