NEW YORK (TheStreet) -- Stocks closed mixed Friday as investors showed caution heading into the long holiday weekend with the fate of a second bailout for Greece still uncertain.

The Dow Jones Industrial Average ended up 45.7 points, or 0.3%, at 12,949, inching closer and closer to the psychological 13,000 threshold. Intel ( INTC), DuPont ( DD) and Merck ( MRK) were among the biggest gainers on the blue-chip index, while Alcoa ( AA), Bank of America ( BAC) and Hewlett-Packard ( HPQ) were the biggest losers.

The S&P 500 added 3.2 points, or 0.2%, at 1361. The index has advanced 8.2% year-to-date on increasing optimism about the U.S. economy and the ability of Europe to stem its debt crisis. Financials and utilities were the biggest sector gainers Friday, while technology and basic materials were leading the losses.

The Nasdaq lost down 8 points, or 0.3%, at 2951 as large-cap stocks such as Google ( GOOG) and Chinese rival Baidu fell 0.2% and nearly 4%.

The CBOE Volatility Index lost 7.2% at 17.82.

"Many investors, particularly mutual funds, don't like to buy strength, but that is the style that works right now," says James "Rev Shark" DePorre, founder and CEO of Shark Asset Management. "The fact that this approach works so well helps to create a huge supply of dip-buyers."

Investors showed some confidence that Greece will be able to secure a new bailout package before a meeting of eurozone finance ministers on Monday, averting a disorderly default that could rock the financial markets. French Prime Minister Francois Fillon said Friday that European nations should do everything in their power to prevent Greece from defaulting on its debt, regardless of worries about whether the country is a trustworthy borrower.

"We must do absolutely everything so that there is not a default by Greece, which would be dramatic for Greeks themselves and dramatic for Europeans," he declared over a French radio network.

Following discussions between German, Greek and Italian leaders, the Italian government said that Germany and Italy are confident that eurozone ministers will agree on a new rescue package for Greece at their meeting Monday. This, as the European Central Bank swaps its Greek debt holdings for new ones to make sure that it isn't forced to take losses in a debt restructuring. German officials say that they will no longer look to exert further pressure on Greece for more budget reforms.

Eurozone ministers should soon be approving the second bailout package, according to a Greek government spokesman at a briefing.

"The action overseas ... remains generally positive," says Dan Greenhaus, chief global strategist, BITG.

Germany's DAX settled up 1.42% while London's FTSE closed up 0.33% on Friday. Japan's Nikkei Average settled up 1.58% and Hong Kong's Hang Seng closed up 1.01%.

In economic news Friday, the Labor Department said that the January consumer price index rose 0.2% month over month compared with a flat reading in December. This was less than the 0.3% increase economists surveyed by Thomson Reuters were expecting. Excluding volatile food and energy costs, the core CPI reading rose 0.2%, compared with an increase of 0.1% in December, in line with expectations. The headline CPI increased 2.9% year over year, which was as expected and a slight decrease from last month's 3% figure. Meanwhile, the core year-over-year print hit three-year highs at 2.3%, compare with the 2.2% that economists were targeting.

The Conference Board's index of leading economic indicators showed a rise of 0.4% in January to 94.9 , following an upwardly revised 0.5% increase in December and a 0.3% gain in November. Economists expected January indicators to rise 0.5%, according to Thompson Reuters estimates.

In corporate news, Baidu ( BIDU), the China-based Internet search provider topped Wall Street's fourth-quarter earnings expectations. But the company forecast first-quarter revenue of between $666.5 million to $688 million, a sequential decline from fourth-quarter sales of $710.9 million. Shares tumbled 3.4% to $136.90.

A two-drug regimen of Gilead Sciences' ( GILD) experimental GS-7977 plus ribavirin failed to suppress the hepatitis C virus in a group of difficult-to-treat patients who had also failed prior therapy, the company said Friday. Gilead shares dropped 14.2% to $47.

Ketchup maker H.J. Heinz ( HNZ) earned $284.7 million, or 88 cents a share, in its fiscal third quarter, up from $273.8 million, or 84 cents a share, a year earlier. Excluding items, earnings were 95 cents a share. Sales rose to $2.92 billion from $2.72 billion a year earlier. Analysts expected Heinz to post fiscal third-quarter earnings of 85 cents a share on revenue of $2.89 billion. Heinz shares rose 4.4% to $54.44.

Apple's ( AAPL) share of China's exploding smartphone market fell for the second quarter in a row between October and December, thanks to stiff competition from cheaper local brands and some buyers postponing their purchases of iPhones until after the iPhone 4S debut in January. Perceptions of downside or upside risks for Apple could hold sway over the market action, given that the stock has been "truly a market leader," noted James "Rev Shark" DePorre, founder and CEO of Shark Asset Management. Shares lost 0.02% to $502.12.

Campbell Soup ( CPB) earned 64 cents a share in its fiscal second quarter as sales fell 1% $2.11 billion. The soup maker was expected by analysts to earn 62 cents a share on sales of $2.12 billion. Campbell Soup reiterated its 2012 guidance, saying adjusted profit would come in at $2.35 to $2.42 a share, a decline of between 5% and 7% from 2011's adjusted base of $2.54. It said it sees net sales growth of 0% to 2%. Shares gained 2.6% to $32.91.

Applied Materials ( AMAT), the maker of semiconductor capital equipment, topped analysts' earnings expectations in its fiscal first quarter and provided a second-quarter outlook above consensus estimates. Applied Materials reported adjusted earnings of $240 million, or 18 cents a share, on sales of $2.19 billion, above the estimate of analysts for a profit of 12 cents a share on revenue of $1.97 billion. Applied Materials forecast non-GAAP earnings of 20 cents to 28 cents a share in its fiscal second quarter ending in April. Analysts forecast earnings of 15 cents a share. Shares shed 1.5% to $13.

Johnson & Johnson's ( JNJ), McNeil Consumer Healthcare division is recalling all of its infant Tylenol in the U.S. because of complaints about the dosing syringe. 574,000 one-ounce bottles of grape-flavored liquid Tylenol for infants will be impacted by the recall. Shares gained 0.12% to $65.

April oil futures settled 96 cents higher at $103.60 a barrel. April gold futures fell $2.50 to settle at $1,725.90 an ounce.

The dollar index was flat at $79.353. The benchmark 10-year Treasury was sliding 7/32, raising the yield to 2.012%.

-- Written by Andrea Tse in New York.

>To contact the writer of this article, click here: Andrea Tse.

>To follow the writer on Twitter, go to .

>To submit a news tip, send an email to: