(Reuters) - The S&P 500 fell on Tuesday after edging up to an intra-day record high for the second straight session, while Apple became the first U.S. company to close with a market capitalization above $800 billion.

Better-than-expected quarterly earnings from U.S. companies and Emmanuel Macron’s victory in the French presidential election on Sunday have given investors confidence, but valuations for U.s. stocks are already higher than average.

The hope that U.S. President Donald Trump will cut corporate and personal taxes remained in focus for investors.

“Earnings are improving and the potential for tax reform plays a big role. Why would you want to sell stocks here when you might get a tax break later on?” said Bruce Bittles, chief investment strategist for Robert W. Baird & Co.

Apple rose 0.64 percent to end at $153.99, giving it a market valuation of $802.9 billion, a first for a U.S. company. Investors are optimistic the Cupertino, California company will mark the 10th anniversary of the iPhone by launching a model with suped-up features.

“It’s a real testament to what they’ve accomplished,” said Rick Meckler, president of investment firm LibertyView Capital Management in Jersey City, New Jersey. However, he said Apple’s massive size could hamper it’s ability to keep growing.

The Dow Jones Industrial Average .DJI declined 0.17 percent to end at 20,975.78 points and the S&P 500 .SPX lost 0.10 percent to 2,396.92 points.

FILE PHOTO: Traders work on the floor of the New York Stock Exchange in the Manhattan borough of New York, U.S. May 4, 2017. REUTERS/Brendan McDermid

The Nasdaq Composite .IXIC added 0.29 percent to close at a record high of 6,120.59, helped by Apple.

After the bell, videogame maker Electronic Arts jumped 3.9 percent following its fiscal fourth-quarter report.

Four of the 11 major S&P sectors rose during Tuesday's session, led by consumer discretionary .SPLRCD, while the typically defensive plays such as utilities .SPLRCU and telecom services .SPLRCL fell.

Energy .SPNY dropped 0.86 percent on the back of falling oil prices.

Shares of Valeant Pharmaceuticals VRX.N jumped 24 percent after the company posted its first profit in six quarters.

Sturm Ruger & Company RGR.N jumped 9.85 percent, leading other gun makers higher after its quarterly report suggested a drop in demand after Trump's election may be bottoming out.

Endo International ENDP.O, Office Depot ODP.O and Marriott MAR.O also rose after reporting better-than-expected quarterly earnings.

Wayfair W.N surged 20.73 percent to an all-time high after the online furniture retailer revenue beat analysts' expectations.

Declining issues outnumbered advancing ones on the NYSE by a 1.31-to-1 ratio; on Nasdaq, a 1.02-to-1 ratio favored advancers.

The S&P 500 posted 42 new 52-week highs and 3 new lows; the Nasdaq Composite recorded 120 new highs and 59 new lows.

About 6.7 billion shares changed hands on U.S. exchanges, in line with the daily average over the last 20 sessions.