Warren Buffett said he’s following tax proposals in Congress and may be compelled to buy or sell shares based on where the legislation ends up.

"We’ve got actions on both sides that we would take,” he said on CNBC Tuesday. Buffett added that he thinks Congress and President Donald Trump will succeed in cutting taxes.

The comment is a rare admission from Buffett, who’s frequently said he focuses on the fundamentals of a business when he decides whether or not to hold an investment. And it builds on comments he made at Berkshire Hathaway Inc.’s annual meeting earlier this year.

“We have lots of stocks with lots of gains and we have a few stocks with lossesand here we are in October, and if something happens that changes the tax rates significantly on Jan. 1, it would pay me -- assuming that they would reduce rates on capital gains or corporate rates -- it would pay me to sell the losses now and defer the gains until next year,” he said.

President Trump and Republican leaders announced their long-awaited tax plan in September. The framework proposes cutting the top individual rate to 35 percent -- but leaves it up to Congress to decide whether to create a higher bracket for those at the peak of the income scale.

The rate on corporations would be reduced to 20 percent from the current 35 percent, and businesses would be allowed to immediately write off their capital spending for at least five years. Pass-through businesses would have their tax rate capped at 25 percent.

This article was provided by Bloomberg News.