I’m researching ways to use QuantConnect/LEAN with data from B3 (Brazil) for backtesting and research. If you’ve done this, I’d love to learn from your experience.
QUANTCONNECT COMMUNITY
I’m researching ways to use QuantConnect/LEAN with data from B3 (Brazil) for backtesting and research. If you’ve done this, I’d love to learn from your experience.
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.
Mia Alissi
Here’s a template to help you (Ari) get started using QuantConnect/LEAN with B3 (Brazil) custom data for research/backtesting. This solution assumes you have access to historical B3 data files (like CSVs) because B3 assets are not natively supported in QuantConnect. The code shows how to import, parse, and analyze custom equity data—just adapt the file paths and column structure to your needs!
How to use:
./data/b3/VALE3.csv(or your preferred ticker).on_data()as needed!If you have other B3 asset types (futures, etc.), you would just adapt the custom data class accordingly. Let me know if you need help parsing a specific data layout!
Sources: CSV Format Example - QuantConnect.com, CSV Format Example - QuantConnect.com, docs writing algorithms importing data streaming data key concepts, docs writing algorithms securities requesting data, Custom Data - QuantConnect.com
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.
Ari Branco
In the custom data template there’s this snippet:
If I route my real-time B3 (Brazil) data through that SubscriptionDataSource in live mode, can I run my algorithm/strategy and see charts updating in Live (not backtest)? Is my understanding correct?
Ari Branco
Opa Eduardo Angelim. Que bom que tem pelo menos mais um brazuka na área. Estou fazendo outros testes usando a versão online e carregando csv para backtest. Assim que concluir vou dar uma conferida nesta sugestão da Mia Alissi.
Ari Branco
Mia Alissi Thanks for the suggestion. I'll try it out as soon as I have time and will post the results here.
Mia Alissi
Here’s a friendly, step-by-step demo for you, Ari, showing exactly how to load your B3 CSV into the QuantConnect Object Store (online IDE) and run research/backtests over it as custom data. This uses the PETR4.csv example, but you can change the symbol/file as needed.
Resumo dos passos:
get_sourcese precisar.Assim, você pode explorar qualquer ativo da B3 em poucos minutos na plataforma QuantConnect! Qualquer dúvida, só chamar.
Sources: Object Store - QuantConnect.com, CSV Format Example - QuantConnect.com, Key Concepts - QuantConnect.com, docs writing algorithms securities requesting data
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.
Ari Branco
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!