Expected Behavior
Data for accurate fills must be present.
Actual Behavior
Data is missing (please see screenshots), warning message appears. Attached cases are just a small selection of occurrences
Potential Solution
Could be a data issue, so having enough data should work
Reproducing the Problem
Trying to backtest these (or some other) symbols during specific time periods (orders must be placed)
System Information
QuantConnect's Cloud backtest
Mia Alissi
To address the issue of missing data for accurate fills in your backtests, you can take the following steps:
Verify Data Subscription: Ensure that your algorithm is correctly subscribed to the necessary data feeds for the securities you are trading. You can use the
fill_data_forward
method in theSubscriptionDataConfig
class to enable fill forward data, which sends old data when there are time gaps in the data feed.Enable Extended Market Hours: If applicable, enable extended market hours to capture all relevant data points. This can be done by setting the
extended_market_hours
property toTrue
.Check Data Availability: Confirm that the data for the specific symbols and time periods you are testing is available in QuantConnect's data library. QuantConnect provides historical data with varying availability depending on the resolution:
Review Error Messages: Examine any error messages related to missing market data, such as "no market data was found," to identify specific symbols or time frames that may be problematic.
Adjust Data Settings: Consider enabling extended market hours in your data subscriptions if applicable. This can be done by setting the
extended_market_hours
property toTrue
for equities, which will include data from 4 am to 8 am.Test with Different Symbols: Run your backtest with a smaller set of symbols or different symbols to determine if the issue is isolated to specific securities.
Consult Documentation: Refer to QuantConnect's documentation on handling data issues and error messages for additional guidance on resolving missing data problems.
Contact Support: If the issue persists, reach out to QuantConnect support with detailed information about the missing data occurrences for further assistance.
By following these steps, you should be able to address the missing data issue in your backtests. If you need further assistance with specific code implementation, feel free to ask!
Sources: Requesting Data - QuantConnect.com, Key Concepts - QuantConnect.com, Requesting Data - QuantConnect.com, Key Concepts - QuantConnect.com, Forward Data Only Fill Model Algorithm
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.
RealJuney
Have you had any solutions to this problem?
Andrey_tmac
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!