Putting .SetFilter() on a futures contract makes zero difference compared to just commenting the line. I've noticed this behavior with quantconnect jupyter notebook, during backtesting, and during futures course.
What I also found very interesting was that quantconnect didn't let me pass first and second task on futures course, where the problem was contract filtering, even after applying hints and even copying their solution. I've got this error: Looks like you didn't set the expiry filter for contracts expiring within 90 days...
It looks like the SetFilter method stopped working for quantconnect at some point in the past. Putting there numbers self.future.SetFilter(0, 10) , or timedelta self.future.SetFilter(timedelta(0), timedelta(10)) or lambda functions also does not work.
Am I misunderstanding something or is it a bug?
I'm attaching screenshot from my jupyter notebook showing that filtering didn't work (I get contracts outside my filter)
Louis Szeto
Hi Fischer
We cannot reproduce this problem. This might be due to previous unsolved data issue. It is normally working now.
Best
Louis
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.
Emi Gal
Hi Louis Szeto - I think there's a problem in the Futures bootcamp, task 1.
I've set the filter to 90 days:
However, when I submit the code, I get Boot Camp: Looks like you didn't set the expiry filter for contracts expiring within 90 days...
Alexandre Catarino
Hi Emi Gal ,
Thank you for the report.
I have fixed this Bootcamp Lesson last week. Please retry when you can.
I apologize for not notifying the community/you sooner.
Best regards,
Alex
Fischer
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!