Hello everyone,
I'm pretty new to Quantconnect even though I have had an account for ages.
Right now, I would like to build an algo for some ETFs that are not included in Quantconnect's database. I first thought about downloading the data from the ETF's provider (iShares, Amundi, etc.), prepare it on my computer, upload it somewhere and finally implement something like in this example:
https://github.com/QuantConnect/Lean/blob/master/Algorithm.Python/CustomDataNIFTYAlgorithm.pyHowever, I came across this Python package called investpy, that allows to get data from the investing.com site. Has someone already used it and can provide some examples? Can you give some links to documentation/ideas for me to implement it?
Thank you very much.
Rahul Chowdhury
Hey Gabriel,
Welcome to QuantConnect!
Unfortunately, due to security reasons it's not possible to use data directly from 3rd party libraries. Instead what you can do is import that data as custom data. Custom data allows you to use a data from an external source by converting that data into a format compatible with Lean. That data is then made available in as a part of the Slice data in OnData.
Gabriel Fenger
Hello Rahul,
thank you for your answer. I have looked the examples you sent me and tried to implement what I need based on them. Nevertheless, I haven't been able to "trade" the instruments that I imported in backtesting. Do you know, why this is? Thank you very much in advance.
Rahul Chowdhury
Hi Gabriel,
The issue stems from the fact that when we add a ticker/symbol by custom data, its value is capitalized.
"iShares_Core_MSCI_World_UCITS" -> "ISHARES_CORE_MSCI_WORLD_UCITS"
This means we cannot properly access the dictionary of URLs if we do not account for this.
If we adjust our universesum dictionary accordingly, we can now see our assets
Â
Gabriel Fenger
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!