The roughly 30% return in the broader stock market over the past three years has provided a nice lift to most investors' portfolios. But while individual returns varied widely around that average, a small share of stocks far outpaced that positive result.

Today, I'm taking a closer look at two of these companies, World Wrestling Entertainment (WWE) and Grubhub (GRUB). Each stock has soared by about 300% since mid-2015, equating to a quadrupling of shareholders' initial investments.

Profitable entertainment

WWE's stock has soared this year as investors gained confidence in far higher sales, and profits ahead from the TV network in the coming months and years. The company just reached a new distribution deal with Fox Sports that is worth almost four times its previous agreement with NBCUniversal. The new partnership will give WWE its largest exposure yet, and it shows that management is having no trouble monetizing its deep portfolio of wrestling entertainment content.

Two wrestlers fighting in the ring

Image source: Getty Images.

The company is also finding success in marketing its direct-to-consumer streaming services. It boosted paying subscribers to 1.8 million in the most recent quarter, for a 10% increase from the prior year. That success helped power a significant improvement in profitability, as operating margin jumped to 8% from 5%.

Better still, WWE is seeing far higher user engagement these days, with fans consuming 509 million hours of its programming over the last six months, a 71% uptick from last year. While some of those gains came from free services like social-media platforms, WWE's paid platform is growing too, which should give the company plenty of room to raise prices in the future. Combine that prospect with the company's higher distribution income from its Fox deal, set to lift results beginning in 2019, and investors have many reasons to be optimistic about this business today.

Feeding hungry users

Grubhub is the country's leading online food ordering and delivery provider, and that focus has paid off as consumers shift demand in that direction and as restaurant chains move aggressively into this niche.

A look at the company's latest earnings results demonstrates the power of that strong positioning. Sales rose 51% in the second quarter, thanks to a 70% spike in active users and a 39% increase in food sales. Grubhub also bolstered its portfolio of leading restaurant choices with its acquisition of LevelUp, bringing giants like KFC and Taco Bell on board.

A customer orders food for delivery using a smartphone.

Image source: Getty Images.

Grubhub is profitable today despite the management team's focus on market-share growth. Operating income over the past six months was $66 million, up from $47 million in the prior-year period. CEO Matt Maloney and his team predict that adjusted earnings will rise to between $245 million and $270 million, from $184 million last year, as the company approaches annual sales of nearly $1 billion in fiscal 2018. The booming delivery niche will play an important role in achieving those aggressive targets.

Are more gains in store?

Both WWE and Grubhub have seen their valuations jump as investors try to adjust for their quickly increasing earning power. That spike raises the risk of a dramatic pullback in the stock price, especially if either company fails to meet the high expectations it has set for growth over the coming quarters.

Yet their increased valuations also reflect fundamental improvements in WWE's and Grubhub's businesses, which are translating into higher profitability and strong sales growth in attractive markets. If those powerful trends continue, shareholders could see additional market-beating gains ahead for these in-favor stocks.