Skip to content

NullShortableProvider

QuantConnect.Data.Shortable.NullShortableProvider

Bases: Object, IShortableProvider

Defines the default shortable provider in the case that no local data exists. This will allow for all assets to be infinitely shortable, with no restrictions.

INSTANCE

The null shortable provider instance

fee_rate

fee_rate(symbol: Symbol, local_time: datetime) -> float

Gets interest rate charged on borrowed shares for a given asset.

Parameters:

Name Type Description Default
symbol Symbol

Symbol to lookup fee rate

required
local_time datetime

Time of the algorithm

required

Returns:

Type Description
float

zero indicating that it is does have borrowing costs.

rebate_rate

rebate_rate(symbol: Symbol, local_time: datetime) -> float

Gets the Fed funds or other currency-relevant benchmark rate minus the interest rate charged on borrowed shares for a given asset. E.g.: Interest rate - borrow fee rate = borrow rebate rate: 5.32% - 0.25% = 5.07%.

Parameters:

Name Type Description Default
symbol Symbol

Symbol to lookup rebate rate

required
local_time datetime

Time of the algorithm

required

Returns:

Type Description
float

zero indicating that it is does have borrowing costs.

shortable_quantity

shortable_quantity(
    symbol: Symbol, local_time: datetime
) -> Optional[int]

Gets the quantity shortable for the Symbol at the given time.

Parameters:

Name Type Description Default
symbol Symbol

Symbol to check

required
local_time datetime

Local time of the algorithm

required

Returns:

Type Description
Optional[int]

null, indicating that it is infinitely shortable.