U.S. stocks closed solidly higher Thursday, with the Nasdaq ending at a record on the back of a rally in internet and technology giants, which helped to overshadow ongoing uncertainty over trade relations between the U.S. and China.

The day’s gains were broad, with 10 of the 11 S&P 500 sectors ending higher on the day. However, the biggest boost came from the information technology sector, which rose 1.8% in its biggest one-day percentage gain since June 1, a rally that took the sector to record levels.

What are markets doing?

The Dow Jones Industrial Average
DJIA, +0.35%
rose 224.44 points, or 0.9%, to 24,924.89. The S&P 500 index
SPX, +0.01%
gained 24.27 points, or 0.9%, to 2,798.29. The tech-heavy Nasdaq Composite Index
COMP, +0.45%
advanced 107.3 points to 7,823.92, a gain of 1.4% that took it to its first record close since June 20.

Tech stocks were among the biggest boosts to all three, with Microsoft Corp.
MSFT, +1.05%
up 2.2%, hitting a record, while Cisco Systems Inc.
CSCO, -0.32%
added 2.3%. Intel Corp.
INTC, +1.40%
was up 2.3% while Apple Inc.
AAPL, +1.30%
added 1.7%. All four stocks are Dow components.

Boeing Co.
BA, +3.77%
and Caterpillar Inc.
CAT, -0.16%
considered the most sensitive to trade-war fears, also ended higher on the day. Caterpillar rose 2% while Boeing gained 1.6%.

All three indexes posted their fifth gain of the past six sessions. For the week, Dow is set to post a weekly gain of 1.9%, which would represent its best weekly win since the period ended June 8. The Nasdaq is eyeing a weekly advance of 1.8%, while the S&P 500 is on pace for a weekly return of 1.4%.

What is driving the market?

Recent action in equity markets has been influenced by trade policy. Stocks dropped sharply on Wednesday after the Trump administration announced plans to impose another round of tariffs on Chinese goods. However, the mood turned positive on signs the U.S. and China were willing to resume trade talks, which could end up in a bilateral agreement. Bloomberg reported late Wednesday that officials from both countries have raised the prospects of restarting a conversation at a high level.

Fears of a full-blown trade war possibly developing between the world’s two largest economies have weighed on equities around the globe in recent months, although markets have remained somewhat resilient, with major indexes largely holding in a tight trading range.

Meanwhile, the U.S. consumer-price index increased 0.1% in June. Core CPI, minus volatile food and energy, rose 0.2% on the month. Moreover, the 12-month gain for CPI rose to a 6-yr high of 2.9%, reflecting a U.S. economy that is running hotter than anytime since the 2007-09 recession.

Renewed optimism, although tenuous at times in recent trading sessions, also comes as investors await the unofficial start of the second-quarter earnings season, with a number of significant banks, considered a bellwether for the economy, set to report Friday.

Separately, Philadelphia Fed President Patrick Harker said he still favors only one more interest-rate hike this year even with fresh data released showing consumer price inflation rising at fastest pace in six years.

What are strategists saying?

“The market is breathing a sign of relief despite some pretty intense headlines recently. We’re seeing technology pick up, and other areas more broadly as well, as fundamentals remain very good,” said Ralph Bassett, head of small and mid-cap equities at Aberdeen Standard Investments, which has about $730 billion in assets under management.

Bassett noted that the gains in tech and internet stocks was nothing new. Not only have they easily outperformed the broader market thus far this year, but they have contributed the bulk of the overall market’s move higher. Fully half the S&P 500’s gain in 2018 can be credited to just two stocks: Amazon.com Inc. and Netflix Inc.

“Investors have been chasing these names with visible growth all year, which has put a premium on high-growth technology stocks in particular. This makes us slightly more cautious on high-growth stocks; our concern is that valuations have become elevated.”

Shares of Wells Fargo & Co.
WFC, -0.19%
ended down 0.1% while those for JPMorgan Chase & Co.
JPM, -0.47%
finished up 0.4%. Citigroup Inc.’s stock
C, -0.59%
rose 0.9%. All three are set to report their results on Friday before the market opens.

— Sara Sjolin provided additional reporting

Providing critical information for the U.S. trading day. Subscribe to MarketWatch's free Need to Know newsletter. Sign up here.

Intraday Data provided by SIX Financial Information and subject to terms of use. Historical and current end-of-day data provided by SIX Financial Information. All quotes are in local exchange time. Real-time last sale data for U.S. stock quotes reflect trades reported through Nasdaq only. Intraday data delayed at least 15 minutes or per exchange requirements.