What happened

Shares of MongoDB (MDB -2.10%) have been on fire this year as the database specialist jumped 82% through the first six months of the year, according to data from S&P Global Market Intelligence. The company has continued to put up blockbuster growth numbers, made a savvy acquisition, and fended off a threat from Amazon.com.

As you can see from the chart below, the gains came mostly from surges following its two earnings reports, in March and June.

MDB Chart

MDB data by YCharts.

So what 

MongoDB started off the year slowly as Amazon unveiled a competing product called DocumentDB, pushing the stock down in January. But it soon recovered those losses as the broad market rose and cloud stocks continued to reap big gains. Then, shares skyrocketed on the fourth-quarter earnings report, surging 25.6% on March 14 and continuing to rise from there.

A digital interface showing graphics and coding language.

Image source: Getty Images.

Revenue rose 71% to $85.5 million, crushing estimates at $74 million, and MongoDB Atlas, the company's cloud-based database service, saw sales jump 400% to contribute 32% of total revenue.  Its adjusted loss of $0.17 per share also beat expectations at $0.38, and CEO Dev Ittycheria called the performance "exceptional." In its guidance, the company called for revenue of $363 million to $371 million for the current year, up 36% to 39% from 2018.

The stock got another boost in April when it formed an expanded partnership with the Google Cloud Platform to provide deeper product integration and integrate MongoDB Atlas into the Google platform. Later in April, the company acquired Realm, a maker of a mobile database and synchronization platform, for $39 million. 

The stock popped again in June on a first-quarter earnings report that showed growth of 78% to $89.4 million, ahead of the company's guidance, as MongoDB Atlas grew 340% to make up 35% of total revenue. Management also raised its full-year revenue guidance to a range of $375 million to $381 million. 

Now what 

MongoDB seems to have to put to rest concerns about challenges from Amazon, and the company has made smart moves like the Realm acquisition and its tie-up with Google Cloud. Still, the stock remains dearly priced, trading at a price-to-sales ratio of more than 20 based on this year's revenue guidance, and the company is still not profitable.

High expectations are baked into the stock, meaning investors can expect volatility one way or the other, depending on whether the company can keep putting up big growth numbers.