NEW YORK (AP) -- U.S. stocks rose for the second consecutive day Monday with technology companies, retailers and household goods companies in the lead. Indexes of technology companies and smaller, more U.S.-focused companies both hit all-time highs.
Major technology companies including Google's parent company, Alphabet, made solid gains. 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. Facebook fell, however, on new privacy concerns.
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 U.S. continued to hold talks with Chinese officials and placed tariffs on steel and aluminum 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. But Wall Street has mostly treated the tough talk and proposed tariffs as a negotiating tactic. Invesco Chief Global Market Strategist Kristina Hooper said the U.S. crossed an important dividing line last week when, after months of talks, its aluminum 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 percent, to 2,746.87. The index rose 1.1 percent Friday after a strong jobs report. The Dow Jones industrial average rose 178.48 points, or 0.7 percent, to 24,813.69. The Nasdaq composite gained 52.13 points, or 0.7 percent, to 7,606.46.
The Russell 2000 index of smaller-company stocks gained 5.39 points, or 0.3 percent, to 1,653.37.
Apple climbed 0.8 percent to $191.83 and Alphabet gained 1.6 percent to $1,153.04. Chipmaker Advanced Micro Devices added 3.1 percent to $14.85. Microsoft rose 0.9 percent to $101.67 after the company said it will pay $7.5 billion 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 percent to $76.35 and Walmart picked up 2.9 percent to $85.42 after it agreed to sell an 80 percent stake in its struggling Brazilian business.
Hooper, of Invesco, said Wall Street is overlooking the threat that tariffs pose because it's focused on solid economic news from the U.S.
"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 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 percent to $193.28.
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 Friday.
Energy companies traded lower as benchmark U.S. crude dropped 1.6 percent to $64.75 a barrel in New York. Brent crude, used to price international oils, fell 2 percent to $75.29 per barrel in London.
Wholesale gasoline lost 1 percent to $2.12 a gallon. Heating oil slid 1.1 percent to $2.15 a gallon. Natural gas fell 1.1 percent to $2.93 per 1,000 cubic feet.
Companies reported results from cancer drug studies at the annual meeting of the American Society of Clinical Oncology. Nektar Therapeutics plunged 41.8 percent to $52.57 after it disclosed data from a potential treatment for pancreatic cancer. Analyst Debjit Chattopadhyay of H.C. Wainwright said investors were concerned by mixed results from the study and a lack of information and a lung cancer drug study.
Nektar had made huge gains since early November. Shares of its partner Bristol-Myers Squibb lost 3.1 percent to $51.56.
Bond prices dipped. The yield on the 10-year Treasury note rose to 2.94 percent from 2.90 percent late Friday.
Gold dipped 0.2 percent to $1,297.30 an ounce. Silver fell 0.1 percent to $16.43 an ounce. Copper gained 1.2 percent to $3.13 a pound.
The dollar rose to 109.58 yen from 109.51 yen. The euro rose to $1.1719 from $1.1662.
Germany's DAX rose 0.4 percent and France's CAC 40 added 0.2 percent. Britain's FTSE 100 climbed 0.5 percent. The benchmark Nikkei 225 in Japan rose 1.4 percent and the South Korean Kospi gained 0.4 percent. Hong Kong's Hang Seng rallied 1.7 percent.