NEW YORK (Reuters) - Global equity markets rallied on Tuesday, with the Nasdaq and S&P 500 indexes setting record closing highs on Wall Street, while European energy shares posted their biggest daily gain since January as crude prices surged.

FILE PHOTO: The London Stock Exchange Group offices are seen in the City of London, Britain, December 29, 2017. REUTERS/Toby Melville

U.S. stocks soared on upbeat results from Twitter Inc, Coca-Cola Co, United Technologies Corp and Lockheed Martin Corp, which eased fears of a profit recession in a busy week for corporate earnings.

European shares rebounded from early weakness, pushing the STOXX 600 index to eight-month highs at the close. The energy-heavy FTSE 100 in London led regional gains, up 0.85% at a more than six-month high.

European oil and gas shares jumped 2%, with BP Plc and Royal Dutch Shell Plc leading gains in London, while the FTSEurofirst 300 Index of leading European shares hit eight-month highs.

The S&P and Nasdaq indexes roared to record closing highs, ensuring the bull market that started in March 2009 remains alive.

The benchmark S&P 500 has surged 17.5% this year, helped by a largely upbeat first-quarter earnings season, hopes of a U.S.-China trade resolution and a dovish Federal Reserve. The Nasdaq has gained 22.5% so far this year.

The government shutdown that ended in January weakened the U.S. economy and corporate growth, but companies have done extraordinarily well since March and growth continues strong, said George Boyan, president of Leumi Investment Services in New York.

“We remain overweight (in equities) and any type of pullback we would view as an opportunity to add equity exposure,” Boyan said. “We’ve enjoyed quite a run but there’s nothing to cause me to want to take off exposure at this point.”

Twitter surged 15.6%, its biggest single-day gain since October 2017, after posting better-than-expected quarterly revenue and a surprising rise in monthly active users.

Lockheed Martin posted better-than-expected quarterly profit as U.S. President Donald Trump’s looser policies on foreign arms sales boosted demand for missiles and fighter jets. Shares rose 5.7%. News that the United States told buyers of Iranian oil to stop purchases by May 1 or face sanctions lifted Brent, the global benchmark, and made for a lively return from a four-day Easter break for European markets.

Rising crude prices are a bullish sign of a stable economy and consumer, Boyan said. If prices rise much further it could speed the pace of inflation and cause the Fed to engage in more tightening, “but I don’t think we’re there yet,” he said.

The Dow Jones Industrial Average rose 145.34 points, or 0.55%, to 26,656.39. The S&P 500 gained 25.71 points, or 0.88%, to 2,933.68 and the Nasdaq Composite added 105.56 points, or 1.32%, to 8,120.82.

MSCI’s gauge of stocks across the globe gained 0.56%.

The dollar climbed across the board as traders favored the greenback ahead of Friday’s release of U.S. gross domestic product for the first quarter of 2019.

The dollar was supported by data that showed sales of new U.S. single-family homes jumped to a near 1-1/2-year high in March.

The data followed recent upbeat news on retail sales and exports, which have eased concerns of a sharply slowing U.S. economy, analysts said.

The dollar index, which measures the greenback against six currencies, rose 0.31% after hitting its highest since June 2017. The euro fell 0.28% against the dollar, slipping below $1.12 for the first time in nearly three weeks.

The Japanese yen fell 0.08% versus the greenback at 111.84 per dollar.

Oil prices hit their highest since November.

Brent crude futures rose as high as $74.73, a level not seen since Nov. 1, before paring gains. Brent futures settled up 47 cents to $74.51 a barrel. U.S. West Texas Intermediate crude futures rose 75 cents to settle at $66.30 a barrel.

Treasury yields fell, a counter-trend in the broader rise in yields over the past month. As the economic outlook has improved, yields have risen back from late-March lows.

Benchmark 10-year notes rose 6/32 in price to push its yield down to 2.5668%.

The Swiss franc burrowed to a new 16-month low on talk of even more negative rates. Two usual beneficiaries of higher oil prices, the Canadian dollar and Norwegian crown, both struggled despite the crude rally.

In China, major benchmarks had dipped in and out of negative territory on concern that Beijing will slow the pace of policy easing after unexpectedly strong first-quarter economic data last week.

China’s blue-chip stocks have surged over 30% so far this year on expectations of more stimulus and hopes Beijing and Washington will reach an agreement to end their nine-month trade dispute.

U.S. gold futures settled 0.3% lower at $1,273.20 an ounce.

(GRAPHIC-Oil on the boil link: tmsnrt.rs/2IyOpH7).