SLURM Parameter Sweeps for Sector Momentum Backtests
Summary
The article explains how to distribute a US sector ETF momentum strategy’s parameter sweep across a Raspberry Pi cluster managed with SLURM. It varies momentum lookback windows from 21 to 252 business days and the number of holdings from one to eight, producing 96 backtests. Each SLURM array task receives an index, selects its parameter pair, runs QSTrader, and writes statistics to a separate JSON file.
The workflow then reads those files and creates heatmaps of CAGR, Sharpe ratio, and maximum drawdown to compare the parameter combinations. The article identifies the required sector ETF and benchmark histories and notes that the CSV data must be complete and correctly formatted. It describes an implementation and visualization process, but supplies no numerical performance findings or evidence that a particular parameter set is robust; conclusions depend on the chosen assets, historical data, and backtest setup.
Key ideas
- A SLURM job array can assign a distinct momentum lookback and portfolio size to each QSTrader backtest.
- The example tests 12 lookbacks and eight portfolio sizes, for 96 parameter combinations.
- Each run exports JSON statistics so results can be aggregated after parallel execution.
- Heatmaps of CAGR, Sharpe ratio, and maximum drawdown visualize sensitivity across settings.
- The analysis depends on complete, correctly formatted historical ETF data and does not establish out-of-sample robustness.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.