Hi all, attached is the sample of the code to get short interest data for a single stock, how do I get this data point for a list of symbols ['SKT','PLCE','FUBO','IRBT','MNK','MNKKQ','BPYU','CRBP']?
QUANTCONNECT COMMUNITY
Hi all, attached is the sample of the code to get short interest data for a single stock, how do I get this data point for a list of symbols ['SKT','PLCE','FUBO','IRBT','MNK','MNKKQ','BPYU','CRBP']?
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Derek Melchin
Hi Liam,
To accomplish this, we just need to subscribe to more data streams from Quandl.
tickers = ['SKT','PLCE','FUBO','IRBT','MNK','MNKKQ','BPYU','CRBP'] self.symbols = [self.AddData(QuandlFINRAData, f'FINRA/FNSQ_{ticker}', Resolution.Daily).Symbol for ticker in tickers]
See the attached backtest for reference.
Note that there is no Quandl dataset for MNKKQ.
Best,
Derek Melchin
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Liam Op
Dear Derek,
Thank you SO much for directing me and helping me out to understand how to access this data!!!
If I get 500 most tradeable stocks coarse universe, how to get the 20 stocks with the highest Quandl FINRA ShortVolume data.
Appreciate your help!
Derek Melchin
Hi Liam,
See the attached backtest for a example algorithm. Note that the universe size has been reduced for simplicity.
Best,
Derek Melchin
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Player two
Derek I just stumbled upon this post, and you deserve a huge thank you.
THANK YOU!!! That's all!
Liam Op
Derek, thank you so very much!
I could not find a way to do it before you have come up with your solution!
Is there an easy way using your script to add the ability to calculate Short Interest % Ratio as (Short Interest divided into Total Number of Shares) or (Short Interest divided into Float) or (MarketCap/Price)
Do you think FinancialStatements.BalanceSheet.ShareIssued.OneMonth may be used in the calculation?
Â
Gurjeet Matharu
Hi Guys,
I'm trying to get this similar data working in a research notebook. Â I'm not quite sure what I'm doing wrong. Â Can someone please give me a hand? Â
Much appreciated.
Â
class QuandlFINRAData(PythonQuandl): def __init__(self): self.ValueColumnName = 'ShortVolume' qb = QuantBook() qb.AddEquity("AAPL") qb.AddData(QuandlFINRAData, 'FINRA/FNSQ_AAPL', Resolution.Daily).Symbol history = qb.History(qb.Securities.Keys, 200, Resolution.Daily) print(history)
Â
Derek Melchin
Hi Liam,
To accomplish this, we just need to add a fine selection method so we can access fundamental data. In the attached backtest, we divide the short interest by the number of shares outstanding. The number of shares issued would be another option worth experimenting with.
Best,
Derek Melchin
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Derek Melchin
Hi Gurjeet,
To request data from the Quandl feed, provide the Symbol when calling the History method.
class QuandlFINRAData(PythonQuandl): def __init__(self): self.ValueColumnName = 'ShortVolume' qb.AddEquity("AAPL") symbol = qb.AddData(QuandlFINRAData, 'FINRA/FNSQ_AAPL', Resolution.Daily).Symbol qb.History(symbol, 20, Resolution.Daily)
See the attached notebook for reference.
Best,
Derek Melchin
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Ed West
Hi,
This works in backtesting. But I am not able to get any data in the research notebook:
si_syms = [qb.AddData(QuandlFINRAData, f'FINRA/FNSQ_{sym}', Resolution.Daily).Symbol for sym in syms] si_hist = qb.History(si_syms, 200, Resolution.Daily) print(si_hist)
The above just returns an empty DataFrame.
Derek Melchin
Hi Ed,
The returned DataFrame can be empty if Quandl doesn't have data for the symbols we're requesting. To check if Quandl has the data, we can search this data set. If this doesn't resolve the issue, please attach a full notebook so we can further assist with debugging.
Best,
Derek Melchin
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Liam Op
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!