Nasdaq closes at two-month high on tech surge

Graph And Coins

U.S. equities closed sharply higher after the Chinese central bank cut rates and after three tech giants posted better-than-expected earnings.

"[The rate cut] is a very short-term positive," said Peter Cardillo, chief market economist at Rockwell Global Capital. He also said that, while the central bank is stimulating the economy by cutting rates, the move could also signal China's economy is weaker than people think.

The People's Bank of China cut interest rates for the sixth time since November to 4.35 percent, effective from Oct. 24.

"It's just so hard to judge what's going on there because there'very little good data," said Maris Ogg, president at Tower Bridge Advisors. "You can't interpret this as mixed news; it's more of a question mark."

"China is very deliberate in what they do, and it seems to me they are doing what they can to hold somewhat of a 7 percent growth rate," said Randy Frederick, managing director of trading and derivatives at Charles Schwab.

Stocks opened sharply higher and extended gains in afternoon trading, when they hit session highs. The Nasdaq also posted its best close since Aug. 19.

Read More Technician: Market top could last a decade

"I can't say we're out of the woods, but I think this is a pretty good environment to be in right now," said Robert Pavlik, chief market strategist at Boston Private Wealth.

The move higher built on Thursday's rally, which saw the Dow Jones industrial average close up over 300 points, while the S&P 500 and the Nasdaq Composite also ended sharply higher after European Bank President Mario Draghi left the door open for further quantitative easing.

Major indexes for the week

Investors also digested a new batch of earnings, including reports from tech giants Alphabet , Amazon and Microsoft , all of which beat analysts' expectations.

"The tech earnings are adding to this rally," Cardillo said.

Read More How to trade Amazon, Microsoft & Alphabet earnings

Alphabet beat estimates by 14 cents, while Amazon posted earnings per share of 17 cents. Wall Street expected the Jeff Bezos-run company to report a loss of 13 cents.

Both stocks closed at all-time highs and hit all-time intraday highs, while Facebook followed suit.

Microsoft accounted for 32 points of the Dow's gains. The stock closed up 10.95 percent at $53.29, its best close since February 2000.

Microsoft shares intraday 

Other companies that have reported include Procter & Gamble and VF Corp.

Procter posted better-than-expected earnings per share, but fell short on revenue. VF Corp. missed analysts' expectations on both earnings and revenue.

Read More Dr Doom Marc Faber: 'I'm a great optimist'

"The hope for more ECB support and the rate cut in China should help stabilize those weakening sales trends and other deteriorating economic data points," Nick Raich, CEO of The Earnings Scout, said in a note.

Art Hogan, chief market strategist at Wunderlich Securities, said earnings overall have provided a bit of relief for the market. " They're not spectacular, but they're not as bad as feared," he said.

Investors also kept an eye on U.S. oil, which closed down 1.7 percent at $44.60 a barrel.

"We broke that $45 mark; that's not constructive," Hogan said, adding that the stronger dollar was weighing on prices. " It didn't catch up to it yesterday, but it did today."

The dollar rose more than 0.5 percent against a basket of currencies, as well as against the euro, which held at about $1.1020.

Oil also held lower after Baker Hughes data showed the U.S. oil rig count decline by 1.

Read More Health-care sector gets pain from all sides

On the data front, investors took in the latest manufacturing PMI data, which came in at 52, below the expected 52.8.

In corporate news, TreeHouse Foods is in advanced talks to buy Ralcorp, a unit of ConAgra Foods , for up to $2.7 billion, Reuters reported.

Kellogg is in talks to buy Diamond Foods for $35 to $40 a share, The New York Post reported.

In Europe , equities traded sharply higher, with the pan-European STOXX 600 index closing 1.99 percent higher.

Overnight , Asian stocks closed higher, with the Nikkei 225 rising 2.11 percent, while the Shanghai Composite rose 1.32 percent.

The IMF is working on a deal that could add the Chines yuan into the fund's basket of reserve currencies.

The Dow Jones industrial average (Dow Jones Global Indexes: .DJI) closed up 157.54 points, or 0.9 percent, at 17,646.70, led higher by Microsoft and with Nike leading decliners.

The S&P 500 ended 22.64 points higher, or 1.10 percent, at 2,075.15, with information technology leading six sectors higher as utilities led decliners. The technology sector also posted its first four-week winning streak since November.

The Nasdaq closed up 111.81 points, or 2.27 percent, at 5,031.86.

U.S. Treasury yields traded higher, with the 10-year yield at about 2.08 percent and the two-year yield at 0.63 percent.

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

Advancers led decliners 3 to 2 at the New York Stock Exchange, with an exchange volume of 1.004 billion and a composite volume of 4.089 billion at the close.

Gold futures settled $3.30 lower at $1,162.80 an ounce.

On tap this week:

More From

—CNBC's Peter Schacknow and Reuters contributed to this report.

JefferiesAnd the Best Place to Work in the global financial markets 2016 is...

Register for Financial Markets News Alerts