This two-part series will be devoted to the twists and turns in the rules that govern sales of investments to “related parties” (Internal Revenue Code Section 267).

In most cases, the tax code allows an investor to claim losses on her investments when she sells them. But I remind investors about Section 267, which generally disallows losses incurred by an investor on sales to related parties.

How Section 267 defines an investor’s related parties. They can be her multi-generational family members, including her spouse; her children, grandchildren, or great-grandchildren; her parents, grandparents, or great-grandparents; or her siblings (including half-siblings). They may also include companies in which she owns more than 50 percent of the stock, trusts, or partnerships, depending on her relationship with the entities.

The rationale for the restrictions imposed by Section 267. Our lawmakers crafted them to block transactions that merely reshuffle property to avoid taxes.

Involuntary sales. An investor might frown when you explain that it’s possible for her to run afoul of the related-party rules even when she makes the sales involuntarily. For instance, that can happen when a family member forecloses a mortgage on her property, or when she sells stock through a public stock exchange and a related party purchases stock in the same company.

Some important exceptions to the rules can help. Investors will be happy to know that one perfectly legal strategy is to sell to a “nonrelated” relative. For example, the rules don’t apply to losses suffered by an investor on investments that she sells to in-laws, such as a brother-in-law. This holds true even if she and her spouse file a joint return.

This is an often-overlooked strategy worth noting if, say, the value of the investment has declined drastically, and she wishes to realize some of her paper loss.

I would caution an investor to be mindful of another set of restrictions, known as the “wash sale” rules (Code Section 1091). Under those rules, an investor’s loss on a sale of an investment is currently deductible only if the repurchase takes place more than 30 days after––or before––the sale.

All an investor needs to do is sell the stock at the market to an in-law with whom she enjoys a good relationship. This will keep the benefit of a future upturn within the family, while she claims her loss.

IRS audits. An investor may forfeit the write-off for her loss if an IRS examiner concludes that she made the sale solely for tax purposes. And she should be prepared to back up the sale with evidence of a fair-market payment from the in-law and delivery of the stock into his or her name.

What’s next. Part two will focus on when a disallowed loss can be salvaged.