NEW YORK (TheStreet) -- Stocks closed February with big gains thanks to early-month rallies tied to a rebound in oil prices. Markets were then able to hold on to these gains given low volatility over the final two weeks of the month. 

For the full month, the S&P 500 added 5.5%, ending 15 points from its record, and its best month since October 2011. The Dow Jones Industrial Average climbed 5.6%, 112 points from its high. And the Nasdaq locked in its best monthly rise since January 2012, up 7%. 

Stocks closed out the final trading day of February with modest losses, pressured by a broad decline across the majority of S&P 500 sectors. The S&P 500 was down 0.3%, the Dow fell 0.45%, and the Nasdaq declined 0.49%.

West Texas Intermediate crude closed February with its first monthly gain since June, up around 2% over the month. The commodity jumped 2.7% alone on Friday to $49.49 a barrel. Prices were on the mend on Friday after China National Petroleum forecast the nation's demand to grow 3% in 2015, above the International Energy Agency's 2.5% estimate.

The energy sector was the best performer on the S&P 500, though the Energy Select Sector SPDR ETF (XLE) was down 0.42%. Among large-cap oilers, the best performers included PetroChina (PTR) , Royal Dutch Shell (RDS.A) , BP (BP) and Total (TOT) .

After Federal Reserve Chair Janet Yellen addressed Congress earlier in the week, Dudley reiterated the central bank's commitment to patience while speaking at a monetary policy forum in New York on Friday.

"I believe that the risks of lifting the federal funds rate off of the zero lower bound a bit early are higher than the risks of lifting off a bit late," he said. "This argues for a more inertial approach to policy."

Cleveland Fed President Loretta Mester struck a different tone, citing the risks associated with leaving rates lower for longer. "The public might believe that central bankers are holding rates low for longer because they have a gloomy outlook," she said in a speech at the same event. "This would not necessarily yield better economic outcomes."

Monster Beverage (MNST) was the best performer on the S&P 500 and Nasdaq after reporting fourth-quarter earnings of 72 cents a share, 13 cents better than expected. Total revenue jumped 12% year over year and beat expectations. Shares were up 13.1%.

Faith in a J.C. Penney (JCP) turnaround was shaken after the retailer reported a surprise fourth-quarter loss of 11 cents a share, compared to analysts' estimates of profit of 11 cents. Investments in revamping its department stores took a bite out of J.C. Penney's profitability. Shares were down 6.8%.

Bank of America (BAC) shares were down 1.5% after the two members of its board as well as its chief accounting officer said they would be leaving the bank within weeks. Also pressuring shares, analysts at UBS cut their rating of the bank to "neutral" from "buy," noting that disclosures in recent annual filings have flagged potential failure of federal stress tests.

Pending home sales climbed 1.7% in January, slightly lower than a 2% consensus, but were at their highest level in 18 months and far better than a 3.7% drop a month earlier. By region, sales were flat in the Northeast, down 0.6% in the Midwest, up 3.2% in the South and up 2.2% in the West.

Consumer sentiment crept higher to 95.4 in February from a preliminary 93.6 reading, according to the University of Michigan's index. Though that beat estimates of 94, the index fell from an 11-year high of 98.1 in January, its first drop in seven months.

A second estimate of fourth-quarter GDP was trimmed to 2.2% from 2.6%, largely a result of a wider trade deficit and slower accumulation of business inventories than initially expected. Growth in consumer spending was also revised down by 0.1% to an increase of 4.2%, though remained at its fastest pace since early 2006. Economists had forecast a cut in GDP to as low as 2%.

"The usual suspects will claim that this slowdown in GDP growth signals some sort of underlying fragility in the US economy, perhaps triggered by the end of QE," said Paul Ashworth, chief U.S. economist at Capital Economics, in a note. "Ignore them. That's the same economy that added an average of 284,000 additional jobs in each of the final three months of last year. It's doing just fine and the Fed will start to hike rates in June."

Looking to the week ahead, the earnings season will draw to a close with 96% of S&P 500 companies having already reported. Among those scheduled for next week, Sotheby's (BID) and Weibo (WB) will report Monday, Best Buy (BBY)  Tuesday, Abercrombie & Fitch (ANF) and PetSmart (PETM) Wednesday, Costco (COST) and Big Lots (BIG) on Thursday, and Staples (SPLS) and Foot Locker (FL) on Friday.

Major economic data out next week includes the Federal Reserve's Beige Book on Wednesday, an anecdotal report on economic conditions across the Fed's districts, and productivity and factory orders data on Thursday.

The big economic data of the week, February's jobs report, will be released Friday and expectations are for 235,000 jobs to have been added to non-farm payrolls compared to 257,000 a month earlier. The unemployment rate is forecast to tick down 100 basis points to 5.6%. 

--Written by Keris Alison Lahiff in New York.

More from Markets

Stocks Turn Negative for the Year, Dow Drops Another 500 Points

Stocks Turn Negative for the Year, Dow Drops Another 500 Points

Jim Cramer's Advice for Investors During a Bear Market

Jim Cramer's Advice for Investors During a Bear Market

Tech Stocks Continue to Take Beating

Tech Stocks Continue to Take Beating

Amazon Reportedly Among Bidders for Disney's Regional Sports Networks

Amazon Reportedly Among Bidders for Disney's Regional Sports Networks

Making Sense of the Mysterious Strategic Petroleum Reserve

Making Sense of the Mysterious Strategic Petroleum Reserve