NEW YORK, SEPT. 11 -- Financial markets, braced for the worse, responded calmly today to the largest monthly trade deficit in U.S. history.

The Commerce Department said the merchandise trade deficit ballooned to a record $16.5 billion in July, surpassing the apparent record of $15.7 billion set just one month earlier.

Economists expressed disappointment with the report, but investors took it in stride because they had been knocking down the prices of stocks, bonds and the dollar for weeks in anticipation of a big deficit.

"The markets at the close of the day are all up, which is a little strange considering how lousy the report was," said Robert Giordano, a partner and codirector of economic research at Goldman, Sachs & Co.

The dollar rebounded after a brief sell-off. Stocks and bonds, which tend to rise on a stronger dollar, followed suit.

The dollar jumped to 143.90 Japanese yen in late New York trading from 142.42 late Thursday. It edged up to 1.8070 West German marks from 1.8045 late Thursday. Giordano called the dollar's move upward "perverse" under the circumstances.

In the bond market, the price of the benchmark 30-year Treasury bond was up 21/32 of a point from late Thursday, or about $6.50 for every $1,000 of face value. Its yield stood at 9.49 percent, down from nearly 9.7 percent earlier this week.

The Dow Jones average of 30 industrial stocks rose 32.69 to 2608.74 on the New York Stock Exchange.

Stephen Slifer, a money market economist and senior vice president for Shearson Lehman Bros. Inc., said the strength in the financial markets may have come in part from investors who were buying to cover short positions.

In creating short positions, investors borrowed securities in hopes that they would decline in price. They waited for the expected fall and then purchased the securities cheaply for delivery to the lenders.

And inflation fears, which tend to drive down the dollar, were quelled when the Labor Department reported that wholesale prices measured by its Producer Price Index were flat in August after adjustment for seasonal factors.

"The Producer Price Index threw a cold bucket of water over the theory that interest rates would have to go higher because of higher inflation," said Thomas Czech, research director of Blunt Ellis & Loewi Inc. in Milwaukee. In spite of the short-term stability, the markets could still weaken in coming weeks if traders decide that the Federal Reserve or Treasury Department want the dollar to decline further to help shrink the trade deficit, Slifer said.

A cheaper dollar is not the only way to help the trade deficit, but it is easier than trying to improve productivity or other things, Slifer said