Energy and health-care stocks dominated this week’s best performers