I'm using an API for mutual fund data and right now in my url for the custom data I'm calling data from 2000-1-1 to today. Does anyone know if it downloads from that link one time at the start, or would it make more sense for me to set the date call in the url to only call the day that the backtest is on? Sorry about the confusing wording I was just thinking downloading the full file of 18 years of data each day would be a lot more cumbersome than if it was just downloading one day at a time?
Gurumeher Sawhney
GetSource instructs LEAN where to find your data and it returns an object containing the string Url to find your data, and the format of the data. When the URL changes the data is downloaded again. This allows LEAN to cache large files and only download new data when requested. The Reader will then take each line and create the custom object. So it would make sense to download all the data at once and read it than calling the API everyday.
SLPAdvisory
Perfect, thank you!
SLPAdvisory
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!