Wall Street banks, including JPMorgan , have engaged in speculative trading and stockpiled U.S. renewable fuel credits turning a federal environmental program into a profit stream, The New York Times reported on Sunday.

A JPMorgan trader pressed the bank to buy all the Renewable Identification Numbers (RINs) it could, The Times said citing an unnamed industry executive. Prices for the credits spiked by as much as 20-fold between January and mid-summer.

With the supply of available RINs growing tighter, JPMorgan offered to sell hundreds of millions fuel credits to refiners this year, The Times reported.

JPMorgan's role and that of other banks in the RINs market has hurt U.S. refineries that often acquire RINs to avoid stiff penalties from the U.S. Environmental Protection Agency (EPA), The Times reported, adding that the moves have likely contributed to higher gasoline prices at the pump.

U.S. refiners and gasoline importers must generate or buy RINs to comply with EPA rules requiring they blend growing quantities of ethanol into gasoline supplies. RINs prices spiked from 7 cents in January to a high of $1.43 this summer, before retreating to 60 cents, the newspaper said.

The price spike has saddled U.S. refineries with huge bills and refiners have passed along the higher costs to consumers, the report said.

Independent refiner Valero Corp estimated that its cost to acquire RINs would skyrocket to $800 million, The Times reported.

A spokesman for JP Morgan in an email to Reuters said, "The fact of the matter is, we simply do not trade RINs, nor do we carry an inventory other than a marginal amount for compliance purposes.

"From time to time, we offer to purchase RINs on behalf of clients who need to fulfill their EPA-mandated obligations, but our activity is so limited that the last time we assisted a client in the market was over a year ago," the spokesman said.

(Reporting by Joshua Schneyer; Editing L Gevirtz)