Traders work on the floor of the New York Stock Exchange (NYSE) in New York, U.S., October 22, 2018.

Important data on the consumer and manufacturing is released in the week ahead, and investors are watching to see what it says about two key parts of the economy as new tariffs go into effect on Chinese goods.

The economic reports should show how the economy is faring so far in the second quarter, following a surprisingly strong first quarter. Analysts say the better economy gave President Donald Trump some leverage in his trade negotiations with China.

But it's the progress of those trade negotiations that the markets care about most in the week ahead, after investors were surprised by a lack of progress in the talks and new tariffs this past week.

On Friday, stocks erased steep losses and bounced higher after both Treasury Secretary Steven Mnuchin and Trump called the first negotiating session following new tariffs "constructive."

Retail sales for April are released Wednesday, and should give a good view of consumer spending as the second quarter got underway. Also on Wednesday, industrial production, business inventories and the Empire State manufacturing survey are reported. Consumers sentiment is out Friday. Besides the data, there are just a few earnings, with Walmart reporting Thursday, and Macy's on Wednesday.

Stocks closed out a volatile week lower, and the 2.2% decline was still its worst of the year.

"The odds of something going wrong are much higher today than they were last Friday, when there was pretty much consensus that a [trade] deal was going to be done," said Ed Keon, chief investment strategist at QMA.

But strategists say the selling could have been even worse in the past week. They said stocks were supported by investor confidence that a deal will get done, and also the expectation that Trump would take action to avoid a market collapse.

"I still think that the risks are perhaps skewed more to the downside, than the upside here. Whether it will escalate further is hard to handicap from a risk perspective," Keon said. The Trump administration has complained that China attempted to renegotiate their deal, so Trump raised tariffs to 25% on $200 billion in goods and threatens tariffs on $300 billion more.

Whether the Chinese have changed their view, or their lack of agreement on some issues is just posturing is yet to be seen, Keon said.

"The U.S. and China are rivals and are going to be economic rivals for many years to come. Doing a trade deal is going to be like the Yankees and Red Sox doing a trade deal. Nobody wants to be the guy who trades away Babe Ruth," he said.

Luke Tilley, chief economist at Wilmington Trust, said it's not unusual for trade negotiations to hit a rough spot, as they near the finish line. "What really matters is whether you have those tariffs on for quite some time. Companies have been doing fairly well managing tariffs, whether it's by supply lines or price. The uncertainty is the problem for firms," he said.

Tilley said he expects to see strength in the retail sales. Manufacturing data could be soft.

"Our take is that the consumer is still in a very good place. We think a lot of the volatility, some of it was real in the sense it was the government shutdown and the movement of the stock market through December. There were some seasonal adjustments," he said.

Analysts have said the fact the stock market was at a record high; first quarter growth was a strong 3.2%, and unemployment fell to a 50-year low of 3.6%, all likely emboldened Trump to play hardball with China. Likewise, improving economic data in China could have made Beijing believe it had a stronger hand.

For now, markets are watching to see whether talks continue to be constructive or whether the two sides focus on retaliation.

Tilley said he expects to see a deal, but if it looks like Trump will move forward with tariffs on all Chinese goods, he would reconsider his stock positions. "If that was coming and we thought that was going to be in place for some time, we would be forced to reevaluate and downgraded our economic outlook and also the outlook for the markets," said Tilley.