(Reuters) - Wall Street’s main stock indexes closed at record levels on Friday, fueled by fresh optimism over a potential calming of U.S.-China trade tensions and by big gains in shares of healthcare companies.

The benchmark S&P 500 tallied its sixth straight week of gains, its longest such weekly streak in about two years, while the Dow breached 28,000 for the first time.

White House economic adviser Larry Kudlow said late on Thursday that the United States and China are getting close to a trade agreement, citing what he called very constructive talks with Beijing.

“Today is definitely about optimism surrounding the trade tensions,” said Jason Pride, chief investment officer of private wealth at Glenmede in Philadelphia.

The stock market has climbed recently to record highs, driven by Federal Reserve interest rate cuts, third-quarter earnings topping low expectations and signs that economic growth may be bottoming, while uncertainty over U.S.-China trade relations remains a wild card.

“It’s definitely been a big source of volatility over a fairly long period of time for the markets and stocks in general,” Pride said. “To see some sort of resolution of it would probably be a lift to investors and to equity holders because it takes away a big piece of uncertainty in many investors’, and even corporate executives’, minds.”

The Dow Jones Industrial Average .DJI rose 222.93 points, or 0.8%, to 28,004.89, the S&P 500 .SPX gained 23.83 points, or 0.77%, to 3,120.46 and the Nasdaq Composite .IXIC added 61.81 points, or 0.73%, to 8,540.83.

Ten of 11 S&P 500 sectors ended positive. Healthcare .SPXHC led the way, gaining 2.2% for its biggest one-day percentage rise since January, with UnitedHealth Group UNH.N shares surging 5.3% and Pfizer PFE.N rising 2.0%.

The gains came as President Donald Trump made an announcement on healthcare price transparency. Regulatory and election risks have contributed to the healthcare sector’s underperformance in 2019, said Walter Todd, chief investment officer at Greenwood Capital in South Carolina, noting that perhaps Friday’s gains were “a catch-up trade.”

Shares of Applied Materials AMAT.O soared 9.0% after the chip gear maker forecast first-quarter revenue and profit above Wall Street estimates.

The Philadelphia SE Semiconductor index .SOX gained 0.9% and hit a record high. Enthusiasm for the group was tempered by a 2.7% decline in Nvidia NVDA.O shares following the chipmaker's report.

Data on Friday showed U.S. retail sales rebounded in October, but consumers cut back on purchases of big-ticket household items and clothing, which could temper expectations for a strong holiday shopping season.

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

The S&P 500 posted 52 new 52-week highs and one new low; the Nasdaq Composite recorded 121 new highs and 108 new lows.

About 6.5 billion shares changed hands in U.S. exchanges, below the 6.9 billion-share daily average over the last 20 sessions.