NEW YORK – Stocks had their biggest rally in two weeks Thursday as earnings and economic reports reassured investors that the recovery, while uncertain, is continuing.

The Dow Jones industrial average rose 201 points after second-quarter earnings from Caterpillar Inc., UPS Inc. and other companies beat analysts’ forecasts. A better than expected report on housing and encouraging signs of growth in Europe added to the upbeat mood.

But investors might be ready to sell again when trading resumes today. After the close of regular trading, Amazon.com Inc. issued a report that fell short of expectations. Its stock fell almost 14 percent in after-hours trading. If the market gives back gains today, it would follow its pattern of falling on disappointments in what so far has been a mixed earnings season.

Microsoft Corp. also released earnings after the close of trading and beat analyst estimates. Its stock fell slightly.

Investors had plenty of reasons to buy on Thursday. Caterpillar said its orders are growing and production will pick up in the second half of the year. UPS raised its outlook because of spending by businesses. Caterpillar’s stock rose 1.7 percent, while UPS gained 5.2 percent.

Chris Hobart, founder of Hobart Financial Group in Charlotte, N.C., said the outlooks are especially important because, if companies expect to grow, they’ll need to hire again.

If improved forecasts lead to jobs growth, “then this can be better than a good quarter or good second half, (it can mean) we’ve got a good economy,” Hobart said.

A report on the housing market, while still showing a slowdown, was reassuring because it wasn’t as bad as investors expected. The National Association of Realtors said sales of previously occupied homes fell to an annual rate of 5.37 million in June from 5.66 million a month earlier. Economists forecast the sales rate to fall to 5.18 million.

The Dow rose 201.77, or 2 percent, to 10,322.30. That was the Dow’s biggest advance since it rose 274 points on July 7.

The Standard & Poor’s 500 index rose 24.08, or 2.3 percent, to 1,093.67, while the Nasdaq composite index rose 58.56, or 2.7 percent, to 2,245.89.

Traders largely wrote off a jump in the number of people seeking unemployment benefits for the first time. The increase was likely skewed by seasonal factors. Instead, investors focused on earnings from a range of companies that showed businesses aren’t seeing a slowdown in the recovery. News of corporate deals also lifted shares.

European markets rose after a report showed unexpected growth in the 16-nation group that uses the euro. In recent months, investors worldwide have been concerned that rising government debt in Europe would stall a global recovery.

The economic reports out of Europe were “a big surprise because everyone expects that to be the Achilles heel of the global economy,” said Anthony Chan, chief economist at J.P. Morgan Private Wealth Management.