NEW YORK (TheStreet) -- Stocks extended modest gains Wednesday as investors looked for value in oversold assets led by energy and materials stocks.

The S&P 500 was up 0.5%, the Dow Jones Industrial Average added 0.39%, and the Nasdaq gained 0.52%.

Crude oil lost gains of more than 2% after crude inventories rose by 3.1 million barrels in the past week, according to the Energy Information Administration. Analysts had expected inventories to rise by 1.75 million barrels. West Texas Intermediate crude closed down 1.5% at $47.81 a barrel, though remained near levels seen in late August. 

Energy and basic materials led market gains despite the drop in crude prices. Among major oil and gas manufacturers, Exxon Mobil(XOM) - Get Report , PetroChina(PTR) - Get ReportRoyal Dutch Shell (RDS.A)  and Chevron(CVX) - Get Report moved higher while the Energy Select Sector SPDR ETF (XLE) - Get Report added 0.3%. In the materials sector, Rio Tinto(RIO) - Get Report , BHP Billiton(BHP) - Get Report  and LyondellBasell(LYB) - Get Report were sharply higher, while the Materials Select Sector SPDR ETF (XLB) - Get Report climbed 0.8%. 

Pure Storage (PSTG) - Get Report opened for trading Wednesday below its initial public offering price of $17 a share. Shares were trading around $16.60 shortly after their market debut. Pure Storage's IPO was priced at the midpoint of its $16 to $18 a share range.

Earnings season won't begin in earnest until the unofficial kickoff company Alcoa(AA) - Get Report reports Thursday after the closing of trading in New York. Nonetheless, investors are already making projections.

Third-quarter earnings are expected to decline 4.2% from the third quarter a year earlier, according to Thomson Reuters. Similar issues that plagued the second quarter such as a stronger U.S. dollar and lower energy prices are expected to carry over into this quarter. International companies that derive a bulk of their sales overseas, for example, will likely take a hit on the currency exchange.

"We've seen companies set the bar rather low again for earnings season which has been typical," Chris Gaffney, president of EverBank World Markets, told TheStreet. "What we are looking for is to see what impact the stronger dollar has on U.S. companies. We are expecting and have seen some warnings from some of the multinationals that this strong dollar is hurting sales."

In earnings news, Monsanto (MON) shares were on watch after the company missed quarterly estimates on its top- and bottom-lines and revealed plans to cut as many as 2,600 jobs over the next two years. The agricultural company reported a loss of $1.06 a share in its fourth quarter, far steeper than estimates of a loss of 2 cents. Monsanto said lower commodity prices would likely reduce sales through 2016.

Constellation Brands(STZ) - Get Report reported a better-than-expected second quarter, driven by strong growth in its beer brands including Corona and Modelo. Overall beer sales climbed 14% to $1.02 billion, representing 59% of total revenue. Wine and spirit sales increased 3%.

Pandora (P) shares dropped 4.6% after the streaming-music service said it purchased the online ticket agency Ticketfly for $450 million in a cash-and-stock deal. Ticketfly focuses on small venues and sold 16 million tickets last year. 

Yum! Brands(YUM) - Get Report plummeted 19.2% after quarterly results showed the company is still suffering from a food safety scandal in its critical Chinese market. Quarterly earnings of $1 a share missed estimates by 7 cents.

Volkswagen (VLKAY) shares were on watch after the company's new CEO Matthias Mueller said recalls for the millions of diesel vehicles with emissions-gaming software would begin in January. Mueller also said he believed only a handful of employees had knowledge of the cheat and that his predecessor Martin Winterkorn was not involved.

Adobe(ADBE) - Get Report dropped more than 6% after the software company issued a below-consensus forecast. The company expects full-year revenue of $5.7 billion, below estimates of $5.93 billion, and earnings of $2.70 a share, well under forecasts of $3.19.

SABMiller (SBMRY) has formally rejected a sweetened takeover offer from Anheuser-Busch(BUD) - Get Report . The Budweiser owner had increased its offer to $104 billion in cash, or 42.15 pounds a share ($64.35), in what would have been the biggest deal of the year. The deal represents a 44% premium to SABMiller's trading price before talks began in September.

Exelon(EXC) - Get Report and Pepco (POM) shares were on watch after Washington D.C. Mayor Bowser announced her support for the merger that would create the largest U.S. utility by customer count. Bowser said the deal would boost investment in the city to $78 million from $14 million. The mayor had initially opposed the deal.

Tesla(TSLA) - Get Report fell nearly 4% after analysts at Robert Baird downgraded the stock to neutral from outperform. The firm said the Model X ramp could take longer than expected. Separately, RBC Capital started coverage with a sector perform rating and $280 price target.