Stocks ended the week on a better note than they started, rallying to close at session highs as crude oil scored its best daily performance in seven years. 

The S&P 500 was up 1.95%, the Dow Jones Industrial Average gained 2%, and the Nasdaq climbed 1.7%.

This isn't the first time talk of production cuts in the Middle East have boosted prices in the past few weeks.

"The market has had some practice regarding this kind of exercise in recent weeks, with prior rallies off Russian comments and the Venezuelan tour generating prior recovery attempts, helping to train the market to be both skeptical regarding the prospects for actual cuts and, if anything, more aggressive in trading on the headlines," said Timothy Evans, energy futures specialist at Citi.

West Texas Intermediate crude oil rocketed 10.7% higher for the day after the United Arab Emirates energy minister said the Organization of the Petroleum Exporting Countries was open to cutting output.

Prices have recently been in a tailspin on concern over a supply glut and the inability of some of the largest oil-producing countries to address it. West Texas Intermediate crude oil remained down for the week, though, after closing at its lowest level since May 2003 on Thursday. 

 

Energy shares were sharply higher with gains enjoyed among PetroChina (PTR) , Chevron (CVX) , Royal Dutch Shell (RDS.A) , Total (TOT) and BP (BP) . The Energy Select Sector SPDR (XLE) climbed 2.6%.

Gold fell back from a massive surge a day earlier. Safe-haven assets had jumped on Thursday as investors fled riskier equities markets with gold climbing by its most in a year. Gold was down 0.7% to $1,238.60 an ounce, down for only its third time in 11 days. The precious metal scored its best weekly gain since 2008. 

Banks led markets higher on Friday after a heavy hit a day earlier. JPMorgan (JPM) led the Dow after CEO Jamie Dimon disclosed a purchase of 500,000 shares, worth more than $25 million. Deutsche Bank (DB) was also sharply higher after agreeing to buy back more than $5 billion in senior debt.

Peer financials stocks such as Citigroup (C) , Goldman Sachs (GS) , HSBC (HSBC) , Bank of America (BAC) and Wells Fargo (WFC) also jumped, while the Financial Select Sector SPDR (XLF) added 4.2%.

Bank of America and Wells Fargo are holdings in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio.

Exclusive Look Inside: You see Jim Cramer on TV. Now, see where he invests his money and why Bank of America is a core holding of his multi-million dollar portfolio. Learn more now.

Jack Dorsey's Square (SQ) jumped after Visa (V) disclosed a new stake of nearly 10%. The new position makes Visa the second-largest shareholder in Square. Visa had recently been developing its own near-field payment technology.

AIG (AIG) , the insurer that Carl Icahn wants to break up, climbed after agreeing to give board seats to one of his representatives as well as activist investor John Paulson. The company said it would nominate Paulson and Samuel Merksamer, a managing director of Icahn Capital, for election at this year's annual shareholder meeting. The insurance company also reported a wider-than-expected quarterly loss and raised its dividend by 14%.

Pandora Media (P) shares were active on reports of deal talks. The music streaming company has reportedly held meetings with potential buyers, though negotiations are still preliminary. Pandora is working with Morgan Stanley to meet with potential buyers, according to sources. Gains were capped, though, after Pandora swung to a quarterly loss.

Groupon (GRPN) jumped more than 29% after beating analysts' estimates on its top and bottom lines. The deals site reported adjusted earnings of 4 cents a share, above expectations for a break-even quarter. Revenue climbed 3.8% to $917.2 million, above forecasts of $846 million.

More from Markets

4 Stocks Making Important Moves Wednesday

4 Stocks Making Important Moves Wednesday

Dow Futures Turn Positive After Boeing Earnings Blowout; Twitter Boosts Nasdaq

Dow Futures Turn Positive After Boeing Earnings Blowout; Twitter Boosts Nasdaq

Facebook, Boeing, Shire and Credit Suisse - 5 Things You Must Know

Facebook, Boeing, Shire and Credit Suisse - 5 Things You Must Know

Facebook Prepares for Earnings and 4 Other Stories You Must Know Wednesday

Facebook Prepares for Earnings and 4 Other Stories You Must Know Wednesday

Facebook's Investors Have a Big Day Ahead

Facebook's Investors Have a Big Day Ahead