Is below correct way to get NYSE, NAsdaq Adcance and NewHigh
ad_nyse_symbol = Symbol.Create("$ADD.NY", SecurityType.Index, Market.USA)
nyse_history = self.algorithm.History(ad_nyse_symbol, 1, Resolution.Daily)
ad_nasdaq_symbol = Symbol.Create("$ADD.NQ", SecurityType.Index, Market.USA)
nq_history = self.algorithm.History(ad_nasdaq_symbol, 1, Resolution.Daily)
nhnl_symbol = Symbol.Create("$NHNL", SecurityType.Index, Market.USA)
nhnl_history = self.algorithm.History(nhnl_symbol, 1, Resolution.Daily)
Mia Alissi
Here's how to help Dharmesh:
Is it correct to use:
Direct Answer
No, this is not the correct way on QuantConnect.
$ADD.NY
,$ADD.NQ
, and$NHNL
are NOT official index tickers in QuantConnect's data sets as of now.What Does Work?
For Advance-Decline:
adr()
(Advance/Decline Ratio) method, which is designed for this purpose.You provide a list of actual equity symbols (for example, the full NYSE or Nasdaq universe or a sample of them), not a single index symbol.
Example:
You'd have to create a
nyse_tickers_list
(possibly ~3000 tickers for full breadth; often a subset is used for speed). For Nasdaq: repeat for that universe.For New Highs/New Lows:
$NHNL
.Summary
adr()
with a list of tickers for advance/decline.If Dharmesh needs code to show how to do this using QuantConnect’s actual features (not unsupported index symbols), just ask!
Sources: US Equities - QuantConnect.com, Index - QuantConnect.com, Cash Indices - QuantConnect.com, Custom Data Universe Algorithm, US Equity - QuantConnect.com
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.
Dharmesh Khalasi
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!