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.set_shortable_provider(NullShortableProvider())
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("axos"));
security.set_shortable_provider(LocalDiskShortableProvider("axos"))
The following table describes the arguments the model accepts:
Argument | Data Type | Description | Default Value |
---|---|---|---|
brokerage | string str | Brokerage to read data |
To view the implementation of this model, see the LEAN GitHub repository.
Interactive Brokers Provider
The InteractiveBrokersShortableProvider
sources short availability data from Interactive Brokers.
security.SetShortableProvider(new InteractiveBrokersShortableProvider());
security.set_shortable_provider(InteractiveBrokersShortableProvider())
To view the implementation of this model, see the LEAN GitHub repository.