US stocks end week higher on strong earnings from Apple