Can shortable share date be shown for index instead of sid?


I'm new to QuantRocket and I'm trying to figure it out by myself. I've been able to get shortable shares data downloaded to "usa_shortable_shares.csv" file. I've used the code shown in the guide:

from quantrocket.fundamental import download_ibkr_shortable_shares
import pandas as pd
download_ibkr_shortable_shares("usa_shortable_shares.csv", universes=["usa-stk"])
shortable_shares = pd.read_csv("usa_shortable_shares.csv", parse_dates=["Date"])

I guess this returns data for items in a universe "usa-stk". I do not quite understand the concept of universes or sids yet and I was wondering if there is a way to return the number of shortable shares for index instead of sid or universe?

Sids are securities and universes are user-defined groups of securities. The moonshot-intro has a Universe Selection notebook which walks through the concepts and how to create universes. You can query shortable shares by universe or sid.

Shortable shares data is not available for indexes as indexes are not tradable instruments, but perhaps you mean ETFs?

1 Like

Thank you for the response!

Sorry, I actually confused "index" with "Symbol". What I actually meant to say is that when I call for shortable shares I get Sid, Date, and Quantity saved in usa_shortable_shares.csv. As I don't know which Sid refers to what Symbol I need to get a column that shows a Symbol for every row.

Would that be possible? If no, then what methods do you use to quickly learn which Sid refers to what Simbol?

Once again sorry for the confusion.

You can append symbols like this:

from quantrocket.master import get_securities

symbols = get_securities(

shortable_shares = shortable_shares.join(symbols, on="Sid")