US stocks have risen for the second consecutive day with technology companies, retailers and household goods companies in the lead.
Indexes of technology companies and smaller, more US-focused companies both hit all-time highs.
Major technology companies including Google’s parent company Alphabet made big gains, while Apple rose as it previewed new features and software updates at its Worldwide Developers Conference.
Microsoft edged higher after it said it will buy the coder platform GitHub, while new privacy concerns weighed on shares of Facebook.
Retailers including Target, Walmart and Under Armour rallied, as did Amazon. Energy companies fell as the price of oil continued to slide.
After an up and down week last week, the S&P 500 index, a market benchmark used by many index funds, is on its first winning streak in three weeks.
The technology-heavy Nasdaq composite finished at a record high, above a mark it set March 12, while the smaller Russell 2000 surpassed a record it set last week.
Last week investors reacted to political turmoil in Italy and rising trade tensions as the US continued to hold talks with Chinese officials and placed tariffs on steel and aluminium imported from Europe, Mexico and Canada.
Stocks have wobbled in the last few months as investors worried that tariffs and other barriers to trade will reduce economic growth and corporate profits.
However, Wall Street has mostly treated the tough talk and proposed tariffs as a negotiating tactic.
Invesco Chief Global Market Strategist Kristina Hooper said the US crossed an important dividing line last week when, after months of talks, its aluminium and steel import duties went into effect.
“It appears that will lead to some significant retaliatory tariffs,” she said.
“Markets seem to treat it as if it’s just rhetoric and it’s just a bargaining tool, and my view is that that is foolhardy.”
The S&P 500 climbed 12.25 points, or 0.4%, to 2746.87. The index rose 1.1% on Friday after a strong jobs report.
The Dow Jones industrial average rose 178.48 points, or 0.7%, to 24813.69.
The Nasdaq composite gained 52.13 points, or 0.7%, to 7606.46.
The Russell 2000 index of smaller-company stocks gained 5.39 points, or 0.3%, to 1653.37.
Apple climbed 0.8% to 191.83 dollars and Alphabet gained 1.6% to 1,153.04 dollars.
Chipmaker Advanced Micro Devices added 3.1% to 14.85 dollars.
Microsoft rose 0.9% to 101.67 dollars after the company said it will pay 7.5 billion dollars in stock for GitHub.
Around 27 million software developers around the world use GitHub to share code and build businesses.
Among retailers, Target gained 4.9% to 76.35 dollars and Walmart picked up 2.9% to 85.42 dollars after it agreed to sell an 80% stake in its struggling Brazilian business.
Ms Hooper, of Invesco, said Wall Street is overlooking the threat that tariffs pose because it is focused on solid economic news from the US.
“We have enough positive economic data that it’s easy enough to put blinders on when it comes to threats like protectionism,” she said.
The New York Times reported on Sunday that Facebook struck data-sharing deals with at least 60 device makers, including Apple and Amazon, as it tried to get its app onto smartphones, and that the device companies were able to access users’ friends without their explicit consent.
That renewed some investors’ concerns about Facebook’s handling of user data, and the stock lost 0.4% to 193.28 dollars.
Facebook said it maintained tight control over the technology and is not aware of any abuse by the companies that it teamed with.
The stock skidded in March following allegations a firm linked to the Trump campaign improperly harvested personal data millions of Facebook users, but Wall Street’s concerns about the stock gradually faded and Facebook closed at an all-time high on Friday.