What happened

Shares of Roku (NASDAQ:ROKU) gained 13.8% in June 2018, according to data from S&P Global Market Intelligence. The maker of software and set-top boxes for streaming video solutions in the living room saw share prices jump on two separate analyst-driven occasions -- and one 6% surge completely out of the blue.

So what

Last month started off with that inexplicable 6% jump on June 5. The next week, Roku got a bullish research note and an optimistic target price from analyst firm Keybanc Capital Markets, based on the analyst's bullish view of rising advertising sales and accelerating account growth on the Roku platform. The stock gained another 6% that day.

Finally, analyst firm Macquarie published an even higher target price for Roku shares than Keybanc's $48 per share, supported by positive remarks about the streaming market as a whole.

"Where once cable providers aggregated content through channels, Roku now plays the role as an aggregator of digital services through its smart TV licensed OS, DTC licensed products, and its own players," said Macquarie analyst Paul Golding. The stock banked another 4% single-day gain on that review.

A young couple enjoying a TV show, devouring handfuls of popcorn with wide-eye excitement in their eyes.

Image source: Getty Images.

Now what

The company's famed set-top boxes are still an important part of the business but its software licenses are the future. That division recently passed the hardware segment to provide more than half of Roku's total sales in the first quarter of 2018. Since the software also comes with 71% gross margins versus the player hardware's 16% margin, Roku investors surely don't mind that strategy shift at all.

Roku is following the familiar playbook of high-growth upstarts, investing every spare dollar into more R&D and marketing projects. The company is unprofitable today and will probably stay that way for a few more years, but it's all about maximizing revenues and profits for the long haul. Keybanc and Macquarie celebrated that business strategy in June and investors were quick to jump aboard the bandwagon.

Anders Bylund has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.