The S&P 500 rose on Tuesday to post its highest closing level since Feb. 1, the day before the market began a sharp extended selloff, as strong results from PepsiCo boosted optimism about the earnings season.

The consumer staples index climbed 1.3 percent and provided the biggest lift to the S&P 500, driven by PepsiCo, which gained 4.8 percent, while Procter & Gamble rose 2.5 percent and Coca-Cola was up 1.3 percent.

Recent upbeat news on the economy as well as earnings have helped to offset worries about escalating trade tensions between the United States and China. The two countries slapped tit-for-tat tariffs on $34 billion of each other’s goods on Friday.

Concerns over trade resurfaced after Tuesday’s close, with S&P futures falling late after a Trump administration official said the White House is likely to announce a list of $200 billion in tariffs on Chinese goods as early as Tuesday evening.

The S&P 500 index is up about 3 percent in the last four sessions. It is now up 4.5 percent since the end of 2017 and is less than 3 percent from its Jan. 26 record high. Worries over rising bond yields and potentially firming inflation drove the early February selloff, which confirmed a correction for the market.

Earnings are expected to become key for investors in the coming weeks as earnings season kicks into high gear. JPMorgan Chase, Wells Fargo and Citigroup are scheduled to report results on Friday. Their shares fell on Tuesday after leading market gains on Monday.

PepsiCo’s shares surged after the company’s quarterly results exceeded estimates on strong sales of snacks. The company also reaffirmed its full-year forecast amid signs of a gradual recovery in its soda business.

Overall, S&P 500 companies are expected to chalk up second-quarter earnings growth of around 21 percent, slightly higher than what was forecast in April, according to Thomson Reuters data.

Also aiding the S&P on Tuesday, utilities and telecom indexes rose about 1 percent each, recovering from Monday’s losses.

Higher oil prices lifted energy shares. The S&P energy index rose 0.7 percent as crude oil prices gained on growing supply disruptions in Norway and Libya. However, gains were pared after the United States said it would consider requests for waivers from Iranian oil sanctions. Nonetheless, shares of Exxon and Chevron were up around 1 percent each.

Trading volume was among the lightest of the year, with approximately 5.8 billion shares changing hands on the major domestic equity exchanges, as compared to the 7.0 billion share daily average over the past 20 trading days, according to Thomson Reuters data.

Oil rises on supply disruptions, large drawdown

Oil rose on Tuesday, supported by a larger-than expected U.S. stock draw along with supply concerns in Norway and Libya. Gains were tempered indication that the administration would consider requests for waivers from Iranian oil sanctions.

Brent crude futures rose 79 cents to settle at $78.86 per barrel. Earlier, the global benchmark hit a session high of $79.51.

Domestic crude (West Texas Intermediate or WTI) futures rose 26 cents to settle at $74.11, after hitting a high of $74.70.

Domestic crude inventories fell last week by 6.8 million barrels, according to data from industry group the American Petroleum Institute. That decline was larger than expected, causing crude futures to gain in post-settlement trading.

Both crude benchmarks retreated from near four-year highs after Secretary of State Mike Pompeo said the United States would consider requests from some countries to be exempted from sanctions on Iranian oil.

Last month, the United States said it wanted to reduce oil exports of fifth-biggest producer Iran to zero by November.

Still, Brent was buoyed by a strike by hundreds of workers on Norwegian offshore oil and gas rigs, leading to the shutdown of one Shell-operated oilfield.

Also bullish to prices was plummeting production in Libya, where output has halved in five months to 527,000 barrels per day.

On Monday, Suncor Energy said its 360,000-barrel-per-day Syncrude facility would resume some production in July, earlier than expected, following an outage last month that disrupted total output and sent domestic prices higher.

The updated timeline has muted price gains and widened the difference between the two benchmarks.

Meanwhile, OPEC led by Saudi Arabia, have agreed to raise output. Nonetheless, there is concern that doing so will use up global spare capacity and leave markets vulnerable to further or unexpected production declines.