Parallelised getAveragesPerStock() function