The S&P 500's top percentage gainer was Zoetis, which jumped 8.9 percent to $43.72. Activist hedge fund manager William Ackman's Pershing Square Capital Holdings has taken a new position in the animal health company, two sources familiar with the matter said on Tuesday.
In the consumer discretionary space, shares of homebuilders rose after D.R. Horton reported better-than-expected quarterly revenue and said orders jumped 38 percent, suggesting an uptick in housing demand. D.R. Horton shares rose 2.2 percent to $23.95.
The S&P 500 has rallied more than 9 percent from a six-month low in October, buoyed by supportive economic data and solid corporate earnings reports. For the year so far, the index is up 10.4 percent.
"The market's had a huge run, and right now it's earned the right to sit and consolidate that move," said Adam Sarhan, chief executive of Sarhan Capital in New York.
But sideways action "is another healthy sign" at this stage, as well as aggressive "buying at the dips," he said.
The Dow Jones industrial average rose 1.16 points, or 0.01 percent, to 17,614.9, a record high close. The S&P 500 gained 1.42 points, or 0.07 percent, to 2,039.68, also a new record. The Nasdaq Composite added 8.94 points, or 0.19 percent, to 4,660.56.
Volume was light due to the U.S. Veterans Day holiday. About 5.5 billion shares traded on U.S. exchanges, below the 6.8 billion average this month, according to BATS Global Markets.
The S&P 500 set its 40th closing high of the year, versus 45 such highs in 2013. The last time the index closed at a record for five consecutive days was in May 2013.
The S&P 500's biggest percentage decliner was Juniper Networks, down 5.7 percent to $20.28, a day after the company's chief executive resigned following a board review of his conduct in a negotiation with a customer.
Cable providers mostly remained under pressure for a second straight session after U.S. President Barack Obama said on Monday that Internet service providers should be regulated more like public utilities. Time Warner Cable was down 1.3 percent at $134.78.
NYSE advancing issues outnumbered decliners by 1,566 to 1,481, for a 1.06-to-1 ratio on the upside; on the Nasdaq, 1,407 issues fell and 1,239 advanced for a 1.14-to-1 ratio favoring decliners.- Reuters
Did you find this article insightful?