Hi
I get in the charts the messages ‘No data available’ and ‘Out of sample’. If I change the period from February 2024 to November 2023 it works fine. I do not yet understand how the data is provided. How do I get the data for 2024?
This is the beginning of the code:
self.SetStartDate(2024, 2, 1) # Set Start Date
self.SetEndDate(2024, 2, 29) # Set End Date
self.SetCash(10000)
# Binance accepts both Cash and Margin account types.
self.SetBrokerageModel(BrokerageName.Binance, AccountType.Margin)
self.btcusd = self.AddCrypto("CTXCUSDT", Resolution.Minute, Market.Binance).Symbol
Mia Alissi
The issue you're experiencing might be due to the fact that the data for the year 2024 is not yet available. QuantConnect provides historical data for backtesting your algorithms, but this data only goes up to the current date. Therefore, if you're trying to backtest for a future date (like 2024), you'll encounter the 'No data available' message because that data does not exist yet.
Here's an example of how you can set the start and end dates for backtesting:
In this example, the backtest starts on June 1, 2020, and ends on June 1, 2021. You should adjust these dates to fit within the range of available data.
For more information on how to set up your algorithm, you can refer to the QuantConnect documentation.
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.
Vnls123
Hi Pablo. I solved it by changing the ‘Backtesting out of sample period’ in the organisation settings. Hope that helps too.
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.
Bailey Nevener
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!