What happened

Financial technology specialist Square (NYSE:SQ) trounced the market last month by gaining 23% compared to a 2% increase in the S&P 500, according to data provided by S&P Global Market Intelligence.

^SPX Chart

^SPX data by YCharts.

The boost helped push shares up more than 50% so far in 2018 and up over 300% since the company's IPO in late 2015.

So what

May's rally was sparked by a positive investor reaction to the first-quarter earnings report. The company posted accelerating sales growth thanks to a mix of booming purchase volumes and gains tied to bitcoin trading.

A vendor processes a payment using a smartphone.

Image source: Getty Images.

Square's subscription-based revenue nearly doubled, too, thanks to rising demand for products like Square Capital and Instant Deposit. CEO Jack Dorsey summarized the good news for investors in his shareholder report in early May by saying, "We continue to accelerate growth at scale, expanding our ecosystem for sellers and individuals."

Now what

Dorsey and his team raised their 2018 outlook in response to the strong start to the year. They are now targeting revenue of between $3 billion and $3.06 billion, which would translate into a 44% gain.

Square is still expected to post a modest net loss for the period as it prioritizes market share growth, though. And investors looking to buy the stock also must balance those impressive sales results against the fact that shares have become much more expensive lately. The stock is valued at almost 10 times sales today, compared to five times sales a year ago.