After years of economic malaise spurred a wave of cutbacks, closures and mergers, reshaping the refining industry in the world's fourth-biggest oil using nation, Japan's Cosmo Oil Co. is reckoning with the aftermath.

While two of its rivals combined to form JXTG Holdings Inc., and another two — Idemitsu Kosan Co. and Showa Shell Sekiyu KK — are in the process of merging, Cosmo is emerging from the revamp with its independence intact. It's now considering buying Canadian oil for the first time ever, evaluating the upgrade of some refineries so that they are capable of processing more of such new types of crude, and looking to tie up with Chinese independent processors to jointly ferry supplies from far away.

Shares of Cosmo Energy Holdings Co., the company's listed parent, have more than doubled over the past year, and in August posted their biggest monthly gain since debuting under a new holding structure in October 2015. While relatively weak crude prices, a gain in refining margins due to strong regional demand, and disruptions from hurricanes in the U.S. boost Asian processors' performance, the Japanese firm is assessing how to leverage potential new sources of oil and deal with changing regulation as domestic consumption continues to shrink.