* Trump tweets trade talks with China going 'very well'
* Boeing boosts Dow after record 2018 deliveries
* PG&E shares slump after S&P cuts rating to junk
* Dow up 0.35 pct, S&P up 0.09 pct, Nasdaq down 0.03 pct (Changes comment, adds details, updates)
By Sruthi Shankar
Jan 8 (Reuters) - U.S. stocks struggled to hold on to gains on Tuesday as chip stocks took a beating from Samsung's profit warning and financials fell, denting optimism over U.S.-China trade talks.
The South Korean smartphone giant surprised the market with an estimated 29 percent drop in quarterly profit, blaming weak chip demand, less than a week after Apple Inc made a rare sales warning.
The Philadelphia Semiconductor index fell 1.69 percent, weighed down by losses in Nvidia Corp, Applied Materials Inc and Lam Research Corp.
"Samsung is sort of a confirmation that Apple is not a standalone situation and that we could probably end up seeing some more disappointments from the technology sector," said Sam Stovall, chief investment strategist at CFRA.
Analysts now expect earnings at S&P 500 technology companies to grow 8.5 percent in the fourth quarter, down from the estimated 13.7 percent in October, according to Refinitiv IBES data. Earnings for S&P 500 companies overall are expected to grow 14.8 percent.
Wall Street's main indexes rose earlier on hopes of progress in U.S.-China trade talks and after the countries extended the discussions to an unscheduled third day.
"China news is helping," said Stovall. "We had a successful retest of the Christmas Eve low last Thursday and investors are piling back in because they think the worst is behind us."
Wall Street rallied in the past two sessions on the back of a strong jobs data and after the Federal Reserve chief calmed worries about interest rate hikes hurting economic growth.
Trade and concerns over slowing economic growth triggered a selloff at the end of 2018, with Wall Street posting its worst monthly performance in about a decade in December, driving down earnings estimate and stock valuations.
Since then, the S&P 500 has climbed more than 9 percent, with investors looking to the upcoming fourth-quarter earnings season for a clearer picture.
Adding to the woes for chip stocks, Goldman Sachs said it expects semiconductor companies to face a challenging year, particularly in the first half.
Amazon.com Inc rose 0.7 percent, adding to Monday's gains that helped the market power higher and the online retailer overtake Microsoft Corp to become Wall Street's most valuable company.
Shares of trade-sensitive Boeing Co rose 2.7 percent after the planemaker delivered a record 806 aircraft in 2018.
At 11:35 a.m. ET, the Dow Jones Industrial Average was up 83.07 points, or 0.35 percent, at 23,614.42. The S&P 500 was up 2.31 points, or 0.09 percent, at 2,552.00 and the Nasdaq Composite was down 2.23 points, or 0.03 percent, at 6,821.24.
The financial sector was pulled lower by losses in Bank of America Corp and Goldman Sachs Group Inc.
PG&E Corp shares fell about 8.3 percent after S&P Global Ratings stripped the California power utility of its investment-grade credit rating and kept it under review for a further downgrade.
Advancing issues outnumbered decliners by a 1.77-to-1 ratio on the NYSE and by a 1.22-to-1 ratio on the Nasdaq.
The S&P index recorded no new 52-week highs and one new low, while the Nasdaq recorded 22 new highs and 12 new lows.
Reporting by Sruthi Shankar in Bengaluru; Editing by Sriraj Kalluvila