Your script uses too much memory for a single process, so split the backtest into several parts or test not all the assets at the same time. This has nothing to do with how much RAM you have in your PC.

If you think that your script should not have such a big memory footprint, send it to us and we'll look into it. But the error message is rather clear.