The major averages roared back from their three-day losing streak on Tuesday.