This hasn't been a good year for stocks as the market has slipped into bear territory due to multiple headwinds, including high inflation, a hawkish Federal Reserve, fears of a recession, and a slowdown in growth in several industries.

But investors should note that the stock market has performed solidly over the long run. More specifically, it has averaged an annual return of 10% over the past 50 years. That's why savvy investors with money to spare can consider buying some solid companies on the cheap.

Let's say you have $250 to spare after paying off your bills, clearing your high-interest debt, and saving enough for a rainy day: You can consider buying one share of Palo Alto Networks (PANW -3.37%) and almost two shares of Sea Limited (SE -2.64%) right now.

Let's see why these companies are worth buying before the new year arrives.

1. Palo Alto Networks

Though Palo Alto Networks turned in solid results this year, the stock has taken a beating from the selloff in the broader market. Shares of the cybersecurity specialist slipped nearly 20% as of this writing, and that has made the stock cheaper than before.

More specifically, Palo Alto stock is now trading at less than 8 times sales, which is well below the price-to-sales ratio of nearly 12 that it was commanding last year. The company's forward price-to-earnings (P/E) ratio of 46 also represents a substantial discount over last year's multiple of 77. So the stock is now available at a sweet discount over 2021, and investors might want to grab this opportunity to buy it for a few simple reasons.

First, the cybersecurity market in which Palo Alto operates is set to grow once again in 2023. Cloud computing services provider Fastly (FSLY -3.76%) recently surveyed 1,400 corporate information technology (IT) decision makers and found out that nearly three-quarters of them are going to hike their cybersecurity spending in 2023. Gartner estimates that overall cybersecurity spending could increase 11.3% next year to $188 billion as organizations prepare to ward off the growing threat.

Palo Alto Networks is already taking advantage of the market's growth. It anticipates an increase of 21% in billings to around $9 billion along with a 26% jump in revenue to $6.9 billion in fiscal 2023 (which began on Nov. 1). Palo Alto is in a solid position to meet or even exceed this estimate given its massive remaining performance obligations (RPOs) worth $8.3 billion. The metric, which measures the total value of unfulfilled customer contracts, increased 38% year over year last quarter and outpaced the company's actual revenue growth of 25%.

This suggests why analysts are anticipating a 35% increase in Palo Alto's adjusted earnings in fiscal 2023 to $3.42 per share, which is at the higher end of the company's guidance range of $3.37 to $3.44 per share. Its robust revenue pipeline suggests that it could live up to Wall Street's expectations and deliver a better-than-expected performance in 2023 that could send its shares soaring, which is why now would be a good time to buy this cybersecurity stock.

2. Sea Limited

Sea Limited stock has been hammered hard in 2022, crashing 77% as of this writing. Known for operating online gaming, e-commerce, and fintech businesses in Latin America, Southeast Asia, and certain other markets, Sea Limited has delivered a resilient financial performance despite weakness in some areas.

SE Revenue (TTM) Chart

SE revenue (TTM) data by YCharts. TTM = trailing 12 months.

In the third quarter of 2022, Sea Limited's revenue jumped 17% year over year to $3.2 billion, driven by terrific growth in the fintech and e-commerce businesses. The latter jumped 32% year over year to $1.9 billion, while the fintech business recorded a whopping 147% spike in revenue over the prior-year period to $327 million.

The digital entertainment business weighed on Sea Limited's performance last quarter as revenue shrunk slightly to $893 million as compared to the year-ago period thanks to a decline in the company's user base. The company declined to provide guidance for 2023 on account of macroeconomic uncertainties and reduced its bookings guidance for 2022 to $2.7 billion from the prior estimate of $3 billion.

Still, opportunistic investors can consider looking past the near-term weakness in Sea Limited's business. The company is expected to finish 2022 with a 21% increase in revenue to $12 billion, and it is expected to sustain healthy levels of growth in 2023 and 2024 as well.

SE Revenue Estimates for Current Fiscal Year Chart

SE revenue estimates for current fiscal year; data by YCharts.

A closer look at the markets in which Sea Limited operates will tell us why analysts are optimistic about the company's growth. For example, fintech is growing rapidly in Southeast Asia thanks to the increasing adoption of digital lending and digital payments. The value of mobile transactions in the region is expected to jump from $62 billion in 2020 to $268 billion in 2025.

Similarly, e-commerce spending in the region is expected to boom, growing 162% by 2025 to $180 billion, according to IDC.

These secular growth opportunities should help Sea Limited keep up its impressive growth. So, savvy investors can consider using the sharp decline in Sea Limited stock to buy it, now that it trades at just 2.45 times sales, a huge discount as compared to its five-year average price-to-sales multiple of 13.