NEW YORK (Reuters) - Wall Street ended higher on Tuesday boosted by corporate earnings, while the dollar climbed to a more than one-week high on technical buying and political uncertainty in Europe.
Even so, U.S. stocks pared earlier gains as oil dropped, pressured by growing gasoline stockpiles in the United States and evidence of a revival in U.S. shale production.
"U.S. shale is coming back, and it's coming back strong," said Societe Generale oil analyst Michael Wittner.
Brent crude LCOc1 settled down 67 cents, or 1.2 percent, at $55.05 a barrel while U.S. crude CLc1 ended 84 cents, or 1.6 percent, lower at $52.17.
The weakness in oil dragged down U.S. energy shares but this was countered by gains in big tech names that helped lift the Nasdaq to a record closing high. The Dow Jones Industrial Average also hit an intraday all-time high just after the market opened.
"The story is a pretty good one for stocks in terms of it looks like the economy is continuing to grow, I think corporate profits have been pretty good, certainly enough to support higher prices," said Chuck Carlson, chief executive officer at Horizon Investment Services in Hammond, Indiana.
The Dow Jones Industrial Average .DJI rose 37.87 points, or 0.19 percent, to end at 20,090.29, the S&P 500 .SPX gained 0.52 point, or 0.02 percent, to 2,293.08 and the Nasdaq Composite .IXIC added 10.67 points, or 0.19 percent, to 5,674.22.
Fourth-quarter U.S. earnings are estimated to have risen 8.2 percent, the best in nine quarters.
The dollar gained for a fifth straight session, climbing to a more than one-week high in part because of "buying by bargain-hunters looking to pick up the greenback following its worst start to the year in 30 years," said Omer Esiner, chief market analyst at Commonwealth Foreign Exchange in Washington.
The greenback posted its best one-day gain since mid-January, rising at the expense of the euro.
The euro fell 0.8 percent to $1.0665 EUR=, its biggest fall since Dec. 15, before recovering to $1.0696.
The euro zone common currency struggled on renewed concern about Greece's debt problems and signs far-right candidate Marine Le Pen is gaining momentum before France's presidential election.
The political uncertainty weighed on French stocks, which slipped as election jitters dampened the country's sovereign bonds.
Even so, European shares still closed higher overall, with the pan-European STOXX 600 index rising 0.32 percent, helped by corporate results.
Investors also fled French government bonds. Though opinion polls suggested that Le Pen will not win the second round of the presidential election in May, such polls have been wrong before, Rabobank analysts said on Tuesday.
Le Pen has vowed to fight globalization and take France out of the euro zone.
The premium investors demand for buying French 10-year government bonds FR10YT=TWEB over German 10-year bonds DE10YT=TWEB rose to 78 basis points, the highest since November 2012 before easing back a bit. It was 50 basis points only two weeks ago.
U.S. Treasury yields US10YT=RR fell to their lowest in nearly three weeks, drifting past significant technical levels, as fixed-income investors worried that President Donald Trump's pro-growth policies could be hamstrung by his focus on other issues.
The U.S. trade deficit also fell more than expected in December as exports rose to their highest in more than 1-1/2 years, outpacing an increase in imports. The dollar gained 4.4 percent against the currencies of the United States' main trading partners last year.
Additional reporting by Lucia Mutikani in Washington and Dion Rabouin, Jessica Resnick-Ault, Lewis Krauskopf and Gertrude Chavez-Dreyfuss in New York; Editing by Dan Grebler and James Dalgleish