NEW YORK (TheStreet) -- Stocks held onto modest gains through to market close on Wednesday after the Federal Reserve provided an upbeat assessment of the U.S. economic recovery.

The S&P 500 was up 0.22%, and the Dow Jones Industrial Average rose 0.36%. The Nasdaq added 0.45%, around 6 points short of its record close.

The economy rebounded at a modest to moderate pace over the period from early April to late May, according to the Fed's Beige Book, an anecdotal collection of economic conditions across the 12 districts. Consumer spending, a key GDP component that has lagged in recent month, was on the rebound as the metric increased in 10 of the 12 districts.

However, the energy downturn continued to hurt manufacturing growth with drilling declines in five districts, including Dallas and Kansas City, the central bank said.

"The tone of the latest Beige Book was somewhat encouraging as it points to further stabilization in economic activity as the headwinds to growth abate," said Millan Mulraine, deputy head of U.S. strategy at TD Securities. "The report signals a generally optimistic outlook among business contacts, which we see as a crucial sign that the soft-patch earlier this year is being seen as temporary."

Crude oil prices dropped nearly 3% and gave up a level above $60 a barrel ahead of Friday's meeting of the Organization of the Petroleum Exporting Countries. The group is expected to maintain current record production levels despite global oversupply.

"The OPEC stance is currently believed to be one of maintaining the 30 million barrel a day production level, which means the expectation of additional Iranian output is yet another bear in the market - currently oversupplied by 2.5 million barrels a day," said Daniel Holder, commodity analyst at Schneider Electric.

If you liked this article you might like