Stocks have been volatile this week, but it looked as though bullish investors survived a key test of their resolve in recent trading sessions. The outlook seemed brighter in premarket trading on Friday morning, and futures contracts on the Nasdaq Composite (^IXIC 1.58%) were up slightly about an hour before the market opened.

Not all the news from Wall Street was good, as shares of Costco Wholesale (COST 1.11%) fell after the warehouse retail giant released its latest quarterly financial results. However, artificial intelligence (AI) stocks have been extremely popular lately, and one company in the space fed the flame of investor sentiment by issuing a favorable report for its most recent quarter. Read on to learn more about Costco and to find out the name of this AI stock winner.

Costco sees shoppers trade down

Shares of Costco Wholesale were down almost 3% in premarket trading early Friday. The retail giant reported fiscal second-quarter financial results for the period ending Feb. 12 that raised some questions about the resilience of the U.S. consumer.

Costco's quarterly numbers weren't bad. Net sales jumped 6.5% year over year to $54.24 billion, with comparable sales rising 6.8% after adjusting for gasoline prices and foreign exchange impacts. Net income climbed an even healthier 13% to $1.47 billion, which worked out to $3.30 per share. Costco also reported solid sales for the month of February, which were up 4.7% from year-ago levels.

However, e-commerce sales were notably weak, falling 8.7% from last year's holiday quarter. On Costco's conference call, CFO Richard Galanti noted that big-ticket discretionary items make up a large part of Costco's online sales, and those categories were down double-digit percentages during the quarter. Home furnishings, small electric devices, jewelry, and hardware make up almost 60% of e-commerce sales, and consumers seemed to pull back on their purchases due to their personal financial situations.

On the positive side, Costco did note that it sees inflationary pressures easing to some extent. However, commodity prices aren't returning to pre-pandemic levels, and that could require further adjustments from consumers who've hoped that things would get back to normal at some point.

C3 gets an A+

Posting a big gain, though, was C3.ai (AI 0.79%), whose shares rose 15% in premarket trading. The enterprise artificial intelligence software specialist reported fiscal third-quarter financial results for the period ending Jan. 31 that continued to build hype in the investing community about the prospects for AI in the long run.

C3's financial numbers didn't look all that good. Revenue was down year over year, falling 4% to $66.7 million. Losses widened to $63.2 million, or $0.57 per share. Even after accounting for extraordinary items, C3 posted an adjusted loss of $0.06 per share.

However, C3 attributed the financial performance to a transition in its pricing model toward consumption-based sales, which could generate greater growth in the long run. Moreover, with an expanding business pipeline and partner ecosystem, C3 expects to post adjusted profits by the end of the next fiscal year.

Hype about the use cases for artificial intelligence has given the AI stock sector a major boost in recent weeks, and C3.ai has been a big winner, with its share price already having doubled since the beginning of the year. Yet longtime shareholders still won't be too pleased with the stock's performance, given that it's still down 80% from its highs shortly after its December 2020 initial public offering.