Waiting for the recession is the name of the game on Wall Street these days.

The recession is seen by Wall Street's economists and analysts as inevitable. The key question is when will it arrive. Most observers are betting on 1989 rather than 1988.

Either way, Wall Street is busy devising strategies to cope with a business downturn, which always is bad for the stock market.

The possibility of a recession will be a "dark cloud" that will hang over the stock market for some time and affect investor confidence, said Hugh A. Johnson, economist with First Albany Corp. of Albany, N.Y.

Wall Street, he said, can look forward to a "trendless but quite volatile" stock market. "I see the Dow Jones industrial average trending lower around the 1700 level. It'll be a year with a downward skew."

Outside of Wall Street, where opinions have not been so severely colored by the market's plunge in October, some economists think a recession can be avoided.

Lyle E. Gramley, chief economist of the Mortgage Bankers Association here, forecasts modest growth for the economy, with improving performance in the second half. Gramley believes "the prospects are reasonably bright" that the nation can escape recession at least through next year.

But even the most optimistic forecasters note that the expansion that began in 1982 has been under way for a very long time by historical standards and is expected to run out of gas any time now.

Consumer spending, one of the main engines of the expansion, had begun to slow even before October, and the stock market slide has hampered it even further.

To analyze the consequences of the consumer slowdown -- and indeed the whole market slump -- economists can look at the same facts and draw opposite conclusions.

Henry J. Gailliot, an economist at Federated Research Corp. in Pittsburgh, believes the market collapse increased the probability of a recession to more than 50-50. The collapse was "superimposed on an old and extended business cycle." Whatever the economic outlook at the time of the market's fall, he said, the collapse "had to make it worse."

On the other hand, the stock market collapse may have been a blessing in disguise, Johnson of First Albany said.

"It caused a retrenchment of consumer spending that was very healthy," he said. "It pulled us back from a boom trajectory to a no-boom, no-bust trajectory. It increases the chance of noninflationary economic growth in 1988."

Gramley expressed a similar view. The collapse eased the upward pressure on interest rates that had been building through the early part of the year, he said, and lessened the prospects of a "gangbusters 1988" that would have led the Federal Reserve to a tighter money policy. Economic boom followed by tight money "tends to evolve into a recession scenario," he said.

In their "Where Do We Go in 1988?" statement, analysts at Merrill Lynch in New York, said, "The Oct. 19 stock market collapse hurt, but did not cripple the economy. We expect no recession in 1988. ... If the economy were to slip into recession, 1989 would be a more likely date than 1988."

As for the stock market, the analysts said, "We believe that 1988 will be positive for the stock market, but not across the board. The uncertainties that led to the bear market late in 1987 are likely to change, but not disappear in 1988. We expect one more test of the 1987 lows and a Dow Jones industrial average high of 2300 to 2400 for the year."

Amid such a wide range of views, when even professionals come to diametrically opposed conclusions based on the same data, what's an investor to do?

"Be careful," said Greg A. Smith of Prudential-Bache Securities, and look for trends that can provide opportunity -- especially in steel, aluminum, papers, chemicals and technology issues.

"The industrial sector does seem to be improving, and there is every sign that the improvement is likely to last for some time. We have to invest in that trend," Smith said.

John D. Connolly, chief investment strategist for Dean Witter Reynolds, declared, "Industrial America has risen from the dead."

He added, "Industrial-materials companies such as chemicals, papers and metals are at the forefront and have reestablished market leadership in the last few weeks. We now expect capital-goods companies to increase their relative market strength and believe that technology stocks will be full participants."

On the other hand, according to the Pershing Division of Donaldson, Lufkin & Jenrette Securities Corp., "Retail, consumer durables and service groups should be avoided."

Shearson Lehman Bros., now merged with E.F. Hutton, predicts a decline in interest rates through midyear and suggests that bonds and other fixed rate investments make good sense in that environment.

Economists in the housing field predict relatively stable interest rates this year, which will be good for home builders and other real estate interests.

James W. Christian, chief economist of the U.S. League of Savings Institutions, forecasts that new housing starts will total about 1.6 million in 1988, about the same as last year. He admits, however, that his estimate is on the optimistic end of the forecast range.

In an overall sense, the looming recession will have its own psychological impact on the market.

"This is going to be a fairly disappointing year in the stock market," said William C. Melton, a senior economist at IDS/American Express in Minneapolis. "It won't be disastrous but any money made in the first part of the year will be given back later. The stock market does not do well when it is focusing on economic weakness."

The Dow could trade in a range of 1800 to 2000, Melton said.

The psychology of the stock market, while not always measurable, is nevertheless a significant factor, most analysts said.

In recent days, as stock prices alternately raced upward and slid rapidly, Monte Gordon, research director at Dreyfus Corp., said the market was being affected by "the perception of volatility." Buyers step back from the market because they fear its volatility but their absence then contributes to more volatility.

The opening of 1988 has been disappointing to many investors and analysts who were hoping for a repeat of the "January effect," so-called because a climate of rising stock prices has often accompanied the opening of a new year. The January effect this year lasted only four trading days, and many technical analysts think the market is still too queasy to mount a sustained rally.

Mutual fund investors were recently advised that they were entering "one of the most dangerous years of the decade." The warning came from Jay Schabacker, author of the newsletter Mutual Fund Investing.

Schabacker said he looked for a 10 percent rise in the market this year but noted that many of 1987's fund winners "will be losers in 1988."

He added, "In 1988, we'll have two enemies to fight -- recession and inflation and the funds that protect against the one may be inappropriate protection against the other."

The volatility of the market does have its appeal, however -- for investors who like to take chances. For instance, some analysts see opportunities among companies that went public last year and promptly were demolished.

New issues as a group were among the biggest losers in the market crash. Standard & Poor's New Issues Index declined 27.6 percent between mid-October and Dec. 31 for a net loss of 13.9 percent for the year.

Since then, "new issue activity has come to a virtual halt," said Robert Natale of S&P. "... After years of outperforming the overall stock market, the new issues market is in a dismal state... . Many of these issues may not return to their original offering prices for months or even years to come."

But depressed prices present "extraordinary buying opportunities for investors with intestinal fortitude," he said.