At those lows, a bear market — when stocks decline 20 percent or more — did not seem out of the question. But after two strong up days, it seemed plausible that the six-year bull market that started in 2009 might now resume. “What has happened the last couple of days gives you some confidence,” said Philip J. Orlando, a senior portfolio manager at Federated, a mutual fund firm. “It was a little bit of a panic and an irrational move,” he added, referring to troughs earlier in the week.

The Dow Jones industrials average leapt 369.26 points, or 2.3 percent, to 16,654.77 on Thursday. It is now down 9.05 percent from its all-time high, which means it is no longer in a correction, the Wall Street term for a market decline of 10 percent or more. The Nasdaq, which contains a lot of technology stocks, was up 2.5 percent on Thursday.

It was even a good day for the price of oil, which has borne the brunt of the bearishness over China and the global economy. The benchmark New York crude contract jumped $4.18, or nearly 11 percent, to $42.78 a barrel.

Stock and bond prices are driven by things that happen in the real word, like corporate earnings and economic releases. During the selling, then, it was important to ask whether major economies and profits were really going to weaken considerably. After all, a scare about global growth last fall forced stocks sharply lower, only to rebound strongly in the following months.