The Standard & Poor’s 500 index rose 1.9% in its first week of the new year, with the energy, communication-services and consumer-discretionary sectors leading the way higher while real estate and utilities declined.

The market benchmark ended the week at 2,531.94, up from last Friday’s closing level of 2,485.74. This week’s gain came over just four sessions as the market was closed Tuesday for the New Year’s Day holiday. One of those four sessions — Monday — was the final session of 2018 while the S&P 500 now has a year-to-date increase of 1.0% from the three sessions that were in 2019.

This week’s gains were led by some of the S&P 500 sectors that were hit the hardest in 2018. The energy sector had the biggest percentage gain of the week, up 5.0% from last Friday, after having fallen 12% in 2018.

Communication services, which was created as a sector in September through the combination of the prior telecommunication services sector and stocks from other sectors, had the second-largest gain of the week, up 4.1%.

The consumer-discretionary sector, which was the S&P 500’s worst performer in 2018 with a 19% tumble for the year, climbed 3.3% this week.

On the downside, the real-estate sector had the largest drop of the week, off 0.8%, after being one of the few sectors in the black last year with a 2018 gain of 2.4%. Utilities, which was another sector in the black in 2018 with an increase of 14% for the year, edged down 0.04% this week.

The S&P 500’s climb this week was bolstered by a 3.4% jump in Friday’s session alone as Federal Reserve Chairman Jerome Powell eased investors’ fears about rates by saying at a conference “with the muted inflation readings that we’ve seen coming in, we will be patient as we watch to see how the economy evolves.”

Stocks were also boosted Friday by employment data showing nonfarm payrolls rose a seasonally adjusted 312,000 in December, marking the largest monthly gain since February, although the unemployment rate edged up to 3.9% from 3.7%. The data also showed the US added a net 2.64 million jobs in 2018, representing the strongest year of job growth since 2015, while wage growth in 2018 of 3.2% was the highest since 2008.

The energy sector’s weekly gain came as crude-oil futures achieved their first weekly increase in a month amid the employment data as well as renewed trade talks set for next week. Among the energy sector’s gainers, shares of Exxon Mobil (XOM) rose 4.4% this week while Chevron (CVX) added 2.0%.

In communication services, shares of Alphabet (GOOGL) gained 3.0% this week amid reports the company’s Google obtained approval from the US Federal Communications Commission to deploy its radar-based motion sensing device known as Project Soli.

Further boosting Alphabet’s shares, Canaccord Genuity upgraded its investment rating on the stock to buy from hold, saying “we expect Google to continue to outperform the global advertising market and to maintain its leadership position, driven by continuing steady growth in search, faster growth in video (YouTube), and increasing monetization of Maps.”

In the consumer-discretionary sector, shares of Lowe’s (LOW) rose 2.2% this week as the home-improvement retailer said it plans to hire more than 65,000 associates this year to improve customer service and product availability.