There are plenty of great companies whose shares trade on the stock market, and investing in those companies for the long haul can be extremely rewarding. But those big gains don't always materialize overnight, so people who want to get rich quickly have recently turned their attention to some of the riskiest companies in the market.

Even the most aggressive investors tend to avoid buying shares of companies that have filed for bankruptcy protection, or appear likely to do so. Although a few lucky companies emerge from bankruptcy proceedings and go on to bigger and better things, nearly all of them end up worthless for their existing shareholders.

Below, we'll look at three stocks where many inexperienced investors are putting hundreds or even thousands of dollars into buying shares -- and will probably lose all of their money.

A pile of bundled U.S. currency in various denominations

Image source: Getty Images.

1. Whiting Petroleum

Whiting Petroleum (WLL) filed for bankruptcy protection on April 1. Since then, however, its stock has soared from $0.37 per share to $1.70 as of June 15. That's enough to give the oil and gas exploration and production company a market capitalization of $155 million.

Whiting was just one of the victims (there will inevitably be many) of the plunge in oil prices during the coronavirus crisis. Falling revenue from the sale of its energy production wasn't enough to maintain Whiting's extensive debt, prompting the bankruptcy filing.

As many companies do, Whiting had already worked with creditors to come up with a viable bankruptcy reorganization plan. Under that plan, it intends to issue new stock in the post-bankruptcy company to most of its creditors, amounting to 97% of its total outstanding shares. Whiting expects that it will repay some of its debt in full.

Unlike many companies, Whiting expects to have something left over for current shareholders. However, that portion will be limited to 3% of the equity in the new company, along with some warrants to buy additional shares at a currently unspecified price. Owners of existing Whiting stock aren't likely to recoup anything close to $1.70 per share, and prices for the oil company's bonds imply a much lower valuation for the new Whiting stock, when it's issued and replaces existing shares.

2. Hertz Global Holdings

Hertz Global Holdings (HTZG.Q) filed for bankruptcy protection on May 22. On the first day of trading after the announcement, Hertz stock plunged to $0.56 per share. Since then, it's traded as high as $6.25 per share, and it closed June 15 at $1.88. That gave the car rental company a market capitalization of $268 million.

Hertz fell prey to plunging demand for car rentals in the wake of travel restrictions during the COVID-19 pandemic. With debt linked to the value of its fleet of vehicles, Hertz had little choice but to declare bankruptcy to get protection from its bondholders. The company will need to sell off a portion of its vehicle fleet in order to raise cash to pay down its debt; that in turn is likely to cause used-vehicle prices to fall, further impairing the value of its collateral.

Shareholders, however, seem to believe that a full recovery in car and truck prices could save Hertz. That's highly unlikely, but Hertz is taking advantage of that sentiment by doing an unprecedented secondary stock offering while in bankruptcy. The car rental company has warned that the shares it's selling could well be worthless, but that isn't deterring would-be investors from thinking that Hertz will pull a rabbit out of its hat in the next couple of months.

3. Chesapeake Energy

Chesapeake Energy (CHKA.Q) hasn't yet filed for bankruptcy protection, but it's likely to do so within the next week, according to various reports. The stock traded at between $12 and $15 per share during the last part of May, but it jumped as high as $70 per share briefly on June 8 before falling back to around $19 as of June 15. That gives the energy company a market capitalization of $185 million.

Chesapeake's rise came amid a significant climb in oil prices, which seemed to give shareholders hope that the company might once again find a way to stave off creditors and preserve at least some value for the stock. Yet Chesapeake has already worked hard to sell off assets in an attempt to refinance its outstanding debt. Conditions for such sales are horrible right now, closing off a key strategy for avoiding bankruptcy.

If Chesapeake does move forward with seeking protection under Chapter 11, current shareholders aren't likely to get much. An eventual deal might give them a tiny slice of a post-bankruptcy Chesapeake, with a structure similar to Whiting's. However, it's likely that creditors won't accept such a plan, leaving existing shareholders with nothing.

There are better places to invest

Day traders are contributing to the volatility in these three stocks, with big swings in both directions. Long-term stock-market investors, however, shouldn't let themselves think that Chesapeake, Hertz, or Whiting are value plays. They're speculative stocks, and are highly likely to give shareholders big losses -- which could result in your losing everything you invest in them.