Quote:Hey guys, did someone figure out and solution to improve the backtest speed (bottle neck is batch size 1)?
Many thanks.
The current Gekko implementation is affected by a problem called "stream backpressure" - due to the way streams are implemented in Gekko. It is a timing/race problem and occurs depending on (heavy) indicator usage and system speed. When the prob occurs, Gekko is eating up your memory and backtests results become random and faulty.
Currently a workaround is implemented in Green Gekko to avoid memory leak and faulty backtests, in file: /core/markets/backtest.js
if(!this.closed) {
setTimeout(() => {
this.get();
}, 5);
}
You may vary the setTimeout value from 1 to 10 depending on your system speed and strategy complexity. Lowering the value increases the backtest speed - but keep in mind to check the memory consumption of your gekko process to avoid false results.
Best way will be to fix the Gekko stream implementation by following the node.js best practices and kick any artificial delay: https://nodejs.org/es/docs/guides/backpr...n-streams/