Most people have been taught from childhood that following the horses leads only to the poorhouse. But what their mentors failed to mention is that clever application of the tax laws meant to encourage investment in other sectors can also be focused on racehorses. And now the Economic Recovery Tax Act has made such application even easier and more specific. Racehorse breeding is as respectable a tax-advantaged speculation as oil wells, cattle feeding, equipment leasing, and other shelters -- and it can be spectacularly profitable. A successful racehorse partnership can achieve returns of up to 200% a year, and an average return over the typical seven-or-eight year life of the partnership is apt to bring an average 20% per year after taxes.

Although thoroughbred horse breeding has been the subject of partnership structures for a number of years, only reeently has such rarefied investment been available to the average person. Earlier this year a syndication dealing with horse breeding began to sell limited-partnership interests to the public -- the first such program ever to be offered for general consumption. The partnership -- Hilliard-Lyons Thoroughbred Partners 1982-1 of (where else?) Louisville, Ky. -- aimed to raise a healthy $3.5 million, a pool that would go toward producing race entries for tracks around the world.

If nothing else, having a stake in horses can be fun -- certainly more so than boxcars. A limited partner can watch the flesh-and-blood issue of his investment train, run, and -- it is hoped -- win. But it is not through race purses that the most reliable payoffs come. Returns on racing, as on oil-well exploration, are spotty. Racehorses are expensive to maintain, and statistics show that a horse earns 56,970 a year on average -- far below the cost of upkeep. Only 5.6% of starters won more than $25,000 in 1980.

Rather, it is in breeding prowess that the best chances lie, counsels Brennan Reports, a tax shelter and tax planning monthly advisory service (P.O. Box 882, Valley Forge, PA 19482). A partnership invests in breeding mares, whose offspring are then sold, eventually to be raced. Racing, claims William G. Brennan, author of the newsletter, is steadily increasing in popularity not only here but throughout the world. Thus, sales prices for yearlings have been appreciating steadily. From 1976 to 1981, the average price appreciation was 22.2% -- well ahead of inflation.

The general partner buys brood mares, which themselves can appreciate on the market if their offspring chalk up good racing records. Brood mares are depreciated under ERTA just as if they were personal property with a five-year useful life. (The depreciation allowed is 15%, 22%, 21%, 21%, and 21%.) A breeding horse more than 12 years old is depreciated like a small truck -- over three years. (Horses, however, are excluded from the 10% investment tax credit. Go figure out the Internal Revenue Service.)

Most farms, says Brennan, achieve a 100% write-off. But leveraged financing can double the advantage. Some limited partnerships take notes for half the unit; the note is payable only at the dissolution of the partnership and therefore provides one-for-one leverage. The limited partner has the note guaranteed for payment, allowing the operator to borrow against it to cover costs.

But it is not so much the tax structure that is attractive. Rather it is that purchased horses can be resold for substantial capital gains. Money from the sales of yearlings, however, is considered ordinary income, because the yearlings are inventory. And some states, anxious to keep the sport active because of the tax return it brings, encourage breeding by cutting breeders in on shares of purses. So there is also increasing ordinary income.

So far, the cost of this investment opportunity comes high, averaging $35,000 per unit. But if public partnerships catch on, undoubtedly the cost will drop.

One problem Brennan points out, is that it takes a mare the better part of a year -- 345 days on average -- to produce a foal. Since offspring are generally not sold until they are a year old (the 1981 average price of a yearling was nearly $21,000, although one was sold this summer for about $4 million) and because only 70% of mares achieve successful births, production of profits can lag well behind traditional investing. Even so, the idea of seeding racehorses out of one's own pocketbook can be appealing. But, Brennan warns, as with any high-yield speculation, the inexperienced can be easily exploited. Diversify your investment, he suggests, among various horses and, if possible, among various operators. Some other advice from Brennan:

* Make sure the sponsor has experience enough to deal with a farm directly, rather than through a middleman.

* Determine the returns to partners in prior deals.

* Determine whether the sponsor has repeat customers -- a sign of good performance.

* If financing is involved, determine whether it is legitimate or "fictional" (payable to a relative or affiliate simply to jockey the books).

* Avoid sponsors who are breeding for their own accounts; it may be legitimate, but it is apt to raise a costly conflict of interest.

* Don't get involved with stallions -- they are a glut on the market.

* If the operator owns the stallion, what is the stud fee? You should watch out for overcharging.

* Approximately 85% of your investment should go toward operations. An annual management fee of 5% is appropriate, with the rest going toward expenses and start-up costs.

Brennan's last precaution is perhaps the wisest of all: Don't invest unless you seek enjoyment from the venture -- that may be your only return.