Shares of theme park operator Six Flags Entertainment (NYSE:SIX) closed 6.2% higher on Wednesday, following the release of thoroughly disappointing second-quarter results.

You heard me right: Six Flags missed Wall Street's revenue and earnings targets, but share prices still jumped on the news. It's usually the other way around, right?

Don't worry, I'll help you sort out this strange turn of events.

By the numbers

Metric

Q2 2017

Q2 2016

Year-Over-Year Growth

Revenue

$422 million

$407 million

3.7%

Net income

$71.6 million

$80.1 million

(11%)

GAAP earnings per share (Diluted)

$0.59

$0.64

(7.8%)

Adjusted EBITDA profits

$166 million

$155 million

7.1%

Data source: Six Flags.

First, Six Flags headed into this earnings report with little to prove and much to gain. Share prices had declined 7% year to date, and a fairly large number of analysts called the stock more of a hold than a buy.

Second, some of the financial weakness was simply beyond the company's control. For example, heavy rains in Texas and the East Coast region over the Memorial Day weekend put a serious dent in Six Flags' second-quarter numbers. The storms came back again in the second half of June, cutting down the expected summer tourist crowds. These weather events were especially hard on Six Flags' high-margin sales of single-day park passes.

Finally, management kept a stiff upper lip about the stormy situation and noted that weather-related effects tend to balance out over the course of a full summer season. So, the third quarter is shaping up to mend some of the second quarter's failings, and it helps that Six Flags recently completed two brand-new water parks.

Analysts had been looking for earnings of $0.70 per share on sales near $437 million, but all of these ameliorating factors made it easy to shrug off the large misses and focus on the future instead.

Steel-tube roller coaster in yellow and red, with several twists and turns in the track.

Image source: Getty Images.

Cool, so what's next for Six Flags?

Looking ahead, Six Flags' management likes what they see in recent water-park results and have been fielding calls from water-park operators around the country who might want to make a trade.

"Since we announced our water park acquisition strategy, we have received multiple inbound inquiries from water park operators around the U.S.," said Six Flags CEO Jim Reid-Anderson on the earnings call. "So the opportunity is not only compelling, but it's large scale."

This management team is not in the habit of issuing firm guidance figures, but Reid-Anderson did underscore the improved weather several times. So, I guess we should take that as a solid hint: Things are looking up, but management won't tell us exactly how rosy the picture might be.

This stock chart is as rocky as Six Flags' roller coasters, and there's no real end in sight to that volatility. But investors have pocketed a market-beating 120% gain in five years, and the stock comes with a generous 4.3% dividend yield. Whatever happens to the water-park strategy, Six Flags is plotting some international expansion over the next several years. Sounds like a strong plan to me.

As long as you have the stomach for a few unexpected twists and turns along the way, we're talking about a pretty solid investment for the long run.

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