What happened

Shares of Roku (NASDAQ:ROKU) rose 31% in August 2018, according to data from S&P Global Market Intelligence. The maker of internet-connected set-top boxes and smart TV software platforms crushed Wall Street's expectations in last month's second-quarter earnings report.

So what

Roku's second-quarter sales rose 57% year over year, landing at $157 million. On the bottom line, the year-ago period's net loss of $3.18 per share was turned into a breakeven result this time. Your average analyst would have settled for a net loss of $0.15 per share on sales in the general vicinity of $141 million.

The stock rose more than 20% higher the next day. A bevy of analyst upgrades and price target boosts completed Roku's 31% gain in August.

A smiling young couple cuddling on the couch, and the girl is holding a TV remote.

Image source: Getty Images.

Now what

Near the end of the month, Roku's shares backed down from their all-time highs on reports that tech giant Amazon.com is planning a free video-streaming service that looks like a carbon copy of the Roku Channel. That potential threat shaved 7% off of Roku's highs, but the stock still gained 31% in August and 153% over the last 52 weeks.

The evolving strategy with a focus on high-margin software sales looks like a winner. It's no surprise to see Roku investors embracing that powerful value driver, even in the face of high-powered competition.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.