The S&P 500 is up close to 20% this year, a fantastic feat that brings it nearly up to its previous high from the end of 2021 and is bringing it ever closer toward a bull market. 

But the S&P 500 is only an index, or an average of 500 different stocks. It presents a good idea of how the overall market is performing, but it's not representative of every stock on the market. So while many stocks are soaring this year, a similar number are doing about average in performance, or even declining. 

PayPal (PYPL 0.98%) stock is up a mere 4% in 2023, and it's down almost 15% over the past year. The market clearly isn't enthused about PayPal right now. But that might present forward-thinking investors with an opportunity. Should you swim against the tide and buy PayPal stock right now?

Why PayPal stock is down and out

PayPal stock's price drop precipitated the broader market's downfall and was a harbinger of what was to come. In the middle of 2021, it missed analyst expectations for revenue and offered underwhelming guidance for the remainder of the year. The stock dropped, and it continued falling as the economy followed with high inflation and fears of a recession that are ongoing. PayPal's growth continued to decelerate, and investors questioned whether PayPal was still relevant, as many new fintechs sprouted offering similar services. Block's Cash App is a popular peer-to-peer payments service, and Apple and Alphabet's Google both offer easy-to-use payments options. These are only a few examples.

PayPal has recovered some of its losses since the big drop, but investors remain wary of this stock as it struggles to match the incredible growth it witnessed during the pandemic, deals with continued economic instability, and feels pressure from investing in its business to stay dominant. To top it off, CEO Dan Shulman is leaving at the end of the year, and the company has yet to announce his replacement.

What's the market missing?

Despite all that, PayPal has carved out a lead in digital payment processing and remains the company to beat. It processed almost $1.4 trillion in trailing 12-month volume as of the end of the 2023 first quarter and generated more than $7 billion in Q1 2023 revenue, or a 9% year-over-year increase. It's the original peer-to-peer payments service and the original digital payment network, and so far, it's been upgrading its solutions and technology at least as much as the competition, so its first-mover's edge remains intact. These upgrades and innovations are eating into profits, but it's making progress on cost-efficiency plans, and it's well-positioned to get back to stronger growth as a leaner and more agile operation. 

The most important factor in my book is that there's still a huge future market opportunity as e-commerce sales are expected to grow as an industry. There are few companies that will benefit from that trend as much as PayPal. According to Statista, e-commerce sales are expected to increase at a compound annual growth rate of more than 11% through 2027, and as the premier electronic payments system, PayPal has a lot to gain from that organic growth.

One note the company was defensive about was a decrease in active members from last quarter, from 435 million to 433 million. Management called it a "minimal churn" of customers who were not actively engaged as it pivoted to focusing on increasing activity levels. That could be a good sign of a working strategy, but it's something investors need to watch to see if there's something else at play.

The time is right

PayPal is getting its ducks in order, with efficiency plans already bearing fruit and revenue increasing at a strong pace. 

At the current price, shares are trading at around 31 times trailing 12-month earnings. That's not its cheapest valuation ever, but it's well below the three-year average of 52, and it's a reasonable valuation considering PayPal's current situation.

When PayPal announces its new CEO, its share price could soar. The market typically reacts well to a strong candidate, and PayPal is likely to choose someone who could bring its business to the next level. In fact, it could announce later today when it reports second-quarter earnings.

With the price still down and the opportunity looming, now looks like a great time to buy PayPal stock.