Sometimes it pays to play. As the broader market was falling on Friday, shares of GameStop (GME 0.49%) leapt by more than 4% in intraday trading, to come within spitting distance of a new multi-year high.

Considering the company hasn't had a good sales quarter in years, that's no small feat.

The catalyst for today's bounce appeared to be an upgrade by an Oppenheimer analyst, who also jacked up his price target on the stock to a cool $50. More on why he upgraded the stock in a minute, but first let's look at the company's latest performance.

GameStop's stock has been one of the market's biggest winners despite logging two straight years of sales declines. Here's a pretty incredible look at how its revenue has fared in comparison to its stock price return:

GME Revenue TTM Chart

GME Revenue TTM data by YCharts

A lot of the most recent rally can be attributed to bearish bets getting taken off of the table. Because it operates in a shrinking industry, and depends on used game sales to power much of its profits, GameStop has attracted some heavy bearish interest against it; enough to make it one of the most heavily shorted stocks in the market.

However, its fortunes seem to be turning. Microsoft (MSFT 0.95%) and Sony revealed key details on their upcoming console releases this week, and the news was nowhere near as bad as GameStop had feared. Sony played up the fact that its system will have a vibrant market for used games, with no restrictions on trade-ins or loaning games to friends. Microsoft, for its part, has announced more restrictive measures, but didn't go so far as to ban used games completely.

With that bullet dodged, GameStop can look forward to being one of the main sales outlets for the next-gen console releases this fall. Given that it's been eight years since gamers saw a refresh from Sony or Microsoft, pent-up demand could be strong. In fact, Oppenheimer's upgrade is based on sales bouncing back big, leading to EPS next year that could hit $3.80, while Wall Street expects GameStop to notch just $3.13 in profits next year.

And if the company does manage to hit $3.80 in earnings, that would leave it valued at only about 10 times forward earnings. Yes, the company has had a brutal final two years of the console cycle. But its future doesn't look that bleak.