After coming within just 0.3% of setting a new record high, the S&P 500 index has pulled back early in 2024 trading. On the other hand, the benchmark index is still down just 2% from its peak -- and there are catalysts on the horizon that suggest that the market could enter a new bull market this year.

Regardless of whether 2024 brings the start of the next big rally, history suggests there's another strong bullish phase on the horizon. And investors who back top growth stocks stand to see very strong returns when positive momentum continues past the market's previous peak.

If you're looking to position your portfolio to profit on the next bull rally, read on to see why Palantir (PLTR -0.33%) and Paycom (PAYC 0.56%) have the potential to be big long-term winners.

The case for Palantir

Palantir is an analytics software specialist that's positioned to be a leading player in the artificial intelligence (AI) revolution. In May, the company launched its Artificial Intelligence Platform (AIP) -- a new software system that's helping organizations leverage data to build faster and operate more efficiently.

With its second-quarter report, the company announced that more than 100 enterprise customers had already adopted the data software specialist's AI platform. Jump ahead to its Q3 report last November and Palantir had nearly 300 organizations using the service.

Meanwhile, overall revenue rose 17% year over year to hit $558 million. Roughly 55% of Palantir's third-quarter sales came from government customers, but more rapid growth among private sector clients is poised to help the company's overall sales expansion accelerate.

Palantir has also been making significant strides in terms of profitability. In Q3, the business posted $72 million in net income and a net income margin of 13%. The company has now recorded four straight quarters of profitability on a generally accepted accounting principles (GAAP) basis, and it expects to remain profitable going forward.

That means the company should be able to continue strengthening its impressive balance sheet, which already boasts roughly $3.3 billion in cash and equivalents and zero debt.

Palantir is demonstrating that it can grow efficiently and profitably, and it still has huge long-term growth potential ahead. With the stock still trading off 59% from its peak, the data software specialist could go on to be a huge winner for risk-tolerant investors.

The case for Paycom

Paycom is a payroll and human resources software specialist that has seen uneven performance lately. On the heels of the somewhat underwhelming sales growth and forward guidance, Paycom stock saw big sell-offs. Shares lost roughly 33% of their value in 2023, and the stock is now down roughly 63% from its high.

Sales increased roughly 21.6% year over year in the third quarter, still a very solid rate of growth but also a deceleration from the rate of sales expansion that investors had grown accustomed to. Paycom managed to grow sales 30% annually. On the heels of slowing growth in last year's third quarter, management's midpoint targets called for growth of roughly 14% for Q4 2023 and annual growth of 11% for 2024.

Efficiency improvements offered by the company's cloud-based software platform are reducing business clients' need to purchase extra services. In other words, the increased efficiency that customers are getting is cannibalizing other parts of Paycom's business. But the company has made clear that it's pursuing its current strategy with a long-term vision in mind.

While Paycom's revenue growth has slowed lately, the company continues to post very strong margins and could be able to return to stronger sales growth by adding new features and adjusting the current offerings of its subscription software to drive better monetization through the platform.

With a net income margin of roughly 20.6% across last year's first three quarters, Paycom has continued to serve up encouraging profitability. Even though sales expansion is set to slow in the near term, the company should be able to serve up double-digit earnings growth.

Trading at roughly 21 times next year's expected earnings, Paycom is a reasonably priced growth stock with characteristics that could help power strong returns for investors.