Hello Quants,

It is possible an algo reaches a point it starts to sell a stock you don't have quantity enough in your portfolio (or even have 0 quantity).

The UI will show this in the "Exposure> Equity Long/Short Ratio" chart. The blue +Y is long, the black -Y is short.
I believe what happens in this case is that the stock is borrowed and sold short.

I would like to know if the fee model (lets say the interactive brokers one) actually takes into account the costs of borrowing the stock (which should be a small annual interest fee – which should be 0.25% annualized paid per day, so in this example of 100 AAPL @ 150 USD, would be a cost of 37.5 USD / 365 days = ~0.1 USD per day: 


If this is not taken into account in the fee stricture – as I believe – could it then be supported?

Is this part of the code open source?

Finally, if an algo like this would go live would it actually work and execute the short selling through the IBKR api?