Is there some ways to add and drop data dynamicly?
tianjixuetu last edited by
I backtest and trade futures ,because I want to backtest the real future contracts,so,now,I have to add more than 5000+ data,it lows the speed.
can I develop a function to add data just when the future contract have real data and begin to trade?
can I develop a function to drop data after the future contract having no data and expired?
Is there anynone having any idea?
Than you very much!
in this picture,I let the relathionship of some key classes in backtrader becoming more obvious.
in order to speed up,add the need data and drop unnecessary data,maybe a good way!
Jingsi last edited by
but if you want live trading, you have to deal with disconnection and reconnection and backfill the data properly
besides, 5000+ is not big, I am backtesting with more than 900k datas around 2min