Hi team,
Just want to check if we made some changes to our fundamental data after 28th Oct 2023? My backtests now have different results from the run on 28th Oct.
I tried to debug one data point that was different and reproduced in a simplified algo below. The symbol GPS used to be select as part of sortedByratio on date 2020-11-26 in the run on 28th Oct 2023 but no longer selected now as its ROA value is smaller than the cutoff.
Unfortunately I don't log the data so not sure what has been changed between the runs. Would really appreciate if someone could share some insights.
Thanks,
Quan
Mia Alissi
Based on the provided information, it's not possible to identify any bugs in the code. The code seems to be logically correct and should work as expected. However, the change in backtest results could be due to updates or changes in the fundamental data.
QuantConnect sources its fundamental data from Morningstar, and it's possible that Morningstar updated or corrected their data after your initial backtest. This could result in different ROA values and hence different universe selection results.
Unfortunately, without logging the data or having access to the historical data used in the initial backtest, it's hard to pinpoint the exact cause of the discrepancy.
For future reference, it might be helpful to log the data used in your universe selection to help debug such issues. You can use the
self.Debug()
function to log data in QuantConnect.For example, you could add the following line to your
SelectFine
function to log the ROA values:This will log the symbol and its ROA value for each security in the fine universe.
Please note that logging can slow down your backtest, especially if you're logging a large amount of data. It's generally recommended to only use logging for debugging purposes and to remove or comment out logging statements once you're done debugging.
If you continue to experience issues or discrepancies in your backtest results, I would recommend reaching out to the QuantConnect support team for further assistance.
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.
Jared Broad
Hi Nguyen Huu Quan ,
We verified the data is correct and present. In reviewing your code, it looks like you've got a top 100 filter([:100]), and likely it's not being included in the top 100 anymore as other (now delisted) assets are being included. The number of assets covered in the data doubled from 5K→11K to include many delisted companies.
If you shuffle the filters, you can probably make it appear if that entity is necessary.
Best
Jared
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.
Nguyen Huu Quan
Many thanks for the super helpful insight Jared Broad This makes sense now. So actually so far my algo kind of had a look-ahead bias with the (now) delisted assets being excluded at various points in time of the algo.
Let me try to play around with the filter to see if I can recover some of the old selections.
Best,
Quan
Nguyen Huu Quan
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!