There's no doubt that the market's journey over the last few years has kept investors on their toes. The bull market continues to be in full swing, with the S&P 500 trading up 25% over the trailing 12 months while the Nasdaq Composite is up 30% in that same time frame.

The composition of your portfolio will very much impact how your investments perform in all types of market environments. Some stocks have remained far behind the market's returns over the last year, afflicted by headwinds of investor sentiment.

Sometimes, this can create a compelling opportunity for investors to put cash into companies with promising paths to future growth at cheaper-than-usual valuations. Here are two such companies to consider as you research stocks for your portfolio.

1. Pfizer

Pfizer (PFE 0.65%) is trading for approximately $28 per share at the time of this writing. Shares have been pummeled by about 28% over the last year. In the earlier days of the pandemic, Pfizer built a virtually impenetrable moat with the success of its COVID-19 vaccine and oral antiviral medication. Sales of these products raked in billions in cash and profits for the company.

Pfizer was well aware that its COVID-19 sales peak was not sustainable long-term, and that wouldn't have been realistic to expect. Instead, the company went headfirst into dealmaking, executing a series of multibillion-dollar acquisitions to expand its footprint in key focus areas ranging from oncology to rare diseases.

The most notable acquisition was of Seagen, a company that focuses on antibody therapies for cancer. Pfizer paid $43 billion for Seagen, and the acquisition is already paying off. Management recently announced at a recent investor event that the company plans to have a minimum of eight blockbuster cancer drugs on the market by 2030 and double the number of patients treated with its oncology medicines.

Pfizer's recent acquisitions and external business development efforts are expected to add tens of billions of dollars to its annual top line by the beginning of the next decade. This is crucial, not only to stem the tide of flailing COVID-19 product sales, but to deal with pending patent cliffs on numerous key products.

Management is also estimating that its rapidly growing oncology franchise will rely heavily on growth from biologics (which use the body's immune system to fight cancer) rather than conventional chemically derived cancer drugs moving forward.

In fact, Pfizer is estimating that by 2030, 65% of its oncology portfolio revenue will come from biologics, as opposed to the 6% these drugs contribute now. Bear in mind, the oncology biologics market is estimated to be a $100 billion addressable market opportunity, on track to hit a valuation of around $1.4 trillion by the early 2030s.

It's worth noting that Pfizer was witnessing growth fluctuations prior to the pandemic with modest single-digit growth at best. In the most recent quarter, Pfizer still delivered 11% year-over-year revenue growth if you factor out waning sales of its COVID-19 products. That's a top-line figure of $15 billion. Profits totaled $3.1 billion for the three-month period.

It also delivered $2.4 billion back to shareholders in the quarter in the form of cash dividends. On that note, as Pfizer's stock price has plummeted, its yield has risen to an impressive 6%.

Pfizer has demonstrated a commitment to honoring its obligation to investors, having raised its dividend every year for 15 years and counting. It also generated roughly $8.6 billion in operating cash flow and $3.5 billion in free cash flow over the trailing 12 months, so its balance sheet is in a good position cash-wise and the dividend looks safe.

The company trades at a price-to-sales (P/S) multiple of around 2.9 today. Investors who are in it for the long haul with a minimum investment horizon of three to five years or more could benefit from the next era of Pfizer's story in both dividend income and share price increases as growth accelerates.

2. Chewy

Chewy (CHWY -6.23%) is trading for approximately $26 per share and is up double digits from the start of the year, but still down by about 35% from one year ago.

Some investors might be concerned about the company's fluctuating profitability and its potential exposure to changes in discretionary spending. There also seems to be mixed investor sentiment toward many growth-oriented stocks on the whole, even as the bull market is well underway. Let's take these points one by one.

Chewy reported its first quarterly profit according to generally accepted accounting principles (GAAP) in the final quarter of 2020, which came in at $21 million. Its first full year of profitability occurred in 2022, when it generated net income of $49 million. Last year, the company generated a full-year profit of $40 million despite an unprofitable third quarter.

And in the latest period, the first quarter of 2024, Chewy generated net income of $67 million, a 193% increase from the year-ago period. These are solid growth figures for a company that is relatively new to profitability. Over the trailing-12-month period, Chewy has raked in operating cash flow of approximately $419 million, with levered free cash flow of $294 million in that same time frame.

In terms of exposure to discretionary spending, it's true that pet owners might adjust their spending priorities in difficult economic times. However, pets are generally considered part of the home, and therefore not necessarily a target of discretionary spending.

A report by market research firm Packaged Facts found that the U.S. pet market reached a valuation of $144 billion in 2023, which represents a compound annual growth rate (CAGR) of 9% from its 2017 valuation. Analysts also project that the market will expand at 7% CAGR between 2023 and 2027.

In its recent annual report, Chewy also cited data from the American Pet Products Association about pet spending patterns during recessionary periods. For example, in 2010, while spending on areas like housing, food, and entertainment decreased, pet spending rose by more than 6%. It's also worth noting that 85% of Chewy's sales in the recent quarter came from non-discretionary categories like consumables and healthcare.

Chewy's downtrodden valuation could be an opportunity. This is a profitable business with positive cash flow and steadily growing revenue. It counts a diverse range of revenue streams, including pet products and other emerging business areas like its telehealth business, online pharmacy, and newly launched vet practice. Now could be an excellent time to take a second look at this pet stock.