Whist using brute force to calculate portfolios based on correlation, I noticed that the strategies pairs that have already failed the max setting are being included over and over again in the selection.
See attached screenshot.
Clearly, if simple strategy A and B exceed the correlation threshold, then there is no point including that pair together in any other portfolio calculation.
A list in memory of pairs that fail can be stored and when creating the next candidate list to calculate, this pair can always be excluded.
This should cut down the number of portfolios to test dramatically, leading to must faster bruteforce processing.