Most investors are seeing a lot of red right now. The Nasdaq Composite is in a bear market. The S&P 500 is in a correction. When major indexes are down significantly, it means that many stocks are also sinking.

But there are outliers that are swimming against the strong current. Some of them remain attractive picks even after delivering solid gains. Here are three stocks up 25% to 65% this year that are still smart buys.

A smiling person looking at monitor showing a stock chart trending up.

Image source: Getty Images.

1. Bristol Myers Squibb

Bristol Myers Squibb (BMY -0.27%) didn't do much for investors last year, with the drugmaker's shares ending 2021 up less than 1%. However, it's a much different story in 2022. The big pharma stock has jumped 25% so far this year.

Probably the biggest factor behind the stock's success in 2022 is a string of regulatory wins for the company. In March, Opdivo (in combination with chemotherapy) picked up U.S. approval as a neoadjuvant treatment for non-small cell lung cancer. The blockbuster immunotherapy won three approvals in Europe -- one as a monotherapy and two as part of combo treatments -- for additional indications in the following month.

Regulatory victories for two new products excited investors even more. The U.S. Food and Drug Administration (FDA) approved Opdualag in March for treating melanoma. The therapy combines Opdivo with relatlimab, a new type of immunotherapy that targets the LAG-3 immune checkpoint. In April, the FDA approved potential blockbuster heart failure drug Camzyos (mavacamten).

BMS shares trade at less than 9.8 times expected earnings even after the solid year-to-date gain. The company faces some challenges with generic competition for Revlimid and the loss of exclusivity for several drugs over the next few years. However, BMS has several up-and-coming stars in its lineup along with a promising pipeline.

2. McKesson

Warren Buffett added McKesson (MCK 0.64%) to Berkshire Hathaway's portfolio sometime in the first quarter of 2022. That appears to have been a wise move in retrospect. McKesson stock is up more than 30% year to date with a nice chunk of that gain coming in the second quarter.

What does Buffett like about McKesson? The company's resilient business probably stands at the top of the list. McKesson distributes prescription drugs and medical-surgical solutions and provides technology to help connect pharmacies, payers, drugmakers, and patients. 

With the overall market in turmoil, McKesson is the kind of safe stock to which many investors flock. It delivers solid growth on a consistent basis. For example, in the quarter ending March 31, the healthcare services company reported revenue increased by 12% year over year with adjusted earnings per share up 15%.

Despite turning in a strong performance so far this year, McKesson remains attractively valued. Its shares trade at under 14 times expected earnings. 

3. Devon Energy

Devon Energy's (DVN -0.89%) shares skyrocketed 178% last year. That momentum hasn't faded. The stock is still on fire with a gain of 64% so far in 2022. 

Actually, the story for Devon is even better than those numbers indicate. The company offers an especially juicy dividend yield of more than 7%. This dividend includes a fixed component and a variable component that's funded by excess free cash flow. Including reinvested dividends, Devon's total return since the beginning of 2021 is nearly 400%.

There's no surprise as to why Devon has performed so well. Oil and gas prices have soared with increased demand following the lifting of COVID-19 restrictions and supply issues resulting from Russia's invasion of Ukraine.

Devon's shares trade at only 8.8 times expected earnings. CEO Rick Muncrief said in the company's recent Q1 conference call, "At current levels, we feel that we are fundamentally undervalued and are at the start of a multiple expansion for our equity that should translate into true value creation for shareholders." He could very well be right. If so, Devon should have plenty of room to keep running.