The Securities and Exchange Commission on Wednesday hit Morgan Stanley with a $5 million penalty resulting from violations of Regulation SHO, the agency’s regulations governing short sales.

Reg SHO generally requires firms, including broker-dealers, to aggregate their positions in a security to determine if they are “long” or “short,” and that sales only be marked long when the seller is deemed to own the security being sold. The SEC cited this as a practical example: “If a broker-dealer has a long position of 1000 shares in ABC stock and one trading desk sells 500 shares of ABC, the broker dealer’s long position would decrease to 500 shares. Then, if a different trading desk sells 1000 shares of ABC, the broker-dealer would have a short position of 500 shares.”

As laid out in the SEC’s order, “Morgan Stanley hedged synthetic exposure to swaps by purchasing or selling the securities referenced in the swaps, and it separated its hedges into two aggregation units—one holding only long positions, and the other holding only short positions.” Morgan Stanley was able to sell its hedges on the long swaps and mark them as “long” sales without concern for Reg SHO’s short sale requirements, the SEC said.

The order finds Morgan Stanley’s “long” and “short” units failed to qualify for a Reg SHO exception permitting broker-dealers to establish aggregation units because they were not independent and did not have separate trading strategies.

“Market participants cannot disregard the rules of the road established by Reg SHO for all short sales,” said Daniel Michael, chief of the SEC’s Complex Financial Instruments Unit. “For many years, Morgan Stanley has improperly relied on Reg SHO’s aggregation unit exception, resulting in orders being mismarked for countless transactions.”

Morgan Stanley neither admitted nor denied the findings. In settling, the firm consented to a cease-and-desist order imposing a censure.

Also on Wednesday, Morgan Stanley received a separate $5 million fine from the Commodity Futures Trading Commission for failing to comply with swap data reporting obligations. The CFTC alleged Morgan Stanley “inaccurately reported swap data for at least approximately 3 million swaps” since the end of 2012. Morgan Stanley must retain an outside consultant as part of remediation per its settlement with the CFTC.