I currently have trin working with the following code on a few indices. However I
algo.AddEquity('QQQ', Resolution.Minute)
algo.AddEquity('SPY', Resolution.Minute)
algo.AddEquity('IWM', Resolution.Minute)
self.trin = algo.TRIN(['QQQ', 'SPY', 'IWM'], Resolution.Minute)
However I would like to calculate the TRIN for the entire NYSE. When poking around on the website, I was trying to find a list of all the symbols QC supports for the NYSE so I could feed them into the Trin array. However all the links on the site to csv files for the list of symbols appear to be broken or non-functional.
So I have two questions 1) Where can I find a list of all the symbols supported in QC? 2) Would calculating TRIN for the NYSE work by feeding in all the symbols from the NYSE to the Trin array parameter?
Thank you very much!
Varad Kabade
Hi Wesley,
We can use Universe Selection to get those securities.
Refer to the following snippet:
We would need to input the list of all the Symbol objects as the first parameter to get the above.
Best,
Varad Kabade
Wesley Smith
Hi Varad, thank you for your reply.
I understand that I can add that filter to the universe selector, but I'm unclear how I connect that to the trin parameters. Would you mind providing a code example where the symbols are pull out from the universe and plugged into Trin? Thank you very much.
Varad Kabade
Hi Wesley,
After using the fine filter mentioned above, all the valid securities will be available inside the OnSecuritiesChanged:
Refer to the attached backtest.
Best,
Varad Kabade
Vladimir
Varad Kabade
Unable to plot NYS TRIN (arms index) from your code above.
Wesley Smith
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!