In the world of investing, the story of the last 12 or 15 years could well be titled "The Rise and Fall of Tax Shelters."

True tax shelters, of course, have been around for years, but until recently they had remained the exclusive property of the wealthy -- out of the reach of the ordinary Joe or Jane, who was too busy trying to make a living to spare the time, much less the money, for such toys.

But then promoters got the idea of packaging tax shelter deals and selling little pieces of them to a bunch of small investors, much on the order of what mutual funds had been doing with diversified portfolios of market securities for years. Their timing coincided with -- and perhaps was prompted by -- the emergence of a new class: two-income professional families with increasing amounts of discretionary income and increasingly painful income tax bills.

The concept was sound. Get a hundred investors to come up with $10,000 each, then use the million dollars (after taking out a chunk for the promoter's troubles) as a down payment on an office building or a housing development or an oil drilling project.

There might not be much positive cash flow for a while -- but there are such things as interest expense, depreciation and depletion to provide tax writeoffs for the investors, which turned out to be just as good as dollars in the pockets.

The vehicle developed to market the concept was the limited partnership. "Limited" because the investing partners had no liability beyond their investment. "Partnership" because that form of organization made it possible to pass through expenses and losses for each individual partner to claim on his or her personal income tax return.

This new investment concept took off, and demand soon outstripped the supply of reasonable investments. So new concepts were developed to meet this seemingly insatiable demand. The inventory soon included packages like freight cars, computers or heavy machinery bought for rental, lithographic print masters, postage stamp plates from little-known countries, cattle raised for market, etc., etc.

Unfortunately, many of these ideas had little or no economic merit, but were devised solely to provide tax havens -- often promising to save the investor more in tax dollars then he or she was investing in real dollars. As might have been expected, this aroused the curiosity of the Internal Revenue Service -- and their aggressive pursuit of sham investment schemes slowly began to erode the popularity of the more exotic tax shelter ideas.

The Tax Reform Act of 1986 introduced a more serious brake in the form of a general rule that limits deductions and credits generated by passive business activities (activities in which the taxpayer does not materially participate) to the extent of income from passive activities. This rule means that those paper losses may not be used to offset other income, such as wages, dividends or interest.

Is this the end of tax shelters?

Tax reform did put a damper on enthusiasm -- but tax shelters certainly can't be interred in the cemetery of ideas that have outlived their usefulness. Those investments that have economic value over and above their tax-reduction elements will continue to have a place in the financial world. And there remains some tax utility, too.

In the first place, the new rules are not immediately effective, but instead are phased in over a four-year period for investments owned on or before Oct. 26, 1986. (For passive investments made after that date, the restrictions apply immediately.)

Thus, for the 1987 tax year, you may claim 65 percent of the previously allowable deductions on shelters that predate Oct. 26, 1986. The rate drops to 40 percent for 1988, 20 percent for 1989 and 10 percent for 1990. The new rules are fully effective on all such investments beginning with the 1991 tax year.

If you have passive income from other investments, deductions and credits from "losing" tax shelters may be used to reduce that income. (Interest and dividends from stocks, bonds, mutual funds, etc., constitute "portfolio income" rather than "passive income" and cannot be sheltered by writeoffs from passive investments.) Unused deductions and credits may be carried forward to future years for possible pairing with passive income in those years.

Gas and oil partnerships were hit somewhat less severely than other tax shelter investments. Pass-through deductions in working interests may be used to offset unrelated income like salary or dividends by an investor whose form of ownership doesn't limit liability. And intangible drilling costs continue to be deductible in the year incurred.

Capital gain on eventual disposition of any shelter investment will no longer receive the 60 percent tax exclusion previously provided for long-term gains. And any necessary recapture of intangible drilling costs and depletion previously claimed will be at ordinary income rates on disposition.

Equipment leasing has been affected somewhat more by the new tax law. Deductions and credits in this area of investment are considered passive losses; an excess of deductions over income may not be used to offset other income, but may be written off only against passive income.

In addition, new rules governing depreciation may require substantially longer recovery periods than in the past, reducing the annual expense element -- although in the long run, of course, total depreciation will be the same. Where accelerated depreciation may provide financial benefits, in some cases exposure to the expanded alternative minimum tax may reduce its attractiveness.

Investments in real estate fall into two categories. If you put your money into a limited partnership that invests in any type of real estate operation, you are not an active participant, and are governed by the passive income rules. Losses, deductions and credits are usable only to offset income from other passive investments (either in the current or future years) and are not available to reduce income from other sources.

However, if you actively participate in management of the property, up to $25,000 of losses may be taken each year against nonpassive income (though even this benefit phases out for taxpayers with incomes above $100,000). Thus, personal ownership and management of real estate may still be thought of as a tax shelter (at least up to the $25,000 annual ceiling), while ownership of limited partnership shares in property managed by the general partner loses much of its tax appeal.

You may employ a real estate agent (or other person) to manage the property and still be considered an active participant. The extent of your participation in management requires a case-by-case examination of the facts. Generally, however, the IRS will consider you an active participant if you have responsibility for such things as selecting prospective tenants, establishing rental rates, approving major repairs, etc.

All real estate investments, whether personal or in partnership form, are affected by the new rules for depreciation. Instead of the former 19-year basis allowed for rental real estate, new investors must use a 31.5-year period for commercial property or 27.5 years for residential property.

If you now participate in any form of passive investment that runs afoul of the new rules, what can you do?

It probably will not make sense to sell -- there never was a great market for resale of existing shelters, and the new rules have pretty much wiped out what little market there was.

Assuming you have the cash, the step that makes the most sense is to put some dollars into a counterpart investment that is generating passive income, against which the passive losses can be applied. That way you will have some tax-protected income and will avoid wasting the tax deductions and credits for which you bought into the first investment.

So far, this article has dealt with those investments that are generally conceived of as "tax shelters." Actually, however, a tax shelter is any investment that can provide a legal reduction in your tax liability.

In that sense, an IRA, Keogh or 401(k) retirement plan, a single premium annuity, Series EE savings bonds and municipal bonds are all tax shelters. In fact, even during the heyday of limited partnerships, these other tax shelters made a great deal of sense for many. They make even more sense now.

If your employer offers a tax-deferred pension or profit-sharing plan, consider it very carefully. An IRA or Keogh account offers outstanding tax savings for those who are eligible. And while annuities and savings bonds generally must be bought with after-tax dollars, the tax-deferred accumulation of earnings compounds the growth to make substantially larger returns possible in the long run.

The historically small current differential in rates between tax-free (municipal) bonds and corporate bonds of comparable quality makes tax-frees the preferred investment for many people in the 28 percent or 33 percent tax bracket (1988 rates).

Although here, too, you invest after-tax dollars, federal income tax liability on the interest is not simply deferred, it is nonexistent -- though you can be subject to the alternative minimum tax, which we'll get to in a minute. If you buy bonds issued by your home state, they are usually exempt from state income tax as well.

One of the better long-term tax shelters -- one not usually thought of in those terms -- is owning your residence. First, if you itemize deductions (and most homeowners with large mortgages will itemize, despite the new increase in the standard deduction), Uncle Sam will subsidize a part of your mortgage interest and property taxes by way of a deduction. The roaring increases in home values of the past decade are not expected to continue. But resale prices are likely to keep going up, probably at a rate a little better than inflation. That increase in value will not be subject to tax until you sell your home.

Even then, you can postpone tax liability by buying a replacement residence that costs as much as or more than the selling price of the old homestead. And if you hang in there until you reach age 55, you can elect to exempt permanently from federal income tax up to $125,000 of the gain.

If you are a high-income taxpayer, you must consider the possible significance of the alternative minimum tax (AMT) on any tax-sheltered investments.

The AMT was made a part of the federal tax structure to ensure that a person with a large income that has been sheltered from tax, in full or in part, by what are called "tax preference" items doesn't avoid tax completely.

The list of tax preferences is fairly long. Some of the items particularly relevant to this discussion include investment interest and passive losses allowed under the four-year phase-out provision; excess accelerated depreciation and depletion allowances; excess mining exploration and development deductions; and the amortization deduction of intangible drilling costs on oil and gas properties in excess of 65 percent of net income from those properties.

Where does this thoroughly confusing picture leave you? Tax shelter investing was always an area that required a great deal of care and knowledge -- although, unfortunately, many investors jumped in cold. Under the new -- and at least equally confusing -- rules, even more care is necessary.

Tax-deferred retirement plans should be the first choice of most people eligible for any of the various types. If you're looking for a place to put after-tax dollars, the unsophisticated investor should be looking at municipal bonds, Series E bonds or tax-deferred annuities. Only those who have the time and inclination to study and the ability to understand the world of traditional tax shelters should be considering investing their hard-earned dollars in that market.