There's a huge rotation currently underway from so-called growth stocks to so-called value stocks as investors are swapping out the former for the latter in their portfolios. And there's real data to back this up.

Goldman Sachs has a quarterly report called Hedge Fund Trend Monitor. Last year, the report showed hedge funds were selling pricey stocks and buying positions in stocks that were perceived to be better values, like energy stocks, according to Forbes.

To end 2022, Goldman Sachs' report showed that hedge funds were doing more than just rotating. They were also concentrating their portfolios around fewer stocks. Combining insights from these two reports shows that investors are desperate to find good value in the stock market but can't find many opportunities.

Because of this, investors have given up on companies like cloud-computing provider DigitalOcean (DOCN -0.54%), online-education platform Udemy (UDMY -0.10%), and restaurant-technology company Toast (TOST 1.38%). These companies are unattractive in this market because they're unprofitable. But in this article, I'll show why this pervasive sentiment is shortsighted.

Writing off this trio now could be a huge mistake. All three may be on a path to unlocking better financial performance in the near future. This would give forward-looking investors an advantage over investors who are only looking at financial results from the past 12 months.

1. DigitalOcean

The cloud-computing space is expected to see rapid growth over this decade. This is based on third-party research reports from Grand View Research, Gartner, Fortune Business Insights, and more. The reports disagree on how big the market will be and how fast it will grow but all point up, which bodes well for DigitalOcean.

DigitalOcean's revenue grew 34% year over year in 2022 to $576 million. In 2023, management expects revenue to grow at least another 21%. This top-line growth is outpacing the industry growth cited in the aforementioned third-party research reports. In short, the company is taking market share.

DigitalOcean is growing revenue in two ways. First, it's adding new customers to its platform. It ended 2022 with 677,000 customers, up from 609,000 at the end of 2021. Second, these customers are now spending $80.27 per month, on average, up 22% year over year.

The company's profit margins are also improving as its revenue grows. For 2022, it had a gross profit margin of 63%, which was up from a gross margin of 60% in 2021.

Moreover, free cash flow is also quickly improving for DigitalOcean. Some investors ignore free cash flow for companies like DigitalOcean because they pay a lot in stock-based compensation, which boosts free cash flow but can dilute shareholder value. This can make the metric misleading.

However, we can compensate for dilution by looking at DigitalOcean's free cash flow per share. Encouragingly, this metric also shows impressive improvements, just like its gross margin.

DOCN Gross Profit Margin Chart

DOCN Gross Profit Margin data by YCharts.

DigitalOcean's free-cash-flow margin was just 13% in 2022. But in 2023 and beyond, management expects its margin to be over 20%.

The company's net loss of $24 million in 2022 might be unattractive to some value-minded investors. But this company is taking market share in a growing industry, while improving its profit margins. That means DigitalOcean's business could look far more impressive in just a few years.

2. Udemy

Investors have clearly written off Udemy, considering it trades near all-time lows, as of this writing. The company's steep net loss of $154 million in 2022 likely has something to do with that.

Udemy is a marketplace that connects educational-content creators with learners. With over 59 million learners, 70,000 instructors, 200,000 courses, and options in 75 languages, the platform is comprehensive. But with so much content and a wide disparity in content quality, it needs to be curated.

Anyone can select a course on the platform and learn. But the company curates content, and then packages it into a subscription product for businesses that are looking to "upskill" their workers. That's the attractive part of a Udemy investment.

In 2022, the company's revenue grew 22% year over year. But revenue for its enterprise segment grew a far more robust 68% as businesses discovered this education platform.

With this growth, Udemy Business accounted for almost 55% of the company's total revenue in the fourth quarter of 2022. And revenue from this source is on a subscription basis, pushing annual recurring revenue (ARR) to $372 million -- not bad for a stock with a market capitalization of just $1.3 billion.

The recurring revenue from Udemy's enterprise segment is great. But even better, this segment has higher profitability than the consumer segment. In 2022, the company's gross margin in its consumer segment was 52.6%, compared to a gross margin of 66.7% in its enterprise segment.

In short, Udemy is unprofitable now. But it has a much better chance at profitability as its fast-growing enterprise segment becomes the dominant source of revenue. The chart below shows the profit-margin improvement as revenue has grown.

UDMY Gross Profit Margin Chart

UDMY Gross Profit Margin data by YCharts.

Looking ahead, I'm optimistic that Udemy's enterprise segment can maintain an impressive growth rate. According to third-party research cited by the company, the market for corporate e-learning could reach $171 billion by 2027 -- leaving plenty of room for Udemy's ARR of $372 million to expand.

3. Toast

Toast offers many products to restaurant companies, including hardware point-of-sales devices. It has software for scheduling, ordering, and payroll. Moreover, it can process payments. But sticking with my theme, Toast is the most unprofitable of these three companies, with a net loss of $275 million in 2022.

Here's why you might want to overlook its steep losses: Over 79,000 restaurant locations now use at least one of Toast's products. And around 22,000 locations have been using Toast for one year or less.

Restaurants don't necessarily have to start with Toast hardware. But it does make sense to start there.

In 2022, Toast had a gross loss of $102 million from selling hardware devices alone. That's right, it cost more to make its hardware products than what it sold them for. Throw in sales and marketing expenses to onboard a new restaurant customer, and the beginning of a customer relationship is extremely expensive for Toast.

The silver lining is that the company's subscription-software products are likely to be adopted over time. Two years ago in the fourth quarter of 2020, only 18% of Toast's customers were using six or more of its software modules. As of the fourth quarter of 2022, that jumped up to 41% of customers.

Because of this, Toast's subscription revenue is its fastest-growing revenue segment, up 92% year over year in 2022, compared to overall revenue growth of 60%. Moreover, the fastest-growing segment is also the most profitable, with a gross margin of 66% in Q4.

The restaurant space is an enormous global opportunity, and Toast's business is gaining customers in a hurry. Over time, it's logical to assume these will keep buying the company's add-on software products, which will improve Toast's profitability. To be clear, management expects losses to continue in 2023.

But I believe the arrow is pointing in the right direction. And that's the point of this article. While hedge funds and other investors fixate on current market conditions and financial results from the past year, long-term investors should be looking ahead to the companies positioned for profitable growth.

Of course, nothing is guaranteed with DigitalOcean, Udemy, or Toast -- their progress could get derailed. But these are three unprofitable tech stocks heading in the right direction and worth owning as part of a diversified portfolio.