Carl Icahn's shares in CVR Energy have doubled since Trump won the election

Carl Icahn speaking at Delivering Alpha in New York on Sept. 13, 2016.

Shares of oil refiner CVR Energy have nearly doubled since Donald Trump's election, providing a windfall to investor Carl Icahn, who will advise the president on regulations — including a rule change that would benefit the company.

The stock rose 98.5 percent between Trump's election and its closing high earlier this month, as the Financial Times pointed out on Friday. Just before Friday's close, it was up nearly 81 percent, following a 6 percent slide on the day.

The stock is up about 8 percent since the presidential transition team announced on Dec. 21 that Icahn would serve as "a special advisor" to Trump.

The broader S&P 500 energy sector is up about 7 percent since the election, supported by Trump's fossil fuel-friendly "America First" energy policy.

Icahn controls 82 percent of CVR Energy and has long railed against a federal rule that requires refiners that cannot blend ethanol into gasoline to buy credits instead. He has continued to bring up the issue in media appearances since being recruited by Trump.

The rule hurts so-called merchant refiners like CVR Energy because they do not blend fuels, which means they have to buy credits from larger refiners with blending and retail operations, such as Valero Energy and Marathon Petroleum.

Shares of Marathon are up more than 16 percent since the election, while Valero has gained about 15 percent.

To be sure, Valero warned last July that its cost of complying with the Renewable Fuel Standard, largely related to the credits, could double in 2016.

Former White House ethics advisors told CNBC last month that Icahn's role presented a clear conflict because it puts him in a position to influence the president to repeal the regulations and thereby help CVR. That would potentially boost CVR's stock price and enrich Icahn.

Last month, a lawyer for Icahn Enterprises told CNBC that Icahn will not be a federal employee and wants to serve his country.

"Mr. Icahn has achieved vast success in this country and is now uniquely situated to give back in a small way by volunteering his time and efforts to provide advice for consideration (or rejection) by President-Elect Trump," Jesse Lynn, general counsel at Icahn Enterprises, said.

The billionaire investor says that the provision in question puts undo stress on merchant refiners' finances and prevents them from investing in their facilities. He argues that the burden of buying the credits could push some refiners into bankruptcy, which would lead to higher gasoline prices for consumers.

Energy analysts say Icahn is overstating the threat.

Tom Kloza, global head of energy analysis at Oil Price Information Service, said northeastern refiners on the brink of bankruptcy are not in dire straits because of the policy, but due to competition from Gulf Coast and Middle East.

Kloza said some refineries could go out of business if the price of Renewable Identification Numbers, or RINs as the credits are known, rise above $1.25 on a sustained basis. But that is unlikely, and the White House could adjust the Renewable Fuel Standard if the threat became serious, he said.

RIN prices traded just under 90 cents at the end of last year. Kloza noted the correlation between falling RIN prices and two Trump announcements. The first was Oklahoma Attorney General Scott Pruitt's nomination to head the Environmental Protection Agency, which implements the Renewable Fuel Standard. The second was Icahn's role as a special advisor.