NEW YORK – U.S. stocks rallied Tuesday, recouping after an erroneous tweet pushed the market down 1 percent in seconds, as investors embraced earnings and less-dismal-than-anticipated corporate forecasts.

“The good news is guidance is still being cut by a majority of companies, but not all that much, or at a lesser rate. We’re not seeing major slashes to second-quarter expectations,” said Nick Raich, chief executive at The Earnings Scout in Cleveland, Ohio.

Of the more than 130 S&P 500 companies that have reported quarterly results so far, 70 percent beat earnings estimates but only 48 percent exceeded sales expectations, according to Raich.

The Dow Jones industrial average gained 152.29 points to end at 14,719.46. Components were led by DuPont, up 4.1 percent, after its first-quarter earnings more than doubled as drought conditions prompted farmers to buy more of its drought-resistant seeds and other products to protect crops.

Bank of America added 3 percent after Morgan Stanley upgraded the Dow member’s shares to overweight from equal weight.

Another Dow component, Travelers Companies, rose 2.1 percent after the Dow member and insurer reported a jump in first-quarter profit.

But the session was not lacking in drama, as the Dow lost more than 150 points in a matter of seconds, briefly trading down nearly 13 points on the day, before springing back after the Associated Press said its Twitter account was hacked. The AP’s Twitter feed had erroneously said that there had been two explosions at the White House.

“The mini crash and recovery does say something about the impact Twitter feeds can have,” Bruce McCain, chief investment strategist at Key Private Bank.

And “it probably does reveal a little bit about the skittishness of this market, not that it wouldn’t have had an impact in any case, but the market has struggled with confidence,” said McCain, who cited the defensive tilt of the market in the last month or so, with health care, consumer staples and utilities outperforming more economically sensitive sectors.

The S&P 500 index added 16.28 points to 1,578.78. The tech-heavy Nasdaq composite climbed 35.78 points to 3,269.33.

The price of oil slipped, with crude down 1 cent at $89.18 a barrel and gold off $12.40 to end at $1,408.80 an ounce.

Netflix surged 24 percent a day after the online-video provider’s earnings beat Wall Street forecasts.

Coach shares advanced after the maker of luxury handbags reported fiscal-third-quarter results that topped estimates and increased its dividend by 15 cents to $1.35 a share.

United Technologies shares slid after the diversified manufacturer on Tuesday reported a better-than-estimated profit but its chief financial officer said the government’s scheduled budget cuts have begun to dent orders.

Lockheed Martin’s shares climbed after the weapons supplier reported per-share earnings that beat Wall Street’s estimates, but also warned U.S. budget cuts could bring full-year revenue down to the lower end of its prior guidance.

Listening to what corporate bosses have to say, “it’s a cautious tone, and usually these CEOs are cheerleaders. They’re using excess cash to buy back shares and increase dividends, as opposed to reinvesting in their business and hiring people,” Raich said.

The decline in sovereign-debt yields, including in Spain and Italy, also bolstered the case for equities.

“Several countries are reporting record-low yields for their sovereign debt across maturities ranging from two years to 10 years,” noted Fred Dickson, chief investment strategist at Davidson Cos.

Data showed that U.S. sales of new single-family homes rose 1.5 percent in March to an annual rate of 417,000 from 411,000 in February.

Other data Tuesday had the Federal Housing Finance Agency’s home-price index rising 0.7 percent in February and Markit’s “flash” U.S. PMI for April sliding to a six-month low.