I'm adding a filler to the broker with
in order to only partially fill orders when the order size exceeds the traded volume.
However, I experience that the performance of backtesting drops almost to a crawl, compared to running without the filler.
I'm backtesting a strategy on tick data (approx. 150k ticks over ~2 years) and the strategy is, at most, entering and closing a position once a week. I would have assumed that the filler overhead would only kick in, when the strategy enters or exits positions, but that does not seem to be the case. Instead I experience backtesting takes at least 10x longer, if not more, than without the filler.
I'm running backtrader with regular Python (3.7.4), not PyPy, on Windows.
Has anyone else experienced this, are there any known fixes, or does anyone know the cause of the drop in performance?
If I'm pointed in the right direction in the backtrader source, I'm happy to help out making a fix, if that's in any way possible.