In a spectacular reversal of previous trends, bonds outperformed all other investments during the past 12 months, according to Salomon Brothers' annual survey.

Had an investor bought corporate bonds in June 1981 and sold them a year later, he or she would have earned 11.4 percent on the money invested. That is a better return than on any of 13 other investments analyzed. Moreover, bonds alone outpaced inflation, which climbed at an annual rate of 6.6 percent.

Two years ago, gold and silver headed Salomon's list of investments; in 1981-82, they ranked dead last. Apart from stock, last year was still the heyday of collectibles, such as Chinese ceramics, Old Master paintings and U.S. stamps. But the market for antiques, like commodities, has collapsed because investors cannot afford to finance speculative purchases at current interest rates.

The reason bonds proved to be the best investment last year is because they were the among the worst in the preceding period, placing 12th out of 15. Bond prices, which move inversely to interest rates, reached record lows this past winter, but then recovered.

For example, an AA- or AAA-rated corporate bond paying 15 percent that was purchased at par, or 100, at the beginning of June had sunk to a market value of 87.75 by January as interest rates went to 17.1 percent.

When interest rates retreated to 15 1/2 percent in June, the value of the bond went back up to 95.97. The investor's total return of 11.4 percent, including reinvested dividends, came entirely from interest, not capital gains.

According to Donaghue's Money Fund Report, the effective average annual yield on taxable money market funds in the same period was 15.61 percent. The Salomon Brothers index does not include money market funds.

Oil, which has proved to be the best investment over the past decade, failed even to keep pace with the cost of living last year. And the return of 3.4 percent on housing as an investment was less than half what it was the previous year.

Prices of investment grade diamonds also have plunged to half their peak level, but since the Salomon Brothers index tracks only uncut stones, the roller-coaster effect of diamond prices does not register.

In two years, the financial climate has shifted away from one favoring investments in objects of value to one favoring financial assets--but not all financial assets.

Although inflation has declined and savings and investment incentives have been increased under the Reagan administration, sustained economic growth and improved productivity have not materialized. Stocks, which had rallied to second place on the 1980-81 index, dropped to 10th place last year.

As for the future, Salomon said "the enormous amount of corporate debt outstanding combined with the high real cost of carrying the debt, is causing erosion of return available to equity. And, therefore, the growth of earnings and dividends will generally not be sufficient to allow stocks to be competitive with prevailing or anticipated interest rates."

The firm comes to the conclusion that even with their dismal long-term record, bonds in the short term are the best bargain.

"To the extent that volatility represents an important element of risk," said Salomon, "all investment vehicles have become more risky."