Lean icon indicating copy to clipboard operation
Lean copied to clipboard

Model Short Interest Fee on Short Holdings

Open jaredbroad opened this issue 5 years ago • 4 comments

Expected Behavior

Fees paid for a hard to borrow stock

Actual Behavior

No fees paid for shorts.

Potential Solution

Obtain hard to borrow list; model fees.

Reproducing the Problem

Short hard to borrow stocks

Checklist

  • [x] I have completely filled out this template
  • [x] I have confirmed that this issue exists on the current master branch
  • [x] I have confirmed that this is not a duplicate issue by searching issues

jaredbroad avatar Jul 07 '20 14:07 jaredbroad

Would be great to get some attention to this. The web app even has an "Exposure> Equity Long/Short Ratio" chart for when the algo sells a security one does not possess.

For interactive brokers the cost modeling would be 0.25% annualized:

https://www.interactivebrokers.com/en/pricing/short-sale-cost.php#:~:text=The%20Short%20Sale%20Proceeds%20Interest,computed%20on%20the%20calculator%20here.

Then IIUC there are additional costs for interest that depend on the cash in your account. Would be nice to model this too but seems harder.

pberto avatar Sep 21 '22 23:09 pberto

The short fee rate can be retrieved via FTP automatically. Link: https://www.interactivebrokers.com/campus/ibkr-api-page/twsapi-doc/#shortable image

Here is its documentation and tutorial link: https://ibkr.info/it/article/2024

cheukhin1024 avatar Sep 27 '24 08:09 cheukhin1024

@cheukhin1024, LEAN has this information: Short Availability > Supported Providers > Interactive Brokers Provider. This issue is open because it has not been modeled yet, meaning that LEAN doesn't use the information of the InteractiveBrokersShortableProvider and apply the cost to the cashbook.

AlexCatarino avatar Sep 27 '24 14:09 AlexCatarino

This could be solved by IMarginInterestRateModel & Security.IShortableProvider.FeeRate

Martin-Molinero avatar Nov 26 '24 17:11 Martin-Molinero