What happened

Shares of PayPal Holdings (PYPL -1.14%) popped on the first trading day of 2023 following an upgrade from a prominent analyst. The stock dropped 62% in 2022, its worst year since it was spun off from eBay in 2015. Shareholders are therefore likely happy to start 2023 with some gains. PayPal was up 4% as of 10 a.m. ET on Tuesday, but had been up 5% earlier in the session.

So what

Truist analyst Andrew Jeffrey believes that investors have become too pessimistic about PayPal stock, and he consequently upgraded it from a hold recommendation to a buy, according to The Fly.

With still a lot of macroeconomic uncertainty heading into 2023, many analysts have cut back on buy recommendations in recent months. Therefore, Jeffrey's upgrade for PayPal stock gives a boost to investor confidence during a challenging time.

Now what

I agree with Jeffrey's assessment about market pessimism for PayPal stock. It reminds me of what investing great Benjamin Graham said: In the short run, the market is a voting machine, but in the long run, it is a weighing machine. 

What Graham meant is that investor sentiment is the primary driver of stock price over a short period. But over a longer time, you would expect business fundamentals to win out.

With PayPal, it ended 2022 trading at its cheapest price-to-free-cash-flow valuation ever -- the market is voting against PayPal's prospects heading into 2023.

PYPL Price to Free Cash Flow Chart

PYPL price to free cash flow; data by YCharts.

PayPal is facing challenges such as slowing user growth and slower payment volume growth. And these problems could get worse if there's a recession in 2023.

That said, the company is still very profitable with a 26% free-cash-flow margin in the third quarter of 2022. And management is committed to using that cash flow to reward shareholders with share repurchases in the coming year. Therefore, now may indeed be a timely buying opportunity for PayPal stock.