The price of natural gas, which has been volatile in recent months, rose 2.3 percent in April, according to the Energy Information Administration.

    That was the largest increase since October and the strongest increase since February, the agency said.

    Natural gas prices were down 2.5 percent from April 2017.

    Coal prices rose 2 percent.

    Other commodities were flat.

    The index for manufacturing rose 1.7 percent, while the S&P 500 index rose 0.8 percent.

    For the year, the index for stocks fell 0.7 percentage points.

    Read moreThe rise in oil prices was also driven by gains in U.S. production, the S & P 500 said.

    Oil prices have fallen more than 70 percent in 2017, after reaching record highs in 2015.