Lean  $LEAN_TAG$
QuantConnect.Data.Shortable.LocalDiskShortableProvider Class Reference

Sources short availability data from the local disk for the given brokerage More...

Inheritance diagram for QuantConnect.Data.Shortable.LocalDiskShortableProvider:
[legend]

Public Member Functions

 LocalDiskShortableProvider (string brokerage)
 Creates an instance of the class. Establishes the directory to read from. More...
 
decimal FeeRate (Symbol symbol, DateTime localTime)
 Gets interest rate charged on borrowed shares for a given asset. More...
 
decimal RebateRate (Symbol symbol, DateTime localTime)
 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%. More...
 
long? ShortableQuantity (Symbol symbol, DateTime localTime)
 Gets the quantity shortable for the Symbol at the given date. More...
 

Protected Member Functions

record ShortableData (long? ShortableQuantity, decimal RebateFee, decimal FeeRate)
 Gets the shortable data More...
 

Static Protected Attributes

static IDataProvider DataProvider = Composer.Instance.GetPart<IDataProvider>()
 The data provider instance to use More...
 

Properties

string Brokerage [get, set]
 The short availability provider More...
 

Detailed Description

Sources short availability data from the local disk for the given brokerage

Definition at line 29 of file LocalDiskShortableProvider.cs.

Constructor & Destructor Documentation

◆ LocalDiskShortableProvider()

QuantConnect.Data.Shortable.LocalDiskShortableProvider.LocalDiskShortableProvider ( string  brokerage)

Creates an instance of the class. Establishes the directory to read from.

Parameters
brokerageBrokerage to read the short availability data

Definition at line 49 of file LocalDiskShortableProvider.cs.

Member Function Documentation

◆ FeeRate()

decimal QuantConnect.Data.Shortable.LocalDiskShortableProvider.FeeRate ( Symbol  symbol,
DateTime  localTime 
)

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

Parameters
symbolSymbol to lookup fee rate
localTimeTime of the algorithm
Returns
Fee rate. Zero if the data for the brokerage/date does not exist.

Implements QuantConnect.Interfaces.IShortableProvider.

Definition at line 60 of file LocalDiskShortableProvider.cs.

◆ RebateRate()

decimal QuantConnect.Data.Shortable.LocalDiskShortableProvider.RebateRate ( Symbol  symbol,
DateTime  localTime 
)

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
symbolSymbol to lookup rebate rate
localTimeTime of the algorithm
Returns
Rebate fee. Zero if the data for the brokerage/date does not exist.

Implements QuantConnect.Interfaces.IShortableProvider.

Definition at line 77 of file LocalDiskShortableProvider.cs.

◆ ShortableQuantity()

long? QuantConnect.Data.Shortable.LocalDiskShortableProvider.ShortableQuantity ( Symbol  symbol,
DateTime  localTime 
)

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

Parameters
symbolSymbol to lookup shortable quantity
localTimeTime of the algorithm
Returns
Quantity shortable. Null if the data for the brokerage/date does not exist.

Implements QuantConnect.Interfaces.IShortableProvider.

Definition at line 93 of file LocalDiskShortableProvider.cs.

◆ ShortableData()

record QuantConnect.Data.Shortable.LocalDiskShortableProvider.ShortableData ( long?  ShortableQuantity,
decimal  RebateFee,
decimal  FeeRate 
)
protected

Gets the shortable data

Member Data Documentation

◆ DataProvider

IDataProvider QuantConnect.Data.Shortable.LocalDiskShortableProvider.DataProvider = Composer.Instance.GetPart<IDataProvider>()
staticprotected

The data provider instance to use

Definition at line 34 of file LocalDiskShortableProvider.cs.

Property Documentation

◆ Brokerage

string QuantConnect.Data.Shortable.LocalDiskShortableProvider.Brokerage
getsetprotected

The short availability provider

Definition at line 43 of file LocalDiskShortableProvider.cs.


The documentation for this class was generated from the following file: