UPDATED: Wonder Woman and HBO Max gave Roku a power-up on Wall Street.

Shares of Roku ended regular trading Thursday at an all-time high closing price of $329.48 per share, up 1.1% for the day. But that was off its peaks earlier in the day, when the stock surged into the double digits on investor enthusiasm over the company’s pact with AT&T’s WarnerMedia to add HBO Max to its streaming devices after months of haggling.

In early trading Thursday, Roku’s stock hit an intraday high of $352.12 per share (+11.7%) before drifting back down through the session on likely trader profit-taking. The company’s market cap currently stands at about $41.8 billion. The stock has increased 146% year-to-date.

With HBO Max now on Roku (as of Thursday, Dec. 17), customers of its streaming media players and Roku-enabled TVs who also subscribe to the SVOD package will have access to Warner Bros.’ much-anticipated “Wonder Woman 1984” on Christmas Day — as well as the studio’s full 17-film slate in 2021, coming to HBO Max the same day the movies hit theaters.

Financial terms of the deal weren’t disclosed. Roku will now be able to resell the HBO Max service (regularly $14.99/month) to the platform’s customer base, while it will suspend the sale of HBO through the Roku Channel store.

Per Roku’s standard terms, the company takes a 20% cut of subscription revenue and 30% of advertising inventory. However, in the case of the WarnerMedia deal for HBO Max, that may be different.

By sealing the Roku deal, WarnerMedia now has successfully covered all the major OTT device bases. Amazon — which said Fire TV had over 50 million active users in 2020 — agreed to an HBO Max deal in November, after WarnerMedia had landed partners including Apple (iOS and Apple TV), Google (Android, Chromecast and YouTube TV), Xbox, PlayStation and Samsung for the May 27 launch of HBO Max.

On news of the HBO Max deal, Benchmark Co. equity research analyst Daniel Kurnos raised his 12-month price target on Roku stock from $300 to $410 per share. He also cited Roku’s agreement with NBCUniversal for Peacock in September as establishing Roku’s leadership in the streaming space. “While we acknowledge that a lot of the good news already appears to be priced into the stock, we still anticipate a significant upside surprise in 4Q, driven by advertising strength bolstered by material [advertising] CPM [cost per thousand] improvement, which should flow through into 2021,” Kurnos wrote in a Dec. 17 research note.

For Roku and WarnerMedia, getting a deal done ASAP was in both sides’ best interests.

The media company needs to add a healthy number of new HBO Max subscribers to produce revenue that will help it make up the difference for projected box-office losses on the 2021 film lineup, and Roku’s large footprint — 46 million active accounts as of Sept. 30 — will bolster its chances there.

According to AT&T, 28.7 million customers were eligible to get HBO Max at the end of Q3 — but HBO Max had only 8.6 million total “activated” subscribers, or about 30% of the total potential customers, using the service. The deals with Roku and Amazon, which represent around 100 million streaming households, obviously will help raise that number. But next year, WarnerMedia will need to net 8.4 million incremental new HBO Max subs above its current pace to recoup lower revenue from theatrical and home-entertainment distribution for Warner Bros.’ film slate, according to estimates by MoffettNathanson analyst Craig Moffett.

Roku, meanwhile, increasingly stood to lose out on both device sales and revenue from HBO Max by continuing to hold out for better terms from WarnerMedia. The deciding factor for Roku may have come down to a choice of whether it was willing to forego participating in the “Wonder Woman 1984” release cycle and other upcoming WB titles.