By Jessica Menton
The S&P 500 ticked higher Thursday as gains in shares of health-care, materials and technology companies put the index within striking distance of its closing high.
The broad stock-market index rose 0.2% to 3011, pushing it within 0.4% of July's record of 3025.86. The Dow Jones Industrial Average slipped 10 points, or less than 0.1%, after trading higher for most of the session, while the technology-heavy Nasdaq Composite climbed 0.2%.
Investors continued to assess the Federal Reserve's latest outlook on future interest-rate cuts, while also waiting for signs of progress in the trade talks between representatives from the U.S. and China that were scheduled to begin in Washington Thursday.
"The overall picture for the economy looks good," said Jeff Kravetz, regional investment director at U.S. Bank. "We have contained inflation, low unemployment and a resilient consumer. The economic outlook is still favorable with interest rates low, but we still have some caution with the geopolitical risks."
Health-care and material stocks led the broader S&P 500 higher, with the sectors adding 0.7% and 0.4%, respectively. Tech stocks gained 0.4%.
Shares of Microsoft climbed 1.9% after the software company said it plans to buy back as much as $40 billion in stock and raise its dividend 11%.
Shares of chip makers, which have been caught in the crosshairs of the trade spat, eased from earlier gains, with Advanced Micro Devices and Qualcomm slipping 0.2% and 0.4%, respectively.
Some analysts and investors said they remain bullish on the technology sector despite trade headwinds.
"Semiconductor stocks have more risk because they're exposed to China, but if we're going to forecast a positive trade outcome in the next few months, I think that's an area that will surge," said Ben Barzideh, wealth adviser at Piershale Financial Group.
The Commerce Department reported the U.S. current-account deficit, a measure of the nation's trade and financial flows with other countries, narrowed to a seasonally adjusted $128.19 billion in the second quarter from a revised $136.19 billion in the first quarter.
Meanwhile, a divided Fed cut interest rates by a quarter percentage point Wednesday to cushion a slowing U.S. economy from a global slowdown. Two reserve bank presidents preferred to hold rates steady and one wanted a half percentage-point cut.
Fed Chairman Jerome Powell said officials still have a positive outlook for the U.S. economy. But he signaled less certainty about the rate path than at the central bank's late July meeting, saying it "is going meeting by meeting."
Investors were looking for the Fed to give a stronger indicator of future actions as they position themselves in an unclear market environment amid uncertainty surrounding U.S.-China trade tensions, a slowdown in the U.S. manufacturing sector and recent sanctions against Iran, some investors and analysts said.
Data has remained mixed recently. Hiring slowed in August and factory activity eased, while consumer spending has remained strong. But a recent batch of housing data has pointed to a firming U.S. economy. Sales of previously owned U.S. homes in August grew at the fastest pace since March of last year, the National Association of Realtors said Thursday.
"There are some risks for a recession, partly driven by concerns surrounding trade policy and weakness already showing up in the manufacturing industry," said Jason Pride, chief investment officer of private wealth at Glenmede. "The Fed is essentially taking out insurance with these rate cuts to prevent those risks from turning into something bigger."
Gold prices fell 0.6% to settle at $1498.40 a troy ounce.
The U.S. 10-year Treasury yield edged down to 1.770%, from 1.777% Wednesday, according to Tradeweb.
In commodity markets, Brent crude, the global oil benchmark, rose 1.3% to settle at $64.40 a barrel after The Wall Street Journal reported that Saudi Arabia was reaching out to foreign producers for crude and other petroleum products to plug gaps in its own supply.
Elsewhere, the Stoxx Europe 600 gained 0.6%. Stocks mostly gained in Asia, with the Shanghai Composite up 0.5% and Japan's Nikkei 225 up 0.4%. Hong Kong's Hang Seng was an outlier with a 1.1% drop.
-- Caitlin Ostroff contributed to this article.
Write to Jessica Menton at Jessica.Menton@wsj.com