My live trade of CURE returns an error for a couple latest sessions:
CURE: The security does not have an accurate price as it has not yet received a bar of data. Before placing a trade (or using SetHoldings) warm up your algorithm with SetWarmup, or use slice.Contains(symbol) to confirm the Slice object has price before using the data. Data does not necessarily all arrive at the same time so your algorithm should confirm the data is ready before using it. In live trading this can mean you do not have an active subscription to the asset class you're trying to trade. If using custom data make sure you've set the 'Value' property.
I don't have any code change, and this has been successful for a while. Can you check why we suddenly missing price data for this ETF? Thanks
Mia Alissi
To address the issue of missing price data for the ETF "CURE" in live trading, here are some steps and considerations based on the error message and relevant documentation:
Verify Data Subscription: Ensure that you have an active data subscription for the ETF "CURE". Sometimes, data subscriptions might lapse or change, affecting data availability.
Implement Warm-Up: Use the
SetWarmup
method in your algorithm'sinitialize
method to warm up the algorithm with historical data before live trading begins. This ensures that your algorithm has sufficient data to make decisions as soon as it starts.Check Data Availability: In the
on_data
method, useslice.contains_key(symbol)
to confirm that the data for "CURE" is available before executing any trades. This prevents the algorithm from making decisions based on incomplete data.Review Custom Data: If you are using custom data, ensure that the 'Value' property is correctly set to provide accurate price data. This is crucial for the algorithm to interpret the data correctly.
Monitor Data Feed: Check for any interruptions or issues in the data feed from your brokerage or data provider that might affect the availability of price data. This might involve checking logs or contacting your data provider.
Log Data Events: Implement logging to capture data events and any errors related to data availability, which can help diagnose the issue.
By following these steps, you should be able to address the issue of missing price data for "CURE" in your live trading algorithm. If the problem persists, consider reaching out to QuantConnect support for further assistance.
Sources: Requesting Data - QuantConnect.com, Requesting Data - QuantConnect.com, Requesting Data - QuantConnect.com, Crypto - QuantConnect.com, Requesting Data - 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.
Chuanjiang Luo
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!