NEW YORK (AP) — The stock market is a day away from locking in its best July in 20 years.

Stocks added to an already impressive run Thursday as another round of earnings reports gave investors new reasons to be optimistic about the economy. The Dow Jones industrial average rose its highest level in nearly nine months with a gain of 84 points and the Nasdaq composite index traded above 2,000 for the first time since October.

The latest reports struck a theme that has played out for weeks: Times are tough but companies aren’t doing as badly as feared. Many have chopped costs to produce profits well beyond the market’s modest expectations.

Motorola Inc. said it used deep cost cuts to wring a profit from its latest quarter. Analysts had expected a loss. Goodyear Tire & Rubber’s shortfall was half what had been expected and Dow Chemical Co.’s CEO said he believes the U.S. economy “has found bottom.”

A surprise drop in the number of people continuing to seek unemployment benefits gave investors even more reason to put money into stocks.

With one day to go, the Dow is up 8.4 percent this month, its strongest July since 1989, when it gained 9 percent. It would be the best performance of any month since October 2002.

A much-anticipated report on the overall output of the economy is sure to drive the market Friday. Economists expect that the nation’s gross domestic product shrank at an annual rate of 1.5 percent in the April-June quarter. That would be a big improvement from the 5.9 percent average annualized drop recorded in the prior six months, the weakest numbers in 50 years.

Stocks are up 13 percent since July 13 when investors bet correctly that Goldman Sachs Group Inc. would report enormous earnings. Since then, other profit reports have brought hope that the longest recession since World War II might end this year. AT&T Inc., chip maker Intel Corp. and heavy equipment maker Caterpillar Inc. all posted results that outran expectations.

Three out of four companies in the S&P 500 index that reported second-quarter results so far have topped analysts’ expectations, according to Thomson Reuters. About 300 of the 500 companies have reported.

Analysts said the end of the month is pressuring money managers and traders to show they have kept up with July’s rally. Often, the summer months are quieter than the rest of the year on Wall Street as traders take vacations.

Some of the buying is likely tied to short-covering, where investors have to buy stock after having earlier sold borrowed shares in a bet they would fall.

“People kind of got caught a little flat-footed here. The summer is supposed to be slow,” said Jon Merriman, chief executive of Merriman Curhan Ford in San Francisco.

The Dow rose 83.74, or 0.9 percent, to 9,154.46 after being up as much as 176 points. The Standard & Poor’s 500 index rose 11.60, or 1.2 percent, to 986.75. It rose to nearly 997 during the day. It hasn’t traded above 1,000 since November.

It was the highest close for the Dow and the S&P 500 index since Nov. 4.

The Nasdaq advanced 16.54, or 0.9 percent, to 1,984.30. It rose to nearly 2,010 in morning trading, its first move above 2,000 since Oct. 3. The index is up 56 percent from its low of 1,269 in March. It was its highest finish since Oct. 1.

About four stocks rose for every one that fell on the New York Stock Exchange. Consolidated volume came to 6.1 billion shares compared with 5.4 billion Wednesday.

Stocks made little progress in the four days prior to Thursday though some break in the buying had been expected after the steep gains.

General Electric Co. led the Dow higher after a Goldman Sachs analyst raised his rating on the industrial conglomerate. The stock rose 85 cents, or 6.9 percent, to $13.11.

“There are some specific stock stories that are getting people involved and making people confident,” said Nick Kalivas, vice president of financial research at MF Global in Chicago.

Investors also welcomed a government report that the number of Americans continuing to collect unemployment benefits fell unexpectedly last week to 6.2 million. Economists polled by Thomson Reuters had expected that figure to rise to 6.3 million from 6.23 million in the prior week.

Bond prices were mixed after a successful auction of $28 billion of seven-year notes. Weak demand at auctions earlier in the week raised concerns that the government might have to offer higher returns on bonds to lure in investors, which would have the negative effect of raising borrowing costs on loans such as mortgages.

The yield on the benchmark 10-year Treasury note fell to 3.61 percent from 3.67 percent late Wednesday.

Crude oil rose $3.59 to settle at $66.94 a barrel on the New York Mercantile Exchange after tumbling 6 percent Wednesday on fears economic growth in China would slow and curb demand for resources.

The dollar was mixed, while gold prices rose.

The Russell 2000 index of smaller companies rose 9.42, or 1.7 percent, to 557.80.

Overseas, Britain’s FTSE 100 gained 1.9 percent, Germany’s DAX index gained 1.7 percent, and France’s CAC-40 rose 2.1 percent. Japan’s Nikkei stock average rose 0.5 percent.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.