Donald Trump's presidency has been a gift to private prison stocks. For investors in gun stocks, it's been a disaster.

Shares of private prison operators The Geo Group Inc. (GEO) - Get Report and Corecivic Inc. (CXW) - Get Report have rallied more than 50% since the real estate magnate won the White House last November. Trump's victory however, has not translated so well for gun stocks such as Sturm Ruger & Company Inc. (RGR) - Get Report and American Outdoor Brands Corp. (AOBC) - Get Report , shares of which have declined significantly.

Boca Raton, Florida-based Geo has been among the most eyebrow-raising Trump stock stories of the past year. One of the private prison operator's subsidiaries gave $225,000 to pro-Trump super PAC Rebuilding America Now ahead of the election, and Geo gave $250,000 to Trump's inaugural committee, making it one of a number of corporations to give to the festivities. As The Washington Post recently noted, the company this year moved its annual leadership conference to the Trump National Doral in Miami.

And Geo's efforts have been rewarded. It's been awarded millions of dollars in new and renewed contracts for immigration detention facilities and according to the Post has brought on lobbyists with ties to Trump and Attorney General Jeff Sessions. Sessions in February reversed an Obama-era memo to phase out the Justice Department's use of private prison facilities.

Washington, D.C. watchdog group the Campaign Legal Center in June filed a lawsuit demanding the DOJ explain its reversal on the private prison phase-out. Geo owns or manages about 140 prisons, immigration-detention centers and other facilities nationwide and derives almost half of its revenue from federal contracts.

Image placeholder title

Shares of Geo jumped by over 20% the day after Trump's election and have rallied more than 50% since Election Day 2016. Corecivic shares soared more than 40% the day after the election and are up about 70% since November 8, 2016. Both companies' stocks have retreated slightly from mid-summer highs, but they're still well above where they were pre-election.

GEO spokesman Pablo Paez said in an email to TheStreet that the company does not "take a position on, or advocate for or against, criminal justice, sentencing, immigration enforcement or detention policies." He said the company's political and lobbying activities focus on promoting the benefits of public-private partnerships and its political contributions to super PACs apply to federal laws and regulations. "We're proud of our three-decade long partnership with the federal government under both Democrat and Republican administrations," he said.

He added that the Obama administration's directive to phase out private prison use by the DOJ was based on a "misinterpretation" of a government report. The data "actually demonstrated that privately run facilities are at least as equally safe, secure, and humane as publicly run facilities" he said.

Trump the law-and-order president has boded well for private prisons. Trump the Second Amendment president has not.

Shares of American Outdoor Brands have plunged more than 45% since Election Day, and shares of Sturm Ruger have declined about 20%. Turns out that when Americans feel more confident there's no legal threat to their ability to buy guns, they don't buy them.

Image placeholder title

Perhaps counterintuitively, gun stocks tend to do better when Democrats are in power and Americans believe there is a bigger risk of their ability to acquire firearms might be hindered. Sturm Ruger's stock rallied nearly 800% from President Barack Obama's 2008 election to Trump's election in 2016. American Outdoor climbed even more.

"Gun investors love Obama," read one January 2016 CNN headline, noting that Obama's unveiling of executive actions on gun laws caused firearms stocks to pop. (Shares of gun companies also climbed after the Las Vegas shooting in October on fears lawmakers might clamp down.)

President Trump in April spoke at the National Rifle Association's annual convention at Atlanta. "I am going to come through for you," he said.

The words may have been music to gun lovers' ears. Gun investors, not so much.

TheStreet's feature series "Inside Trump's First Year" looks at the biggest stories in business over the last year fueled by one of the most unpredictable presidents in history. Most importantly, TheStreet offers a glimpse into what could happen in 2018 on a range of issues -- and stocks -- in what will probably be an equally chaotic second year for Trump. Read more by tapping the photo below.

Image placeholder title

More of What's Trending on TheStreet: