Holding a long and short position is often called “shorting against the box”. Back in the day, this was used as a tax avoidance strategy. However, in 1997, congress passed the Taxpayer Relief Act which, among other things, nullified these tax advantages.
There isn’t any direct SEC or FINRA rule against holding both long and short positions. However, it’s eyed with suspicion. The current ‘conventional’ wisdom is there’s little reason for holding a long and a short position simultaneously. One could always simply hold the net difference? Furthermore, because of shorting fees, the cost would be higher than just holding the net difference. The thinking is, if one could accomplish the same ends with less cost by NOT holding both long and short then the trader must be doing something maybe less than legal. Because of this, most, if not all US brokers won’t allow a retail traders to be both long and short simultaneously. They don’t want to run the risk of being involved with any activity which even hints at being improper.
What could be improper? There are currently a number of SEC rules around short sales. One is Rule 201 (Alternative Uptick Rule). This restricts the buying short certain stocks under certain conditions. If one held an equal amount of long and short they could circumvent this rule. How? If there were a short sale restriction in place, a trader holding both long and short, could sell their long shares which would have the net effect of increasing their shorts which is not the intent of this rule. That’s just one example.
This is a restriction brokers place on retail traders but isn’t necessarily applied to Market Makers and institutional investors.
Hope that helps?