US Markets

Stocks close higher as Street awaits key Fed decision; oil boosts energy

Pisani: Energy sector surges
Pisani: Energy sector surges
Cashin says: Hints of no rate hike
Cashin says: Hints of no rate hike
CNBC Fed survey: Mixed outlook following rate hike
CNBC Fed survey: Mixed outlook following rate hike
How the Fed rate hike affects the stock market
How the Fed rate hike affects the stock market

U.S. stocks closed more than half a percent higher Wednesday as investors eyed a jump in oil prices and looked ahead to the Federal Reserve's decision on a rate hike. (Tweet This)

"It's all about waiting for tomorrow. Right now you're seeing the market being positive. The consensus is the Fed is not going to do anything," said Jeff Carbone, co-founder and managing partner of Cornerstone Financial Partners.

The Dow Jones industrial average closed about 140 points higher, after adding as much as 156 points in the minutes before the close. Chevron led the index higher.

The energy sector ended 2.77 percent higher, to lead S&P advancers.

The S&P 500 broke resistance at 1,993 and ended within 5 points of the psychologically key 2,000 level.

The Dow ended above its recent closing high hit Aug. 28, which means "we're going to rally into the 50-day moving average," said Adam Sarhan, CEO of Sarhan Capital.

In the last few weeks, both the Dow and the S&P formed the so-called death cross in which the 50-day moving average falls below the 200-day.

US oil surges 5.7% to settle at $47.15 a barrel
Janet Yellen
Bonds wobbly after sharp selloff; Fed awaited
Dollar retreats, weighed down by fall in US inflation
Gold rises after unexpected drop in US inflation

Gains in oil "should cushion any declines in the market today," said Peter Cardillo, chief market economist at Rockwell Global Capital. He also noted options expirations Friday and short covering ahead of the Fed's Thursday announcement.

Weekly crude oil inventories unexpectedly fell, supporting further gains in oil prices. Crude surged more than 5.5 percent, while brent was briefly up more than 7 percent above $50 a barrel.

Crude oil futures for October delivery settled up 5.7 percent at $47.16 a barrel. Gold futures ended up $16.40, to $1,110.90 an ounce, their highest level since last week.

The Federal Open Market Committee could raise short-term interest rates for the first time in nine years at its two-day meeting that began Wednesday. All eyes are on Thursday afternoon's expected statement and press conference.

"You don't have a market-moving piece of news in this market that seems to have come into today in a bit of equilibrium," Art Hogan, chief market strategist at Wunderlich Securities, said of the opening stock index moves. "I think it tells us nobody has an idea what the Fed is going to do tomorrow.

In morning trade, the Dow briefly turned negative and tried to stay with the S&P 500 in positive territory. The Nasdaq composite also reversed slight losses to trade mildly higher.

Treasury yields held near highs hit Tuesday, with the 10-year at 2.29 percent and the at a four-year high of 0.82 percent.

"The bond market is hedging itself against an eventual increase (in rates)," said Ben Pace, chief investment officer at HPM Partners.

The U.S. dollar reversed to trade about a third of a percent lower against major world currencies, with the euro just below $1.13 and the yen around 120.6 yen against the greenback.

Wall Street is divided over whether the central bank will decide to raise rates. Forty-nine percent of respondents to CNBC's Fed Survey forecast a rate hike will come at the current meeting.

"I think (Thursday) afternoon the only thing I can guarantee is volatility for two hours," said James Meyer, chief investment officer at Tower Bridge Advisors.

Read MoreCould the market have rallied itself into a rate hike?

Stocks rallied more than 1 percent Tuesday, more than recouping Monday's mild losses. The Dow Jones industrial average joined the other major averages to end within 10 percent of its 52-week high, out of correction territory.

The Russell 2000 closed out of correction mode Wednesday.

"I think (Tuesday's) rally was sending a message to the Fed to go and raise rates, preparing the way for a solid fourth quarter for equities," Cardillo said.

Most strategists said the rally meant the Fed would hold off on tightening Thursday.

"It seems like the investors are optimistic that the Fed is going to stand pat and keep rates low," said Jack Ablin, chief investment officer at BMO Private Bank. "The Fed is stuck. They missed an opportunity."

Read MoreJust how the Fed will hike rates...if it does

Analysts mostly looked past the last key data out ahead of the Fed meeting. August CPI, showed a decline of 0.1 percent, its first drop in seven months. The ex-food and energy figure rose 0.1 percent.

"The Fed can well afford to wait given inflation remains contained," said John Lonski, chief economist at Moody's.

In continued signs of strength in the housing sector, the September home builder sentiment rose one point to 62, the highest since 2005.

In early morning trade, U.S. stock futures were mostly flat. The Dow futures rose almost 50 points before dipping in and out of negative territory.

European shares closed higher, with the STOXX Europe up about 1.5 percent.

In Asia, China's benchmark Shanghai Composite index staged a late-day rally to close almost 5 percent higher — adding to upbeat sentiment in global stock markets.

Major U.S. Indexes

On the earnings front, FedEx reported quarterly profit of $2.42 per share, 4 cents below estimates, with revenue matching forecasts. CEO Fred Smith said the company is doing well considering weaker than expected global economic conditions. Separately, FedEx will increase rates by 4.9 percent at its FedEx Express service, effective Jan.4. The stock closed down 2.84 percent.

Oracle was upgraded to "buy" from "neutral" at SunTrust, which cites increasing opportunities for Oracle's cloud-based business as well as valuation. Oracle ended the session 0.74 percent higher, ahead of its earnings release after the close.

Read MoreEarly movers: FDX, HPQ, ORCL, FIT, HSY, BUD, LINKD, SIRO & more

Hewlett-Packard surged 5 percent. The tech firm said after the close Tuesday that it expected to cut a further 25,000 to 30,000 jobs in its enterprise business.

The Dow Jones Industrial Average