Hi there! I'm performing experiments with LEAN backtesting and high-performance computing.
Master software is starting hundreds of LEAN launcher instances in my setup on hi-end HPC configurations. Algorithm result json storing and file logging are turned off to evade unnecessary load and file write conflicts.


The problem is all about very poor backtesting performance. Typical algorithm configuration with dozen of rolling windows and indicators on minute resolution and 15-minute consolidation (where all the windows are updated) on 10-years duration takes up to 1 minute to backtest.
Is it possible to dramatically increase backtesting performance?

Algorithm is all about this:

var consolidator = new QuoteBarConsolidator(TimeSpan.FromMinutes(15)); consolidator.DataConsolidated += ConsolidatorOnDataConsolidated; _rsi = new RelativeStrengthIndex(14); _cci = new CommodityChannelIndex(30); _adx = new AverageDirectionalIndex("ADX", 14); _stoch = new Stochastic(14, 14, 3); _williamsPercentR = new WilliamsPercentR(14); _trix = new Trix(15); _aroon = new AroonOscillator(14, 14); _adxr = new AverageDirectionalMovementIndexRating(14); _ultimateOscillator = new UltimateOscillator(7, 14, 28); RegisterIndicator(_symbol, _rsi, consolidator); RegisterIndicator(_symbol, _cci, consolidator); RegisterIndicator(_symbol, _adx, consolidator); RegisterIndicator(_symbol, _stoch, consolidator); RegisterIndicator(_symbol, _williamsPercentR, consolidator); RegisterIndicator(_symbol, _trix, consolidator); RegisterIndicator(_symbol, _aroon, consolidator); RegisterIndicator(_symbol, _adxr, consolidator); RegisterIndicator(_symbol, _ultimateOscillator, consolidator);

And custom windows populating in consolidator callback.

Hardware: Amazon EC2 c5d.18xlarge instance:

72 3.0 GHz vCPUs

144 Gib RAM

2 x 900 GB NVMe SSD

Thank you for any suggestions in advance!There are some release run profiling results: