Johnny Carson set the tone last Christmas by saying he hoped that 1988 would be better than 1929. And after the Oct. 19, 1987, stock market crash, it did seem, what with savings and loan and bank failures rampant, that the mattress would be the best place to put your money in 1988.

It was a year when investors simply refused to take risks. Gun-shy, they sat on their money, keeping it in cash or government bonds in anticipation of a recession that didn't come."Everybody was waiting for a recession in 1988 after the market break," said Monte Gordon, research director for the Dreyfus Corp. "Prices started out on the perception there was going to be a recession, but it didn't happen."

Caution, cash safety and mistrust are what investors are talking about for 1989 as well.

Marylin Thypin, a manager for the Thypin Steel Co. in Long Island City, N.Y., thinks that the stock market is "a crapshoot." Thypin says that she considers herself a very conservative investor. She is putting her money into tax-free municipal bonds.

"I don't want to pay taxes and I would need a 12 percent taxable investment to make what I am making on the bonds," Thypin said. "Even my mutual funds are in tax-exempt mutuals."

Cash was the investment of choice in 1988 - so much so that almost $120 billion is sitting in money market funds now, and billions more in pension funds, according to Wall Street market strategists.

But despite dire expectations, the stock market did relatively well in 1988. It was up about 12 percent for the year, according to both the Dow Jones industrial average and Standard & Poor's 500 Index. Not bad, compared with the Dow's historical average of 9 percent to 10 percent annual gains.

The average equity mutual fund gained 12.24 percent through Dec. 22, according to a study of 1,001 such funds by Lipper Analytical Services Inc.

John Connolly, senior vice president for investment policy at Dean Witter, said that stocks moved up for several reasons: "Nothing happened after the crash. We didn't have a recession and the economy kept growing at a nice pace. Earnings were up almost a third and prices were low, so there were good price-to-earnings ratios."

A few individual investors maintained faith in the market. Jonas Javna, a retired cantor in New York city, invests on his own, following the technical signs in the stock market. "The economists are usually wrong 15 times out of 10," he said. "The less attention you pay to those people, the better."

In fact, despite the worry about Black Monday, the broad stock indexes outshined many other investments in 1988.

The bond market remained flat. The 30-year Treasury bond started the year with a yield around 9 percent and ended about the same place, with perhaps a 1-point swing in between.

Gold, a popular inflation hedge, was shining after the stock market crash, but the metal soon after began falling steadily. Republic National Bank was quoting gold at $486.25 an ounce on Dec. 31, 1987. Republic's price on Friday was $410 - a drop of almost 16 percent for the year.

Platinum - more thinly traded but more expensive - performed spectacularly during the first half of the year. It rose from slightly more than $500 an ounce to $640 in June. Prices fell back slightly until mid-December, when Ford Motor Co. announced that it was testing a catalytic converter that uses little or no platinum. Converters, which cut auto emissions, account for about one-third of platinum consumption. Presto! Platinum prices plummeted, and finished the year about where they started it.

Oil rode an international roller coaster as the Saudis tried to bring OPEC members into line on production quotas. In December 1987, a barrel of West Texas Intermediate, the benchmark U.S. crude, sold for $16.70, which is about where it is today. But in between, oil prices rose as high as $18 a barrel in April and sank as low as $13 in September.

Did real estate underperform the stock market? The answer is a qualified "yes."

"You have to say, which real estate market?" said Jim Christian, chief economist for the United States League of Savings Institutions. "The trouble with housing is that it isn't one national market but all these local markets, and it is hard to measure against standardized markets."

And, of course, real estate is different in another important way: You can't live on Wall Street.

Throughout the year, the cash piled up. New York-area banks were paying top yields of about 7.7 percent on six-month certificates of deposits a year ago. Today, the top yields are about 8.6 percent.

Where that money will be invested is the big question for 1989.

"Cash is going to come back" into the market, said Jeffrey Applegate, market strategist for Tucker, Anthony and R.L. Day. "Certainly some portion of it has already come back into the latest strip (shopping) mall and the old masters."

Applegate and others point out that the supply of equities available for purchase has shrunk.