In the spring of 2012, Congress passed, and President Barack Obama signed into law, the Stop Trading on Congressional Knowledge Act — or the "Stock Act" for short. It was in response to a "60 Minutes" report in 2011 that documented examples of insider trading by legislators and pointed out that it was perfectly legal for them to make trades based on information they received in, say, private briefings — information not available to the rest of us. The vote was beyond lopsided: 96-3 in the Senate and 417-2 in the House.

Eight years later, not a single member of Congress has been prosecuted under the Stock Act. True, former Rep. Chris Collins of New York went to prison this year for insider trading, but in that case, Collins leaked news to his son about a failed drug test by a biotech company on whose board he sat. His was the kind of insider trading more commonly seen on Wall Street, and he would have been prosecuted even without the Stock Act.

Most lawmakers don't sit on corporate boards, but they do have access to enormous amounts of material nonpublic information — information that is not specific to one company but which nonetheless can lead to profitable stock trades if they choose to take advantage of it. And since the onset of the pandemic, trades by several lawmakers have raised deep suspicions.

For instance, four senators made significant stock trades after lawmakers' started to receive briefings about the threat of the coronavirus but before markets started to sell off in late February. In May, the Justice Department told lawyers for three of the senators — Kelly Loeffler of Georgia, James Inhofe of Oklahoma and Dianne Feinstein of California — that it was closing the investigation. (All three said that the trades were made by their investment advisers without their knowledge.)

The fourth senator, Richard Burr of North Carolina, sold as much as $1.7 million worth of stock on Feb. 13 after receiving a series of briefings on the pandemic in his role as the chairman of the Senate Intelligence Committee. (He has since stepped down from the chairmanship.) The FBI served him with a search warrant and seized his mobile phone in May. But the investigation, if it is still continuing, has been eerily quiet.

And then there's David Perdue, the Georgia Republican who, along with Loeffler, is in a crucial runoff that will decide whether the Senate remains in Republican hands. On Wednesday, the New York Times published an article documenting Perdue's astonishing stock trading; according to the Times, he made as many as 20 trades a day, for a total of 2,596 trades during his six-year term — "roughly equal the combined trading volume of the next five most active traders in the Senate." One can't help wondering how he found time to legislate in between all that buying and selling. (A Perdue spokesman told the Times that his investment advisers "handle the day-to-day decisions of his portfolio.")

Perdue bought and sold the stock of FireEye, a cybersecurity firm, while he sat on a cybersecurity subcommittee. Perdue was a member of the Senate Banking, Housing and Urban Affairs Committee. He traded shares of JPMorgan Chase & Co. and Bank of America Corp. Before winning his Senate seat, Perdue was a director of Cardlytics, a financial analysis firm. Six weeks before its founder announced he was stepping down as chief executive, Perdue sold more than $1 million worth of stock.

"After the company's stock price bottomed out in March at $29," the Times reported, "Mr. Perdue bought back a substantial portion of the shares that he had sold." (The stock is currently trading at about $120; the Justice Department closed an investigation into Perdue's well-timed sale of Cardlytics stock over the summer.) In April, after the initial wave of negative publicity about his stock trading, Perdue sold all his stocks except those companies on whose boards he once sat — including Cardlytics.

What has become clear is that if all this trading is legal, then the Stock Act is toothless. Lawmakers should be avoiding even the hint that they are profiting from inside information, regardless of whether they say they aren't involved in the trading decisions.

The problem, for starters, is that legislators are so inundated with information it can be difficult to separate out what is private information and what is public. More pertinent, the Constitution's "speech and debate" clause confers a certain degree of immunity for anything a lawmaker does in the course of their legislative duties. Receiving a private pandemic briefing certainly qualifies as a legislative duty.

According to Forbes, if Burr can legitimately claim that he used his phone for Senate business, a judge could well rule that prosecutors had no legal right to seize its content. In an earlier case, Forbes reports, "the D.C. Circuit found a search of a legislator's office (as part of a bribery investigation) violated the Clause, because it included legislative materials and interfered with legislative business."

It's probably never going to be possible to amend the Stock Act to make insider trading by legislators a clear-cut crime. The Constitution — and the broad interpretation of the speech and debate clause by the courts — will most likely always trump efforts to prosecute cases.

Making sure trading is fully above board will require measures that are a lot blunter. A few years ago, Sens. Jeff Merkley of Oregon and Sherrod Brown of Ohio wrote a bill that would force members of Congress to either sell or freeze their stock holdings. It has since been co-sponsored in the House by Rep. Alexandria Ocasio-Cortez of New York and several other progressives.

Another approach might be to forbid legislators from owning stocks in any company overseen by their committees. That would mirror the approach taken by most federal agencies; for instance, employees of the Food and Drug Administration can't own stock in pharmaceutical companies. A third approach would be to allow stock sales only during certain predetermined windows — such as when Congress is not in session.

None of these potential remedies are perfect, but any of them would work better than the Stock Act. Of course, there is one other possible remedy. During his re-election campaign, Perdue has been hammered by his Democratic opponent, Jon Ossoff, over his stock trades. So has Loeffler by her opponent, Raphael Warnock.

There are few things senators care about more than keeping their jobs. If Perdue and Loeffler lose theirs, maybe that will be the example the rest of them need to keep their stock trading above reproach.

Joe Nocera is a Bloomberg Opinion columnist covering business. He has written business columns for Esquire, GQ and the New York Times, and is the former editorial director of Fortune. His latest project is the Bloomberg-Wondery podcast "The Shrink Next Door."