NEW YORK (AP) -- U.S. stocks rallied Tuesday as retailers, technology and household goods companies all made solid gains and helped the market shake off a weak start. Netflix slumped after investors were disappointed with the streaming video company's subscriber growth.
Stocks skidded at the start of trading as investors sold some of their recent favorites including Facebook and Apple. But those stocks later recovered and Netflix narrowed its losses. Technology companies also turned higher and strong results from Johnson & Johnson pulled health care stocks upward.
Federal Reserve Chairman Jerome Powell delivered a positive view of the economy as he told Congress that he expects the Fed to keep gradually raising interest rates. Powell said the Fed believes the economy will stay strong and inflation will remain at around 2 percent for the next few years. Stocks have fallen previous times that Powell gave major addresses, but they didn't do so on Tuesday.
Investors focused on company earnings, which aside from Netflix were mostly good. Financial services company Charles Schwab and regional bank Comerica both rose.
"Double-digit earnings growth for this quarter and this full calendar year remains on track, and a 10 percent gain in earnings next year is also still doable," said Sam Stovall, chief investment strategist for CFRA.
While investors have been buying U.S. stocks and selling foreign indexes this year, Stovall said earnings growth for companies in overseas markets will probably improve in 2019 while U.S. profit growth slows down. That could make non-U.S. markets more appealing.
The S&P 500 index rose 11.12 points, or 0.4 percent, to 2,809.55 after it dropped 9 points at the start of trading. The Dow Jones Industrial Average gained 55.53 points, or 0.2 percent, to 25,119.89. The Nasdaq composite jumped 49.40 points, or 0.6 percent, to 7,855.12 and surpassed the record high it set last week. The Russell 2000 index of smaller-company stocks rose 8.72 points, or 0.5 percent, to 1,687.26.
Companies that sell clothing, food and household goods made solid gains. Ralph Lauren advanced 2.6 percent to $133.30 and PepsiCo climbed 1.7 percent to $114.88. Amazon as it said sales in the first hours of its annual Prime Day promotion improved compared to last year in spite of website problems. The company said it's resolving those issues. The stock rose 1.2 percent to $1,843.93.
Netflix's weak subscriber totals sent the stock down 5.2 percent to $379.48. The company has regularly beaten its own subscriber forecasts but failed to do so in the second quarter and its third-quarter estimate was lower than analysts expected. Things looked far worse for Netflix in early trading as the stock plunged 14.1 percent before recovering most of that drop. Even with Tuesday's loss, the stock is up 98 percent this year.
Johnson & Johnson's second-quarter profit grew thanks to better results from its prescription drug business, and it posted higher sales than analysts expected. The stock gained 3.5 percent to $129.11.
Financial services company Charles Schwab climbed 3.6 percent to $52.88 after it surpassed Wall Street forecasts in the latest quarter.
UnitedHealth, the largest U.S. health insurance company, once again beat expectations in the latest quarter and raised its annual profit forecast. But the company's spending on medical costs was higher than analysts expected, and the stock lost 2.6 percent to $250.29. Investors worried that other health insurers would have similar problems, and competitors Anthem and Humana also slipped.
Advertising companies sank after Omnicom said its business in North America decreased in the second quarter and its U.K. business also shrank. The advertising conglomerate lost 9.5 percent to $70.69 and Interpublic Group shed 6.1 percent to $22.26.
The European Union and Japan signed a broad trade deal Tuesday that will eliminate nearly all tariffs across a third of the global economy. Japanese consumers will pay lower prices for European wine and pork, while Japanese machinery parts, tea and fish will get cheaper for Europe. The deal has been in the works for years and contrasts with the more protectionist approach of U.S. President Donald Trump.
Bond prices were little changed. The yield on the 10-year Treasury note remained at 2.86 percent.
Benchmark U.S. crude erased an early loss and finished little changed at $68.08 a barrel in New York. Brent crude, used to price international oils, picked up 0.4 percent to $72.16 a barrel in London.
Wholesale gasoline gained 1.2 percent to $2.03 a gallon. Heating oil added 0.8 percent to $2.07 a gallon. Natural gas fell 0.7 percent to $2.74 per 1,000 cubic feet.
Metals prices continued to fall. Gold dripped 1 percent to $1,227.30 an ounce. Silver sank 1.2 percent to $15.62 an ounce. Copper fell 0.6 percent to $2.75 a pound. All three are near their lowest prices in a year.
The dollar rose to 112.83 yen from 112.30 yen. The euro fell to $1.1664 from $1.1714.
Germany's DAX jumped 0.8 percent and the CAC 40 in France added 0.2 percent. The British FTSE 100 index rose 0.3 percent.
Japan's benchmark Nikkei 225 gained 0.4 percent after reopening from a public holiday. South Korea's Kospi lost 0.2 percent and Hong Kong's Hang Seng shed 1.3 percent.