NEW YORK (

TheStreet

) -- Stocks finished higher Wednesday, buoyed by strength in energy and basic materials stocks, after minutes from the Federal Reserve's most recent policy meeting showed that the central bank was unlikely to raise rates soon.

The

Dow Jones Industrial Average

gained 81 points, or 0.6%, to close at 12,560. The

S&P 500

rose by 12 points, or 0.8%, to close at 1340, while the

Nasdaq

jumped by 32 points, or 1.1%, to finish at 2815.

Shares across the energy and basic materials sectors led stocks higher, with

Chevron

(CVX) - Get Chevron Corporation Report

and

Exxon Mobil

(XOM) - Get Exxon Mobil Corporation Report

topping the Dow along with

Caterpillar

(CAT) - Get Caterpillar Inc. Report

and

DuPont

(DD) - Get DuPont de Nemours, Inc. Report

.

Hewlett-Packard

(HPQ) - Get HP Inc. (HPQ) Report

, which gave a weak outlook on Tuesday, was the Dow's biggest laggard, followed by

Bank of America

(BAC) - Get Bank of America Corp Report

and

Wal-Mart

(WMT) - Get Walmart Inc. Report

.

"What we've seen in the last two weeks was really an overdue rotation out of cyclical commodity bets and into more defensive names," said Larry Glazer, managing partner of Mayflower Advisors. "However, the move into defensives may be somewhat exaggerated at this point," he said. "Investors are looking at the Fed and wondering if there's something in Fed policy that could prompt them to change their strategy. They're also unsure if the economy is slowing down so that's causing them to take a cautious attitude."

Federal Reserve officials debated their next move during the April meeting, with some participants expressing the need for a slightly tighter monetary policy in light of economic conditions and increased inflation risks.

A few participants thought economic conditions might warrant a rate hike or asset sales later this year, but noted that even with such steps the monetary policy will still be loose. Some others disagreed, noting that making such moves too soon would damp the ongoing recovery.

One of the challenges for the central bank is figuring out how to shrink its enormous balance sheet, which now holds trillions of dollars of Treasuries and mortgage backed securities as a result of the Fed's steps to heal the financial system. A discussion on how to "normalize" its balance sheet drew a diversity of opinion regarding the timing and pace of asset sales, and whether such asset sales should precede or follow a hike in the federal funds rate.

Officials agreed that more discussion was needed and no decisions were taken at the meeting on this front.

Market breadth was positive, with more than 70% of the stock listed on the New York Stock exchange finishing the day higher. About 680 million shares traded on the New York Stock Exchange, while 1.6 billion shares changed hands on the Nasdaq.

The Energy Information Administration said crude oil inventories were largely unchanged in the week ended May 13, compared with the gain of 500,000 barrels that had been projected by analysts, according to a Platts poll.

Late Tuesday, the American Petroleum Institute reported an increase of 2.67 million barrels to crude stockpiles.

Shares of

Staples

TheStreet Recommends

(SPLS)

plunged 15.1% to $16.68 after the

office-products retailer missed analysts' expectations with a first-quarter profit of 28 cents a share.

Personal computer maker

Dell

(DELL) - Get Dell Technologies Inc Class C Report

soared past estimates for first-quarter earnings of 44 cents a share with an adjusted profit of 55 cents a share and reported strength in its small and medium-sized business unit. Dell also forecasted second-quarter growth in the mid-single digits. The stock soared 5.3% to $16.75.

Farm machinery company

Deere

(DE) - Get Deere & Company Report

said second-quarter earnings jumped 65% to $904.3 million, or $2.12 a share, which beat estimates for earnings of $2.06 a share. Sales rose 25% to $8.91 billion, topping expectations for sales of $8.14 billion but shares slipped 0.6% at $86.42 on cautious remarks regarding the U.S. economy.

Along with Dell,

Analog Devices

(ADI) - Get Analog Devices, Inc. Report

,

F5 Networks

(FFIV) - Get F5 Networks, Inc. Report

,

Interpublic Group

(IPG) - Get Interpublic Group of Companies, Inc. (IPG) Report

and

Newfield Exploration

(NFX)

were the biggest gainers on the S&P 500.

Aflac

(AFL) - Get Aflac Incorporated Report

,

Urban Outfitters

(URBN) - Get Urban Outfitters, Inc. Report

,

Target

(TGT) - Get Target Corporation Report

and

Hershey's

(HSY) - Get Hershey Company (HSY) Report

,were among the major losers on the S&P, aside from Hewlett Packard and Staples.

The benchmark 10-year Treasury fell 17/32, lifting the yield to 3.176%. The dollar turned higher against a basket of currencies, with the dollar index last up by 0.05%.

.

The June

crude oil contract added $3.13 to settle at $100.56 a barrel. Gold for June delivery rose $15.80 to settle at $1,495.80 an ounce.

The FTSE in London advanced 1.1%, and the DAX in Frankfurt rose 0.7%. Hong Kong's Hang Seng added 0.5%, and Japan's Nikkei gained 1%.

--Written by Melinda Peer and Shanthi Bharatwaj in New York

.

Disclosure: TheStreet's editorial policy prohibits staff editors and reporters from holding positions in any individual stocks.