I've set the start date to the year 2000 but the algo won't start trading until 2007, why is that the case?
Both datasets i'm using should go back to 1998 (US Equity Security Master and Morningstar)
Can anyone help me understand why the algo won't start before 2007-ish? Thanks a lot in advance!
Mia Alissi
Based on the provided code, there doesn't seem to be any obvious issues that would prevent the algorithm from starting before 2007. However, there are a few potential reasons that could explain this behavior:
Data Availability: Even though the datasets you're using should go back to 1998, there might be some specific symbols that don't have data available until 2007. This could be due to various reasons such as the company not being public until that year, or data quality issues that prevent earlier data from being used.
Warm-Up Period: Your algorithm has a warm-up period of 356 days. This means that the algorithm won't start trading until it has at least 356 days of data to use for its calculations. If the first available data is from 2000, the algorithm won't start trading until late 2001 at the earliest.
Universe Selection: Your algorithm uses a custom universe selection model (
ScoredUniverseSelectionModel
). If this model doesn't select any symbols for trading until 2007, the algorithm won't start trading until then. The universe selection model only selects new symbols in January and July of each year, which could potentially delay the start of trading.Excluded Symbols: Your universe selection model excludes the symbols "DBB" and "UUP". If these are the only symbols that have data available before 2007, this would prevent the algorithm from starting to trade until 2007.
Without more information, it's hard to say for certain what's causing this issue. I would recommend checking the data availability for your symbols and reviewing your universe selection model to ensure it's working as expected.
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.
Enrico Quinzani
The algorithm won't start for 7 years, so the warm-up period and the rebalancing frequency should not be the causes. The symbols i'm excluding are both unavailable prior to 2007, so this shoud not be causing any problems. Since my algorithm does not rely on any specific security and selects the portfolio based on securities' relative position in a rank (not above a certain value for any criteria), i don't think that there should be a problem with data availability as well
Mia Alissi
Based on the additional information provided, it seems like the issue might be related to the data itself or the universe selection model. However, without more specific information or error messages, it's hard to pinpoint the exact cause.
One thing to note is that the algorithm's universe selection model only selects new symbols in January and July of each year. If the algorithm starts in 2000 and the first selection happens in July, then the algorithm won't start trading until July 2000 at the earliest. If there are no suitable symbols selected at that time, the algorithm might not start trading until the next selection period in January 2001, and so on. This could potentially delay the start of trading.
Another potential issue could be related to the
ScoredUniverseSelectionModel
. If this model somehow doesn't select any symbols for trading until 2007, the algorithm won't start trading until then. It might be worth reviewing the implementation of this model to ensure it's working as expected.Lastly, it's also possible that there's an issue with the data itself. Even though the datasets should go back to 1998, there might be some specific issues that prevent the data from being used until 2007. This could be due to various reasons such as data quality issues, missing data, or other factors.
Without more information, it's hard to provide a more specific answer. I would recommend checking the data availability for your symbols, reviewing your universe selection model, and looking for any error messages or warnings that might indicate what's causing the issue.
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.
Enrico Quinzani
can i request data from another free provider to sort that issue out?
Mia Alissi
Yes, QuantConnect allows you to use custom data sources in your algorithms. You can import data from other providers as long as it's in a format that QuantConnect supports. However, it's important to note that using custom data might require some additional setup and coding to ensure the data is correctly formatted and integrated into your algorithm.
Here's an example of how to use custom data in Python:
In this example,
MyCustomData
is a custom class that inherits fromPythonData
. TheGetSource
method specifies where to get the data from, and theReader
method parses each line of the data.Please note that using custom data might not solve the issue if the problem is related to the universe selection model or other parts of the algorithm. It's also important to ensure that the data you're using is reliable and suitable for your algorithm's needs.
For more information on using custom data, 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.
Enrico Quinzani
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!