fix 10x performance regression in stockcorr