The vacillating mood of the stock market swung from panic to Pollyanna and back again yesterday after the announcement of the surprising $17.6 billion October trade deficit.

The Dow Jones industrial average plunged almost 50 points when the record deficit figures hit Wall Street, then promptly rebounded in what looked like a continuation of the three-day rally that had pushed the Dow up by 135 points since Monday.

But after peaking 12 points above Wednesday's close, the Dow was slammed down late in the day by another wave of the computer-directed trading that has become the most controversial and confounding influence on stock prices. The Dow ended the day at 1855.44, down 47.08.

The day's erratic moves in the closely watched Dow average provided no answer to Wall Street's biggest question: Did the market hit bottom last week when it lost 140 points before abruptly bouncing back?

Even the way the market reacted to the trade figures added more uncertainty to its already enigmatic behavior. Some stock watchers said the rebound from the initial 50-point plunge was a sign that investors did not consider the trade figures to be all that devastating to the nation's economic outlook. Others cautioned that for the last two months the negative impact on stocks of the trade figures has not shown up until two or three days later -- after foreign investors have had a chance to analyze and act on the reports.

Reading anything about the market impact into the trade deficit figures is dangerous, cautioned Henry Gailliot, senior vice president for Federated Research Corp.

"To try to tie specific events to market moves is ridiculous," Gailliot said. He said he believes the fall in stock prices is "over or almost over and from that will come a rally that will last through the spring or summer."

But Philip Cannistraro, executive vice president of Amivest Corp. in New York, cautioned that when it comes to betting on what the stock market will do in the next few weeks, "The smart thing to do is not to bet."

Yet the same uncertainty that has made it all but impossible for even professional investors to chart a course through the stock market has made it necessary for the professionals to keep trying, he explained.

In the first three days of this week, the Dow jumped 8.5 percent. "That's a year's worth of profits," he said, and money managers cannot afford to sit on the sidelines when that much money can be made in three days.

"What the market needs is constant nourishment" from good news, said Hugh D. Johnson, market watcher for First Albany Corp., a regional brokerage firm. And traders are finding that nourishment even in statistics like the trade deficit report that appear to be negative.

"The trade numbers probably are not as significant as they appear at first blush," he said, blaming the initial plunge in stock prices on "knee-jerk reaction to the numbers.

"But a more sober assessment produced a different view," Johnson added. The Commerce Department report showed that both U.S. imports and exports are growing -- a sign, he said, that the American economy is expanding quite rapidly.

The export growth indicates not only that U.S. firms are winning new overseas customers whose purchases will help the balance of trade, but also that business expansion will bring economic growth in the coming months.

The import figures also are a sign of economic expansion, showing that consumers were spending readily in October. But that was six weeks ago, before the full impact of the Oct. 19 market crash had been felt. Since then, Johnson said, consumers have changed their spending pattern, which will probably mean imports in the next three months "should show significant improvement from the numbers we saw today."

It was the prospect of better trade figures next month rather than the impact of October's deficit that caused the stock market to rebound after the initial drop, he added. The late-in-the-day drop in prices, he added, was due not to the trade figures themselves but to "program trading that exaggerates otherwise meaningless events.