If you're investing in the stock market, it's a good idea to make it worth your while and go with a decent-size investment. An amount of $5,000 would be large enough to spread among a few solid stocks and earn a good return without allocating too much money to any one investment.

Two stocks that have been beating the bear market this year and that could be good options to consider now are Bristol Myers Squibb (BMY -0.27%) and Chevron (CVX 0.44%). Here's why they could continue to outperform and why it's not too late to invest in them.

1. Bristol Myers Squibb

What makes Bristol Myers an attractive investment is that the healthcare business is robust and hugely profitable. It's the type of stock that you can buy and hold forever.

The company has many top-selling products in its portfolio, including Revlimid and Opdivo, two cancer treatments that last year combined for more than $20 billion in sales. Blood clot medicine Eliquis generated another $10.8 billion on top of that amount. And the company's pipeline features more than 50 compounds that it is currently developing.

Over the past four quarters, the company has generated $6.6 billion in profit on sales of $47.1 billion, equating to a margin of 14%. That's a good chunk of profit that can help the company expand in the long run.

Acquisitions have been key to the company's long-term growth. In 2020, Bristol Myers acquired cardiovascular company MyoKardia. That was a year after buying biopharmaceutical business Celgene, which focuses on developing treatments for serious diseases. Through that deal, Bristol Myers acquired Revlimid. The company, which is now approaching $50 billion in annual revenue, is generating more than twice what it did in 2018 when sales were less than $23 billion.

Now, with stocks crashing and valuations becoming more affordable, it wouldn't be surprising if Bristol Myers were to continue to look for opportunities to expand once again. But even if that doesn't happen, the company is already in a great position to benefit from a recovery in the healthcare industry

Bristol Myers stock is up 10% this year, which would be enough to rake in a profit of $500 on a $5,000 investment without factoring in its dividend, which yields 3.1%. By comparison, the S&P 500 is down 24%.

Given its bright future and strong fundamentals, this isn't a trend that's likely to change anytime soon as Bristol Myers looks to be a safe bet to continue beating the market in the long haul.

2. Chevron

Chevron is a top oil and gas company with operations all over the world. Its business is involved with production, refining, and transporting oil. It benefits significantly from rising oil prices, and so it's little surprise that as the commodity has been rising in value this year, so has the price of Chevron's stock.

With the stock up 34% so far in 2022, consider that a $5,000 investment at the start of the year would have resulted in a $1,700 profit. And that's without taking into account its 3.6% dividend yield. At a time when many stocks have been in the red, this would be a fantastic return for investors.

In the trailing 12 months, the company has generated more than $29 billion in profit, which is more than 14% of the $206.1 billion it reported in sales during that time frame. That's a far cry from the $5.5 billion loss it reported in 2020 when demand for oil was low amid COVID-related lockdowns.

But now that COVID looks to be receding, oil prices should be more stable, leading to more consistent profits. And with OPEC recently announcing production cuts of 2 million barrels per day, the world's top oil producers look intent on trying to keep oil prices at their current levels.

The ongoing war in Ukraine and heightened demand for oil now that people are traveling again should ensure that oil prices remain strong for the foreseeable future. And as long as that's the case, Chevron is a safe bet to continue outperforming the market.