NEW YORK (Reuters) - The S&P 500 and Dow Industrials rose on Friday after President Donald Trump said the United States may not have to impose further tariffs on Chinese goods, but falling shares of Nvidia Corp NVDA.O dragged down the Nasdaq.

All three indexes had been lower in early trade as an underwhelming outlook from Nvidia weighed on the tech sector.

U.S. stocks moved higher after Trump said China seemed willing to make a deal on trade.

“The market is paying attention very closely to anything surrounding trade,” said Veronica Willis, investment strategy analyst at Wells Fargo Investment Institute in St. Louis. “(A trade deal) would boost expectations for global growth, which would ultimately be good for stocks.”

But lagging Nvidia shares kept the Nasdaq in negative territory.

Nvidia's shares tumbled 18.8 percent after the chipmaker pointed to the decline in cryptocurrency mining as the cause of its declining sales. The chipmaker's shares also weighed on the Philadelphia SE Semiconductor index .SOX, which declined 1.2 percent.

Facebook shares also dropped 3.0 percent upon renewed concerns that the company could face regulatory scrutiny following a New York Times report on Wednesday about the company’s attempts to deflect criticism of its handling of Russian propaganda.

The Dow Jones Industrial Average .DJI rose 123.95 points, or 0.49 percent, to 25,413.22, the S&P 500 .SPX gained 6.07 points, or 0.22 percent, to 2,736.27 and the Nasdaq Composite .IXIC dropped 11.16 points, or 0.15 percent, to 7,247.87.

Comments from Richard Clarida, newly appointed Federal Reserve vice chair, that U.S. interest rates were nearing the central bank’s estimates of a neutral rate also lent support to stocks, investors said.

For the week, however, all three indexes posted losses. The S&P 500 fell 1.61 percent, the Dow lost 2.22 percent, and the Nasdaq shed 2.15 percent.

S&P 500 energy .SPNY stocks rose 1.1 percent as oil prices recovered from sharp losses this week on expectations that OPEC and its allies would agree to cut output next month.

S&P 500 utility stocks also jumped, advancing 1.3 percent, as PG&E Corp PCG.N shares surged 37.5 percent. Statements from the California Public Utilities Commission raised hopes that the embattled company could be spared from bankruptcy if it were found liable for the state's deadliest-ever wildfire.

Consumer discretionary stocks fell 0.5 percent. Continuing a gloomy week for retailers, shares of department store operator Nordstrom Inc JWN.N tumbled 13.7 percent after quarterly same-store sales missed estimates and the company reported charges from a credit card problem.

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

The S&P 500 posted 27 new 52-week highs and 10 new lows; the Nasdaq Composite recorded 26 new highs and 109 new lows.

Volume on U.S. exchanges was 8.18 billion shares, compared to the 8.61 billion average over the last 20 trading days.