Dow, S&P post second straight weekly gains; earnings, deals in focus

GE's sale 'perfect timing': Cashin
GE's sale 'perfect timing': Cashin   

U.S. stocks closed higher on Friday, with the Dow topping 18,000 for the first time in April as investors looked ahead to the official start of earnings season next week. (Tweet This)

"I think this week we had some pretty good headlines—high profile M&A that boosted confidence, especially the Shell deal (indicating there) will be more M&A in energy," said Jack Ablin, chief investment officer at BMO Private Bank. "It boosts quality."

Shell's $69 billion deal to acquire UK-based BG Group was just one of several major corporate announcements this week.

Read MoreLook here for the next energy sector merger: Analyst

Ablin added that fair to positive economic data and signs of global recovery helped equities gain.

The Dow Jones industrial average and S&P 500 posted their second straight week of gains, boosted by General Electric. The firm announced on Friday a major restructuring of GE Capital, including the sale of most of the unit's assets, and will institute a $50 billion stock buyback program with proceeds from the move.

"This is something they've been discussing since the financial crisis," said Randy Frederick, managing director of active trading and derivatives at Charles Schwab. "I think it just took them this long to find a buyer."

GE jumped 10.8 percent to $28.51 a share, the highest close since September 2008. The stock traded 351 million shares, the most volume since March 2009.

The Dow Jones Industrial Average closed up 98.92 points, or 0.55 percent, at 18,057.65, with General Electric leading advancers and Nike the greatest laggard. The index briefly added more than 100 points in afternoon trade.

The S&P 500 closed up 10.88 points, or 0.52 percent, at 2,102.06, breaking the significant resistance levels of 2,090 and 2,100. Industrials gained 1.8 percent to lead all 10 sectors higher.

The Nasdaq closed up 21.41 points, or 0.43 percent, at 4,995.98.

Read MoreWho buys stock? This answer may surprise you

The Dow transports closed up 0.68 percent, and the iShares Nasdaq Biotechnology ETF (IBB) ended the day up 1.24 percent.

U.S. crude posted its fourth positive week in a row, settling up 85 cents, or 1.7 percent, at $51.64 a barrel after a report that the weekly oil rig count had its largest drop in a month.

Rising oil and stabilization in the dollar helped ease concerns about the two headwinds to corporate profits.

"Investors are going to take a wait and see attitude as earnings season starts," said Peter Cardillo, chief market economist at Rockwell Global Capital.

The corporate earnings outlook for 2015 is bleak, as first-quarter earnings for the S&P 500 index are expected to come in 4.7 percent lower, while second-quarter earnings are expected to be 2.1 percent lower, according to FactSet.

While some companies have already reported their quarterly earnings, the official start to earnings season is usually marked by reports of Dow components JPMorgan Chase and Intel next Tuesday.

"Investors will be looking at company earnings and see what they have to say about the dollar," said Maris Ogg, president at Tower Bridge Advisors.

"Everyone's expecting the dollar to hit parity with the euro," Ogg said. She added that, while the stronger dollar will present short-term problems for some companies, "in the long run, a stronger dollar is good for the U.S."

The dollar index, which measures the greenback's performance against a basket of currencies, was up for the second week. The dollar extended Thursday's advance, with the euro 0.60 percent lower below $1.06.

"I can't help but think this movement in the dollar may have something to do with a more perceived hawkishness coming from the Fed," Frederick said.

Read MoreHow does the Fed raise interest rates?

Richmond Fed President Jeffrey Lacker has long called for a prompt tightening of monetary policy and repeated on Friday his views that consumer spending, the labor market and other economic conditions have improved significantly over the last year—enough to mandate a June rate hike.

On the other hand, Minneapolis Federal Reserve President Narayana Kocherlakota said on Friday that raising interest rates would push the U.S. economy the "wrong way."

Higher rates would hurt spending and borrowing just as consumer confidence is beginning to show signs of recovering, he said. Kocherlakota is one of only two Fed policymakers who want the U.S. central bank to wait until next year to raise rates

Several market analysts noted expectations are now for a small, one-time rate hike rather than a series of increase.

"I think we'll get a symbolic move this year (to) tell the world we've normalized," Ablin said.

On the economic data front, U.S. home prices for the month of March fell 0.3 percent, in line with analysts' expectations.

Next week, no major news is expected Monday but the rest of the week is filled with earnings, some consumer and manufacturing data, and several Fed speakers.

"I think earnings season still has the possibility of hurting the market," said Adrian Day of Adrian Day Asset Management.

In other corporate news:

Apple was also in focus as it began taking pre-orders of its smartwatch on Friday.

Read MoreApple CEO Cook: Orders are 'great' for Apple Watch

Netflix—Citi upgraded Netflix to "buy" from "neutral," saying it doesn't share competition concerns that are currently reflected in the stock's price.

General Motors—Citi added the automaker's stock to its Citi Focus List, saying a recent pullback makes for an even more attractive entry point and that it retains the optimism reflected in a January analyst report.

Gap—The apparel retailer reported a two-percent rise in comparable store sales for March, above the 0.6-percent consensus estimate. The results were entirely driven by a 14-percent gain by Gap's Old Navy chain, while the Gap and Banana Republic brands saw declines.

Symbol
Name
Price
 
Change
%Change
DJIA
---
S&P 500
---
NASDAQ
---

The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded below 13.

Three stocks advanced for every two decliners on the New York Stock Exchange with an exchange volume of 671 million and a composite volume of 3.1 billion in the close.

High-frequency trading accounted for 47.5 percent of April to date's daily trading volume of about 6.2 billion shares, according to TABB Group. During the peak levels of high-frequency trading in 2009, about 61 percent of 9.8 billion of average daily shares traded were executed by high-frequency traders.

The U.S. 10-year Treasury note yield traded near 1.95 percent.

Gold futures settled up $11.00 at $1,204.60 an ounce on the New York Mercantile Exchange.

Read MoreAmerican stocks are the world's worst this year

European shares closed higher Friday, following a rally in Asian equities. The UK FTSE 100, Euro STOXX 600 and the German Dax closed the week at all-time highs, with tech stocks leading.