NEW YORK (Reuters) - U.S. stocks found their footing on Tuesday, helped by gains in the energy, technology and consumer discretionary sectors after a sharp sell-off a day earlier on spiraling global trade tensions.

Energy stocks .SPNY added the most gains among the S&P 500's 11 major sectors, climbing 1.4 percent as Washington pushed allies to halt imports of Iranian crude, which lifted oil prices more than 2 percent. [O/R]

Technology stocks .SPLRCT advanced after having slid on Monday upon conflicting statements from Trump administration officials on restrictions on foreign investment in U.S. technology firms. Apple Inc AAPL.O, which rose 1.2 percent, snapped a three-day losing streak.

Three of the four FANG stocks, momentum leaders in the S&P 500, also reversed course from Monday. Facebook Inc FB.O shares gained 1.4 percent, Amazon.com Inc AMZN.O shares added 1.7 percent, and Netflix Inc NFLX.O shares rose 3.9 percent. Only shares of Google parent Alphabet GOOGL.O ended the session lower, down 0.6 percent.

Shares of U.S. homebuilder Lennar Corp LEN.N jumped 4.9 percent as strong housing demand helped the company report better-than-expected quarterly results.

The strength in consumer discretionary shares, including Amazon, Netflix and Lennar, and the energy sector points to solid fundamentals, which have helped to ease investor worries on trade, said J.J. Kinahan, chief market strategist at TD Ameritrade in Chicago.

“They sort of take tariffs off the front page,” he said.

A Bloomberg report that Canada is preparing steel quotas and tariffs on China also may have eased investor worries by lending support to U.S. President Donald Trump’s negotiating tactics, Kinahan said.

The Dow Jones Industrial Average .DJI rose 30.31 points, or 0.12 percent, to 24,283.11, the S&P 500 .SPX gained 5.99 points, or 0.22 percent, to 2,723.06 and the Nasdaq Composite .IXIC added 29.62 points, or 0.39 percent, to 7,561.63.

In their first day of trading after having been removed from the Dow Industrials, General Electric Co GE.N shares rose 7.8 percent, the greatest percentage gain on the S&P 500 and the stock's biggest one-day gain in more than three years. The company said it would spin off its healthcare business and divest its stake in oil-services company Baker Hughes BHGE.N.

S&P 500 financial stocks .SPSY registered their twelfth consecutive session of declines, the sector's longest-ever losing streak.

Harley-Davidson Inc HOG.N shares dropped 0.6 percent after President Donald Trump threatened the company with higher taxes. Trump's threat came in response to the company's announcement on Monday that it would move production from the United States to its international facilities for some of its motorcycles shipped to the European Union.

Advancing issues outnumbered declining ones on the NYSE by a 1.52-to-1 ratio; on Nasdaq, a 1.43-to-1 ratio favored advancers.

The S&P 500 posted five new 52-week highs and nine new lows; the Nasdaq Composite recorded 72 new highs and 49 new lows.

Volume on U.S. exchanges was 6.77 billion shares, compared to the 7.28 billion average for the full session over the last 20 trading days.