The stock market had a rough session on Monday as investors had to assess ongoing challenges on the macroeconomic and geopolitical fronts. In particular, China is increasingly becoming a hotbed of potential problems. The long-standing trade disputes with the U.S. show few signs of getting resolved soon, and recent protests in Hong Kong raise the possibility of further complicating U.S.-China relations. Yet some stocks did manage to post solid gains. Roku (NASDAQ:ROKU), GTT Communications (NYSE:GTT), and ViewRay (NASDAQ:VRAY) were among the top performers. Here's why they did so well.

Roku keeps rising

Shares of Roku climbed another 7%, adding to gains from last week. Investors are excited about the streaming-video provider's prospects, and stock analysts at Needham boosted their price target on Roku by $30 per share to $150. In Needham's opinion, Roku is in the best possible position to benefit from rising adoption of video streaming, even above some better-known pioneers in the industry. The company's advertising-driven revenue model leaves it more vulnerable to changing ad trends, but it also keeps it from having to woo subscribers into paying recurring monthly fees, and many think that Roku's model will win out in the end.

TV showing Roku screen with various content listed.

Image source: Roku.

GTT regains some lost ground

GTT Communications saw its stock rise 21%, rebounding slightly from a big drop following its release of second-quarter financial results. GTT has struggled recently, with revenue coming in well below expectations and losses ballooning from anticipated levels. Moreover, GTT's debt load is significant, and that prompted the telecom company to seek financial advice on selling off noncore assets in an attempt to pay down some of its obligations. Today's move suggests that at least some investors think the steep plunge last week might have been overdone, but it'll still be very difficult for GTT to dig itself out of its debt hole and start making progress again.

ViewRay bounces back

Finally, shares of ViewRay climbed 12%. The medical equipment manufacturer saw its stock lose more than half its value on Friday after its second-quarter results failed to satisfy investors. Even though revenue jumped 84% from year-ago levels, a big drop in new orders caused backlog levels to fall, and losses were wider than many had expected. ViewRay also cut its full-year guidance and announced that its CFO would leave the company at the end of September. The weekend seems to have given ViewRay investors a bit more confidence in the prospects for the MRIdian cancer-treatment system, but it'll still take a lot of work to get through this rough patch.

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.