Stocks may have pulled back some from all-time highs, but the S&P 500 is still up for 2020. That's incredible, considering the ravaging effects of the coronavirus pandemic on the economy. But the disparity between the economy and the stock market leads some to believe we're experiencing a bubble just waiting to pop.

As with most things, it's debatable whether we're actually in a bubble. But here's something less debatable: There are great companies whose stocks are down for 2020, and they could be opportunistic buys, especially if you're looking for relative bargains.

For three examples, let's consider Magnite (MGNI -3.66%), Planet Fitness (PLNT 1.80%), and WEX (WEX -1.20%).

^SPX Chart

^SPX data by YCharts.

1. Magnite: The third name's the charm

Generally speaking, when stocks fall, it's an indication that something is broken with the business. That's why investing in losers is often a losing strategy. But with Magnite, the business isn't broken; positive long-term trends are accelerating, as we'll see in a moment. In this case, there isn't really anything significantly wrong with Magnite's performance. I wonder if the stock is slipping under Wall Street's radar simply because of the exhausting name changes the company keeps invoking. Just this year, Telaria merged with The Rubicon Project and then became Magnite. It's hard to keep up.

Magnite is an advertising-technology company with operations in mobile and desktop. But connected TV (CTV) is the company's promising growth engine. TV viewers worldwide are cutting the traditional pay-TV cord at a record pace. But advertising still happens in CTV, relying on new technology to get the job done. There are several layers of ad-tech, but supply-side platforms (SSP) -- also called sell-side platforms -- like Magnite are vital to the equation. SSPs are used to coordinate and manage the supply and distribution of ad inventories. And being the largest independent SSP means companies can choose Magnite's scale without fearing a conflict of interest. 

In the second quarter of 2020, Magnite's CTV revenue was up 12% year over year. This came while companies were cutting back on ad spend. But from July through the first week in August, CTV revenue was up a whopping 50% and was expected to stay strong through 2020 with increased spending for political ads. Revenue growth needs to be sustained over the long haul to make Magnite a good investment. But right now, the stock trades at just four times trailing sales -- a rare bargain in this market.

A mostly empty gym scene features a rack of free weights in the foreground.

Image source: Getty Images.

2. Planet Fitness: The biggest pullback ever

Planet Fitness had its initial public offering (IPO) in 2015 and was up four times in value before the market crash earlier this year. This year started well, with shares up over 15% in the first two months. But then the coronavirus shut down gyms, and the stock tumbled. Furthermore, an exercise-at-home trend has emerged, with companies like Peloton thriving in what's called the "new normal," leading investors to question if Planet Fitness is on the wrong side of where things are headed.

There are over 2,000 Planet Fitness locations, each housing dozens of options on workout machines and free weights -- a sharp contrast to the limits of most home gyms. And instead of catering to bodybuilders, the company targets those who don't belong to gyms or just visit them on a casual basis, a much larger demographic. Starting at $10 per month, this is the brick-and-mortar gym-chain leader for scale, addressable market, and affordability. 

To be sure, social-distancing initiatives hurt Planet Fitness, and a second wave of lockdowns would be a devastating setback. But for now, almost 1,500 locations have reopened, and the company only lost 4.5% of members while gyms were closed. The business is primarily franchised, elevating the importance of the financial health of the franchisees. To that end, the company's CEO said that as of Q2, no franchisee had expressed any need for financial assistance to weather the storm.

If the worst of the pandemic is now over, then Planet Fitness and its franchisees survived while some of their competitors went bankrupt. The company intends to open hundreds, if not thousands, of additional locations long term, and this plan could accelerate with less competition. Furthermore, I believe gyms will stay relevant even with improving options for exercising at home. Down over 30% from 52-week highs, this is actually the biggest pullback Planet Fitness stock has ever had, meaning you might want to pick up some shares before the business rebounds. 

A green stock chart inside a bubble which is about to be popped by a needle in the hand of a businessman.

Image source: Getty Images.

3. WEX: Looking past the present triple whammy

WEX is a niche payments network operating in three segments: fleet, travel, and health. Its fleet business has been damaged by lower fuel prices, its travel business is hurting because corporate travel came to an abrupt stop, and its health segment is affected by people currently deferring elective surgeries. That's a triple whammy, and why the stock is losing to the market in 2020.

Through the first six months of 2020, WEX's revenue is down 5% year over year. But fortunately, this is a lean business, enabling the company to remain profitable, albeit barely, on a GAAP (generally accepted accounted principles) basis. It's still hard to say when corporate spending will resume fully. But when it does, WEX will remain a top payment-processing option due to its valued service of providing data that prevents fraudulent transactions, among other things.

Over the next few years, WEX management believes it can reach approximately $3 billion in revenue. For perspective, it generated $1.7 billion in revenue in 2019. The stock is also down sharply in 2020 and trades at a cheaper price-to-sales ratio (currently 3.7) than its historical range. I'm betting at some point in the next five years, the U.S. economy will boom again and business spending will pick up. If WEX can hit its long-term revenue target and return to a traditional valuation multiple, this stock could easily double from here. And the long-term revenue target and the current valuation are two of four reasons I just bought WEX stock