US stocks edge higher and notch 3rd consecutive week of gains