Both Ubisoft (UBSFF 7.13%) and Electronic Arts (EA -0.65%) have generated huge returns for shareholders over the last five years, as both have been expanding margins from the growing demand for digitally delivered in-game content.

We're going to take a look at the basic investment case for each to find out which one is the better buy.

Ubisoft's Assassin's Creed Origins game box art depicting an Egyptian setting with pyramids, palm trees, and a hooded figure in the foreground holding a bow.

Ubisoft's Assassin's Creed Origins is the next installment in the series due for release in fall 2017. Image source: Ubisoft

Ubisoft

Ubisoft is headquartered in Paris, France, and is home to the popular Tom Clancy shooters, in addition to Watch Dogs, Far Cry, and Assassin's Creed.

The online multiplayer game modes of the Tom Clancy series have been a key driver of Ubisoft's recurrent in-game revenue in the new age of digital distribution of video game content. Over the last five years, Ubisoft's digital revenue as a percentage of total revenue has increased from 11.7% to 50%, and it's expected to keep growing.

With more revenue coming from digitally delivered content, Ubisoft has been able to generate a greater amount of profit based on cash flows in the last four years (excluding fiscal 2016).

Metric Fiscal 2017 Fiscal 2016 Fiscal 2015 Fiscal 2014 Fiscal 2013 Fiscal 2012
Revenue $1,740 $1,662 $1,746 $1,201 $1,498 $1,266
Cash flow $178 ($177) $277 $143 $34 $9.8

Data source: Earnings press releases. Figures based on current exchange rate. Dollar amounts in millions.

Ubisoft mainly caters to console and PC gamers and has been somewhat late to the party in pursuing the profitable growth of mobile games. The Paris-based company finally took the plunge over the last year with two acquisitions -- Ketchapp and Growtopia. But it's just a splash since mobile and other revenue made up only 7% of Ubisoft's total revenue in fiscal 2017 ending in March.

Similar to Activision Blizzard, Ubisoft has been getting interested in movies and consumer products. In December 2016, a movie adaptation was released based on one of the biggest franchises in gaming -- Assassin's Creed -- but it grossed only $55 million at the box office, with an estimated budget of $125 million, according to Box Office Mojo. However, the movie was a success in management's perspective, causing a 30% increase in sales of the Assassin's Creed game around the time of the movie release. And that's really the whole point with these non-gaming initiatives like movies and consumer products -- to stir up brand awareness around best-selling game franchises.

Electronic Arts' Madden NFL 18 game box art featuring NFL quarterback Tom Brady.

Image source: EA.com

Electronic Arts

Through its EA Sports label, the California-based game maker produces two of the top selling sports franchises in gaming -- FIFA and Madden NFL. EA also licenses the Star Wars brand with its Star Wars: Battlefront series. Other major franchises include Battlefield, The Sims, Need for Speed, and the popular mobile game Plants vs. Zombies.

Metric Fiscal 2017 Fiscal 2016 Fiscal 2015 Fiscal 2014 Fiscal 2013 Fiscal 2012
Revenue $4,845 $4,396 $4,515 $3,575 $3,793 $4,186
Cash flow $1,578 $1,465 $1,172 $786 $324 $277

Data source: Earnings release presentations. Dollar amounts in millions.

While Ubisoft has been playing catch up with mobile games, EA was primed and ready for the new digital age of gaming seven years ago when it had 48 mobile games available around the time the iPad launched. In fiscal 2017, EA generated about 13% of its revenue from mobile games, about twice the percentage of Ubisoft. Altogether, digital revenue comprises 63% of EA's annual revenue.

As gamers buy more content digitally, EA has seen its gross margin expand from 63% to 73.2% over the last five years. As you can see in the table above, profits based on cash flow have exploded as a result.

The Ultimate Team virtual card game has been an important contributor to EA's digital revenue growth in recent years. Ultimate Team for FIFA and Madden made up 17% of EA's total revenue last year, and this percentage will likely grow over time. 

Ultimate Team has been so successful that management is currently planning a similar feature in the upcoming Star Wars: Battlefront 2 later this year. It's likely only a matter of time before there is an Ultimate Team style feature in EA's first-person shooter Battlefield as well.

Which is the better buy?

Ubisoft's price-to-free cash flow ratio is about 70 based on fiscal 2017 numbers. The figure has been elevated by the expectations for strong growth over the next few years, as promised by Ubisoft management. Management expects revenue to reach $2.5 billion, which is anticipated to result in $357 million in free cash flow based on today's currency exchange rate. 

On the other hand, EA is expecting cash flow to be flat in fiscal 2018 and the stock currently trades at 29 times fiscal 2017 free cash flow. Which makes it a cheaper stock compared to Ubisoft, but with slower growth expectations.

However, EA has a much stronger balance sheet with $4.5 billion in cash and short-term securities, with only $990 million in debt. That's a net cash position of $3.5 billion. On the other hand, Ubisoft has a net debt position of about $96 million, which tilts the advantage to EA. 

Since EA trades at a much lower valuation based on current cash flow generation, and since we're taking a leap of faith that Ubisoft will meet its guidance looking out two years, EA seems like the safer bet at this time making it the better buy, in my opinion.