US stocks close higher with new records, 2 indexes post weekly gains