Markets End Worst Week in Four Months With Mixed Day