A bear market has largely defined the past 12 months in the stock market. After an incredible run from mid-2020 to late 2021, stocks across the board have seen their value plunge. Some investors view it as a negative; some feel as though it's a needed correction. Either way, investors should now focus ahead.

Nobody can predict the future, and there's no way to know how the stock market will perform in 2023, but these three stocks look like solid buys even if the bear market continues.

Procter & Gamble

Whether it's a retail store, grocery store, or convenience store, it's virtually impossible to go into any major store and not find a Procter & Gamble (PG 0.26%) product. Rivaled by few, Procter & Gamble's portfolio includes household name brands like Tide, Pampers, Bounty, Gillette, Old Spice, Febreeze, Crest, and many more. 

As we experience the current bear market, P&G is the textbook example of a defensive stock -- a company with a balance sheet full of cash, stable and consistent earnings, and products people buy regardless of economic conditions. This provides P&G investors a level of protection (from a looming recession) you won't find in many other companies.

Many of P&G's products are consumer staples, meaning they are things people needs. As consumers likely slow spending, they'll cut back on eating out and other forms of entertainment, but they won't skip cleaning, grooming, feminine care, baby care, and the like. P&G's products will sell no matter what.

Stock price aside, P&G shareholders should take pride in the fact the company has increased its yearly dividend for 66 consecutive years (and paid one for 132 years total). A reliable dividend income source makes dealing with a bear market much easier because you're being rewarded either way.

Walmart

No company generates as much revenue as Walmart (WMT 0.68%). For perspective, its $600 billion in sales over the last four quarters is more than Microsoft's (MSFT 0.00%), Home Depot's, and AT&T's combined. With thousands of stores worldwide and a growing e-commerce business (up 16% year over year), Walmart is a certified cash cow.

WMT Revenue (Quarterly) Chart

DATA BY YCharts

Look no further than Walmart's "Save Money. Live Better" motto as to why it's a great investment, especially during current economic conditions. With inflation at levels we haven't seen in decades, customers are gravitating toward value, and no retailer is better positioned to present that than Walmart. Amazon (NASDAQ: AMZN) undoubtedly reigns supreme in e-commerce, but Walmart has an edge that Amazon can't remotely compete with: groceries.

Groceries account for more than half of Walmart's sales, and CEO Doug McMillon mentioned the company has seen more higher-income customers shopping at the store. With food-at-home (grocery store and supermarkets) prices up 12% from this time last year, it's easy to see why people may be leaning more on Walmart. And with inflation showing no signs of slowing down anytime soon, there's no reason to believe this trend will change.

Even once economic conditions improve, Walmart is a good long-term investment because it has positioned itself as a one-stop value shop.

Microsoft

As many Big Tech companies brace for an uncertain 2023, Microsoft is surely less stressed than its peers because of how it's managed to create its diverse business ecosystem. From the cloud, hardware, gaming, search, enterprise services, and many other segments, Microsoft's ecosystem is unlike its competitors'.

And there's another key ingredient too: its customers. Many of Microsoft's customers are other businesses. There are tons of companies worldwide that rely on Microsoft's products or services. From its cloud services to Office software to LinkedIn recruiting to PCs, its hand in other companies is undeniable.

Consumers will likely slow spending with current economic conditions, but many businesses wouldn't be able to operate (efficiently, at least) without Microsoft's products or services. That should help insulate the company from broader conditions and makes it as recession-resistant of a tech stock as there is.

Down over 27% over the past 12 months, Microsoft may be too good to pass up on for the long run, especially considering how much its price-to-earnings (P/E) ratio -- which tells you how much you're paying for $1 of a company's earnings -- has declined over the past five years. The stock hasn't been this cheap since the start of the COVID-19 pandemic.