NEW YORK (TheStreet) -- Stocks shrugged off the malaise that has pressured Wall Street over the past few sessions to rise sharply on Wednesday. Investors piled into equities as crude oil secured a close above $61 a barrel and Greece's future brightened. 

The Dow Jones Industrial Average added 1.3%, or 236 points, the S&P 500 rose 1.2% and the Nasdaq gained 1.3%.

Crude oil rallied on Wednesday as weekly domestic oil inventories declined 6.8 million barrels over the week ended June 6, according to the Energy Information Administration. Analysts had expected domestic inventories to fall just 1.7 million barrels after a 1.9 million-barrel decline a week earlier. West Texas Intermediate crude settled 2.1% higher to $61.43 a barrel.

The energy sector rallied on higher crude prices. NRG Energy (NRG), Freeport-McMoRan (FCX) and Transocean (RIG) topped the S&P 500 while Chevron (CVX) and Exxon Mobil (XOM) were among the best performers on the Dow. The Energy Select Sector SPDR ETF (XLE) jumped 1.2%.

The ECB said Wednesday it had raised the amount the Greek central bank can loan to national banks to 83 billion euros ($94.1 billion), up from a previous limit of 80.7 billion euros. That marks the largest weekly increase since mid-February.

Separately, Germany is reportedly considering offering some debt relief to Greece if it commits to at least one economic reform, sources told Bloomberg. The conciliatory step would allow the debt-ravaged country to repay at least some of its debt due to European creditors on June 30 while further negotiations take place. The National Bank of Greece (NBG) moved higher on the reports.

Financial stocks were higher as bonds extended a selloff. Berkshire Hathaway (BRK.A), JPMorgan (JPM), Wells Fargo (WFC), Bank of America (BAC) and Goldman Sachs (GS) climbed, while the Financial Select Sector SPDR ETF (XLF) added 1.4%.

Global bonds continued to sell off on Wednesday with yields on the benchmark 10-year Treasury hitting an eight-month high of 2.47%. The German Bund yield moved above 1% for the first time since September. European bonds have been under pressure on signs of economic improvement in the region.

Netflix (NFLX) was among the best performers on the S&P 500, moving 4% higher after stockholders approved a proposal for the board to issue more shares. The move will see Netflix increase its shares outstanding to 5 billion from the current 170 million, a step that increases the likelihood of a stock split. Click here for more.

GoPro (GPRO) slid more than 1% after Citigroup lowered its outlook on shipments for the action camera maker to 9.3 million units by 2018, down from a previous forecast of 10.6 million. Analysts said fewer respondents to a survey described GoPro's product line as "appealing." Click here for more.

More from Markets

Dow Sinks for Eighth Straight Session; Intel's CEO Departs -- ICYMI

Dow Sinks for Eighth Straight Session; Intel's CEO Departs -- ICYMI

Dow Logs Eighth Straight Drop as Stocks Slump

Dow Logs Eighth Straight Drop as Stocks Slump

This Is What's Hot Thursday - Stocks Slide, Intel's CEO Woes & Major Movers

This Is What's Hot Thursday - Stocks Slide, Intel's CEO Woes & Major Movers

U.S. Banks Pass Fed 'Stress Test' With Room for Dividends, Buybacks

U.S. Banks Pass Fed 'Stress Test' With Room for Dividends, Buybacks

U.S. Drillers at Mercy of Iran, Saudi Production Spat as OPEC Meeting Begins

U.S. Drillers at Mercy of Iran, Saudi Production Spat as OPEC Meeting Begins