A monitor displays Alibaba Group signage on the floor of the New York Stock Exchange (NYSE) in New York, U.S., on Monday, Jan. 7, 2019. Michael Nagle | Bloomberg | Getty Images

Alibaba shares soared after the company reported market-beating earnings in the three months ended December, with investors content with a record amount of spending by the company in the 2018 calendar year, hoping that it will spur future growth. The Chinese e-commerce giant posted its slowest revenue growth since 2016 in its fiscal third quarter, but net income beat estimates. The stock closed more than 6 percent higher in New York on Wednesday and edged up further in after-hours trading. It has had to contend with a slowing Chinese economy and the ongoing U.S.-China trade war. One area the market was focused on is spending by the company, with some analysts thinking that Alibaba could reign in expenditures because of the tougher operating environment.

But the company ended up spending a record amount in 2018 — something that the market was happy with. Over 278.8 billion yuan, or $41.6 billion, was spent on product development, sales and marketing, general administration and cost of revenue last year, a 86.2 percent increase in renminbi terms from 2017, when the company splashed out 149.7 billion yuan. "Ali appears more disciplined in its spending on operating-related expenses, though top management suggested they are not withdrawing from investing in those strategic businesses," Nomura said in a research note released Thursday. Those "strategic businesses" include what Alibaba calls "new retail" — a term it uses to describe the way it can integrate all its services from payments to logistics to bricks and mortar stores in order to create a shopping "ecosystem." "It's all about how to integrate online and offline to transform to a whole digitalized commercial world," Alibaba CEO Daniel Zhang told CNBC in an interview last year.

We see the company as a leader in China's digital economy across many areas, and note opportunities in Southeast Asia as well. Scott Kessler CFRA Research

It is also investing in food delivery platform Ele.me and local services guide Koubei. And Alibaba said it spent cash on original content and licensing for its online video service Youku. Alibaba finance chief Maggie Wu said the profitability from the company's core commerce business allowed it to generate the money to continue to invest. "This profitability and $7.5 billion in free cash flow generated this quarter enable us to continue to invest in other important strategic businesses and technology to support the growth of our ecosystem," Wu said in the earnings release on Wednesday. While its core e-commerce business is currently the biggest source of revenue and profits, the company sees a more diversified business being stronger in the future. Other businesses such as cloud computing, which is growing rapidly, and digital entertainment have seen their share of revenue increase. Zhang told CNBC last year that cloud computing could be its "main business" in the future.