U.S. stocks rallied Wednesday on the back of a jump in oil prices after reports that OPEC had reached a deal to cut production.
"The market will move on the deal but I think the expectations is that it will sort of go away," said Quincy Krosby, market strategist at Prudential Financial and former U.S. energy attaché. "Remember, they all agree that oil prices need to go higher."
The deal was first reported by Reuters in afternoon ET. U.S. crude settled 5.33 percent higher at $47.05 per barrel on the heels of the news. Earlier, U.S. oil had traded lower after a build in gasoline stockpiles offset a draw in crude inventories.
"Any kind of cut is being taken as big news because it gives a bit of a floor to oil prices at around $44," said Robert Pavlik, chief market strategist at Boston Private Wealth.
The Energy Select Sector SPDR Fund ETF (XLE) ended Wednesday trading 4.32 percent higher.
Peter Cardillo, chief market economist at First Standard Financial, had said earlier "there is definitely a feeling that an OPEC deal is coming in November."
The Dow Jones industrial average rose about 110, with ExxonMobil and Caterpillar contributing the most gains. The S&P 500 rose 0.5 percent as energy soared more than 4 percent. Energy saw its best daily performance since January 14, when it gained 4.47 percent.
The Nasdaq composite closed 0.2 percent higher, despite the iShares Nasdaq Biotechnology ETF (IBB) slipping 0.81 percent.
S&P and the Dow both surged more than half a percent after the OPEC deal was announced, while the Nasdaq rose about 0.3 percent.
The the three major indexes had briefly traded lower earlier in the session.
"Now that we've got the Fed and the Bank of Japan out of the way, I think we're entering a quiet period where the election becomes more important," said Luke Bartholomew, investment manager at Aberdeen Asset Management. Both central banks held monetary policy meetings last week.
Jeremy Klein, chief market strategist at FBN Securities, attributed the fall to an surprise build in gasoline inventories reported by the Energy Information Administration, which briefly weighed on oil prices. "The gasoline inventories have been more important than the oil inventories recently," he said. "At least that's what it seems like from the traders' perspective."
The market also contended with a number of Federal Reserve speeches and commentary. Fed Chair Janet Yellen said in a prepared testimony to the House Financial Services Committee that U.S. banks are well capitalized, but remain challenged by weak interest income. She later said the central bank does not have a "fixed timetable" for raising rates.
"It's going to be hard to fight the wave of Fed speakers coming today," said Cardillo. "I think that will keep the market nervous."
Minneapolis Fed President Neel Kashkari said in a speech the U.S. central bank an keep interest rates low for longer because even with jobs being created at a "pretty healthy clip" low rates are not creating inflationary pressures. St. Louis Fed President James Bullard also spoke, but did not comment on monetary policy.
Meanwhile, Chicago Fed President Charles Evans said in another speech that raising rates because of financial stability concerns could leave the central bank less able to hit its inflation target. Cleveland Fed President Loretta Mester and Kansas City Fed President Esther George are due to speak after the bell.
WTI intraday chart
U.S. equities rose sharply on Tuesday, following the first presidential debate between Donald Trump and Hillary Clinton. "I think we're seeing the dust settle a bit after the debate," said Mike Bailey, director of research at FBB Capital Partners. "I think the market is sort of in between two major catalysts right now," he said, referring to Monday's debate and the start of earnings season.
"If we look back at the last few quarters, earnings have beaten the Street by about 3-to-4 percent," he said. "I think a 3-to-4 percent beat would be reasonable to expect."
"Short-term momentum has improved in the past week, supporting a near-term test of initial (and final) resistance at the August highs," said Katie Stockton, chief technical strategist at BTIG, in a note to clients. "We would view a breakout as a positive technical catalyst, and we are encouraged that the NASDAQ Composite Index has already cleared equivalent resistance."
In corporate news, Nike shares fell 3.78 percent after the company reported disappointing quarterly results. Sonic's stock also tumbled 7.29 percent after the firm lowered its fourth-quarter guidance. "Sonic kind of caught my ear," said Kim Forrest, senior equity analyst at Fort Pitt Capital. "I'm concerned the consumer isn't buying restaurant meals."
In economic data news, U.S. durable goods orders for August came in unchanged versus an expected decline, but core capital goods orders rose for a third straight month.
"The modest capital spending trend continues," said Peter Boockvar, chief market analyst at The Lindsey Group. "Orders are up for a 3rd month but are still down 1.3% y/o/y and on an absolute basis, the current spending level was also seen in 2006. This of course is not new news but disappointing nonetheless. What is also clear is that the econometric model that says 'lower rates should lead to more capital spending via borrowing' is of course broken."
Overseas, European equities rose broadly as shares of Deutsche Bank rebounded from all-time low levels. CEO John Cryan told a German newspaper that the bank did not need any government assistance or a capital increase. The shares have been under pressure on worries that an anticipated multi-billion fine from the US Justice Department could damage the bank's finances.
JJ Kinahan, chief strategist at TD Ameritrade, said investors should approach the situation with caution. "The situation seems to change every day. It's hard enough to put your arms around U.S.-traded companies and when you have a foreign company, ... that makes matters even harder."
"Everything has a very negative tone and that gives us cause for pause," said Matt Schreiber, president of WBI. "I think we're in an environment that is very risky."
Meanwhile, U.S. Treasurys traded lower, with the two-year note yield near 0.76 percent and the benchmark 10-year note yield at 1.57 percent. The U.S. dollar rose against a basked of currencies, with the euro near $1.122 and the yen around 100.68.
The Dow Jones industrial average rose 110.94 points, or 0.61 percent, to close at 18,339.24, with Caterpillar the top advancer and Nike the biggest decliner.
The rose 11.44 points, or 0.53 percent, to end at 2,171.37, with energy leading eight sectors higher and telecommunications lagging.
The Nasdaq advanced 12.84 points, or 0.24 percent, to 5,318.55.
About three stocks advanced for every decliner at the New York Stock Exchange, with an exchange volume of 910.06 million and a composite volume of 3.762 billion at the close.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded near 12.4.
Gold futures for December delivery settled $6.70 lower at $1,323.70 per ounce.
—CNBC's Peter Schacknow, Chris Hayes and Reuters contributed to this report.
On tap this week:
*Planner subject to change.
4:35 p.m. Cleveland Fed President Loretta Mester
7:15 p.m. Kansas City Fed President Esther George
5 a.m. Philadelphia Fed President Patrick Harker
8:30 a.m. Initial claims
8:30 a.m. GDP Q2 (third read)
8:30 a.m. International trade (Aug adv)
8:50 a.m. Atlanta Fed President Dennis Lockhart
10 a.m. Fed Gov. Jerome Powell
10 a.m. Pending home sales
2:30 p.m. Minneapolis Fed's Kashkari
4 p.m. Fed Chair Yellen speaks via videoconference with a forum for minority bankers, Kansas City Fed
Earnings: McCormick, The Container Store
8:30 a.m. Personal income/spending
9:45 a.m. Chicago PMI
10 a.m. Consumer sentiment
CORRECTION: This story has been updated to reflect Quincy Krosby's title at Prudential Financial is market strategist.