@yacc-don I actually have the exact same question as I'm trying out Backtrader. based on @vladisld answer, it doesn't look like something Backtrader supports and it's gonna be a pain to set this up if even feasible. It makes no sense to me to even have to think about runtime optimization. Why should you even grab an extra data feed if the asset is not in your portfolio? If data feed is not something that can be added to Cerebro in a runtime fashion, I believe it's not gonna work. And if my statement is true, other platforms like QuantConnect will serve your need with 0 code, and you just need to focus on the actual logic to select your asset. I like Backtrader, and I hope that I'm wrong on this so please enlighten me here.
Latest posts made by ethan
RE: How to change asset dynamically?
dynamic data feed
is there a way to include/remove data feed dynamically without shutting Cerebro down when my portfolio includes new stocks or removes old stocks? I have a program that will feed in top 10 stocks daily for my portfolio, so the 10 stocks will change and require new data feed coming in. it's the same concept with UniverseSelection in QuantConnect.
I don't want to run different algorithms or different Cerebro for different stocks because I need to rebalance my portfolio and calculate asset allocation so there needs to be some kind of communication. I want them to be in the same runtime environment.