Investors in the Nasdaq Composite (^IXIC -1.79%) have been worried about inflation lately, and the latest reading from the Bureau of Labor Statistics on Thursday morning sent shock waves through the stock market. News that the Consumer Price Index rose 0.6% in January to post a 7.5% year-over-year gain fanned the flames for those who believe the Federal Reserve will have to take drastic action to get inflationary pressures under control. That was a leading factor in sending the Nasdaq down more than 2% on the day.

One of the worst performers in the Nasdaq on Thursday was Affirm Holdings (AFRM -4.78%), which prematurely released its quarterly earnings and disappointed shareholders in the process. But some Nasdaq stocks still managed to post gains even in a down market, and a big winner on the day was software-as-a-service company Datadog (DDOG -1.32%). We'll look more closely at both stocks below.

Person opening box and smiling at an item.

Image source: Getty Images.

Affirm's growth was not enough

Shares of Affirm Holdings were down more than 21% on Thursday. The decline came largely in the last hour of trading, as the buy now, pay later specialist released its fiscal second-quarter financial report in the midafternoon rather than waiting until after the market had closed, as expected.

Affirm's numbers looked strong on their face. Gross merchandise volume jumped 115% year over year to $4.5 billion. Active merchants were up by 8,000 to 168,000, with active-consumer counts soaring 150% to 11.2 million. In terms of financials, revenue of $361 million was up 77% from year-ago levels, and revenue net of transaction costs almost doubled.

However, there were some troubling figures in Affirm's report. The company boosted its provision for credit losses by $40 million, citing a more-normal credit environment in the last three months of calendar 2021. In addition, net losses widened to nearly $160 million for the quarter.

Investors also seemed unconvinced by Affirm's guidance for the fiscal third quarter and the remainder of fiscal 2022. In particular, the company sees full-year gross merchandise volume of $14.58 billion to $14.78 billion and revenue of $1.29 billion to $1.31 billion. That doesn't offer much in the way of acceleration for the remainder of the year, and for growth-hungry investors, the news was far from ideal.

Datadog fetches stock gains

Shares of Datadog, on the other hand, rose 12% despite the downward movement in the broader stock market. The cloud-monitoring and security platform specialist reported fourth-quarter financial results that showed the company's continued success in growing its business.

Datadog's numbers looked strong. Revenue of $326 million jumped 84% year over year. The company was profitable even under normal accounting rules, and adjusted net income came in at $0.20 per share, more than triple its year-ago profit. The company counted 216 customers generating annual recurring revenue of $1 million, well over double the 101 customers it had in that category 12 months ago. Datadog now has more than 2,000 customers generating at least $100,000 in annual recurring revenue, up 63% year over year.

Moreover, it sees more growth ahead. First-quarter sales of $334 million to $339 million and adjusted earnings of $0.10 to $0.12 per share would keep up the company's momentum, and full-year 2022 projections for $1.51 billion to $1.53 billion in revenue and adjusted earnings of $0.45 to $0.51 per share were well received by investors.

It's easy for market participants to make the mistake of thinking that a down market is bad for every company. That's not the case, and even though Affirm struggled today, Datadog's gains show it's worth looking for great businesses.