U.S. stocks closed sharply higher Friday as oil prices rose and investors took a more positive view of Thursday's European Central Bank announcements on stimulus.

"The monetary policy tools we believe are effective are being expanded and the monetary policy tools we don't believe to work are being limited," said Art Hogan, chief market strategist at Wunderlich Securities.

The Dow Jones industrial average closed about 218 points higher, also above its 200-day moving average for the first time since Dec. 30.

"The reason not to buy is less. There's much more reason to participate now especially as the market grinds higher," said Jeremy Klein, chief market strategist at FBN Securities.

Concerns about China were also alleviated by the yuan's strongest midpoint fix against the dollar for the year so far. The PBOC set the peg at 6.4905 against the dollar on Friday, after the greenback's drop Thursday following the ECB stimulus announcements. The yuan's 0.34 percent move from the prior day's fix was the largest daily strengthening since November, according to StreetAccount.

"That obviously's been a bit helpful, the stabilization in the currency," said Peter Coleman, head trader at Convergex.

Major averages 5-day performance

U.S. stocks closed mostly lower Thursday, under pressure from low oil prices and concerns about the effectiveness of monetary policy following the morning's announcements from the European Central Bank. The S&P 500 did manage to squeeze out a gain of less than one point.

On Thursday, the euro reversed an initial decline to hit its highest against the U.S. dollar in nearly a month after ECB President Mario Draghi surprised markets by saying he didn't anticipate a need to reduce rates further, although new facts can change the situation and the outlook.

"I think the reaction was a little bit rash and quick after all the information that came out yesterday," Coleman said.

"I think the fact that our markets rallied and stabilized a bit helped sentiment overseas. You got all the key risk-on factors up today," he said.

Gold futures for April delivery settled down $13.40 at $1,259.40 an ounce, while Treasury yields rose. The 2-year yield was 0.94 and the 10-year yield was around 1.98 percent.

The U.S. dollar index held a touch higher, with the euro near $1.115 and the yen at 113.77 yen against the greenback.

"I think with oil and rethinking (ECB President) Mario Draghi's powerful message that he sent to the markets, because he did do more than we were expecting ... I think that rethinking of the actions is going to lead the market higher along with higher oil prices," said Peter Cardillo, chief market economist at First Standard Financial.

However, skepticism on the sustainability of the recent rally remained.

BTIG Chief Technical Strategist Katie Stockton said in a note that indicators show that Friday's rally "will likely fail and give way to a loss of short-term momentum."

"Yesterday, the SPX registered an overbought "sell" signal intraday, although a relatively strong close prevented it from being confirmed. An outside-down day was narrowly avoided, as well, but the same cannot be said for the other major indices. The NASDAQ Composite Index and Russell 2000 Index both have overbought "sell" signals and outside-down days that support a broad-based pullback in the next two weeks," she said.

About five stocks advanced for every decliner on the New York Stock Exchange, with an exchange volume of 996 million and a composite volume of 4.0 billion in the close.

High-frequency trading accounted for 49 percent of March's daily trading volume of about 8.75 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.