Hedge funds and portfolio managers often have sophisticated needs when it comes to dealing with capital gains taxes and keeping them to a minimum, and one of the wrinkles they need to deal with is a constructive sale.

Constructive sales are created when a security is sold short at the same time that the taxpayer owns one or more appreciated long positions or substantially identical securities. There are many combinations of transactions that can qualify as a constructive sale. Section 1259 of the Tax Code forces taxpayers to recognize gains as if they sold or covered their previously open, appreciated position.

“The whole concept of capital gains taxes has always been based on the idea that until you sell your property you don’t pay taxes on it,” said G2 Fintech CEO George Michaels, whose company sells tax analysis and compliance software. “This 1997 rule, the constructive sale rule, Section 1259 in the Tax Code, is the first exception to that general extremely important principle, because when you short sell something, you haven’t disposed of it and you haven’t gotten any money for it.”

The proceeds typically reside in a special brokerage account to which investors usually don’t have access. “Precedent after precedent in the Tax Code said that if you don’t have access to the funds, you haven’t sold it, you don’t have a profit, and you don’t pay taxes,” said Michaels. “The constructive sale rule says, ‘Yeah, yeah, yeah, we know all that, but still you’ve got to pay tax.’”

He pointed out that there are various complex exceptions to the rule where a taxpayer may be able to argue that the short was intended to function as a hedge. “But in the simple case if you hold it long and you sell it short you have to pay taxes as if you really sold it,” said Michaels. “The reverse is also true. If you have a short position and instead of covering that short, you buy long, that’s also a constructive sale. My nomenclature for that is a constructive purchase instead of a constructive sale, but it’s still governed by Section 1259, the constructive sales rule, which says that if you have two opposing positions, one long, one short, and the first of the two had some unrealized gains on it, at the point that you did the second one, you have to realize those gains and pay taxes.”

The constructive sales rule emerged after reports surfaced in the mid-1990s that wealthy investors such as Estee Lauder’s heirs were abusing a loophole in the Tax Code.

“There’s a provision in the Tax Code that says when you die, if you hold securities, the cost basis of the securities is increased, and you get a free step up in the cost basis if your heirs sell the property,” he said. “When your heirs go to sell those shares, they would much rather have a higher cost basis because the higher cost basis means lower capital gains, and lower capital gains means lower capital gains taxes. So the cost basis step up at death is a huge benefit for the taxpayer who just died—well, for their heirs, but I guess not for the person who died.”

The Estee Lauder family was using this mechanism, he noted. “They wanted to get rid of the shares, but the estate hadn’t finished going through probate, so what they did in order to lock in the gains is that they sold all their shares short,” said Michaels. “They sold the shares short and were waiting until the estate went through probate and the cost basis step up before really selling them. And that made headlines that basically said, you know, incredibly wealthy family is using a loophole to dodge estate taxes. Anytime you get headlines like that, Congress loves it. You’ve got a whole bunch of people standing up on their soapboxes saying, ‘Oh, these loopholes for rich people, they’re awful, and we’ve got to change them.’ So in the 1997 tax reform act, Bill Clinton and Newt Gingrich’s Congress got together and said let’s close this loophole. And they did, and the constructive sale rule came into place.”

However, the problem then emerged for hedge funds and mutual funds that do trades all the time, sometimes with multiple portfolio managers managing the same funds. “Nobody has the time to look through 10 million transactions in an Excel spreadsheet, so you need software to go through and check that in any point in time that there’s both a long and a short of the same stock at the same time, whether or not a constructive sale occurred,” said Michaels. “That’s what our software does, and it’s a great asset for places that have high volumes of transactions and don’t particularly want to pay by the hour to have somebody comb through all those trades in an Excel workbook and look for constructive sales. Our software automates that process of checking for contemporaneous longs and shorts of the same security.”

G2 Fintech’s software also looks for extra complexities such as opposing swaps, options, wash sales, straddles and other derivatives. “We have a bundle of software that simultaneously can scan all of the trade activity for a fund and look for all of these things,” said Michaels.

In addition to hedge funds, accountants who specialize in wealth management for high net worth clients also need to worry about constructive sales.

“When it comes to private wealth management you can have very high volumes of trades that affect a wealthy individual that has a team of guys managing his money,” said Michaels. “In the family office and private wealth space, this problem is every bit as real as it is in the hedge fund space. It’s not an esoteric area that only applies to certain types of hedge funds. Constructive sales, wash sales, straddles, all these things apply to anybody who is messing around with short sales or derivatives.”