The three major averages ended the week with losses.