Despite a rough week for retail stocks, investors have reason to believe that the fourth quarter will be a good one for the sector after what Wells Fargo analysts called a successful Black Friday week.

The SPDR S&P Retail ETF XRT, +1.40%[1] fell 3.4% for the week ending Black Friday, Nov. 23, after falling 4.5% the week prior. Target Corp. shares TGT, +2.04%[2] fell more than 11% on Wednesday and 15.5% for the week, with investments in technology and other areas taking a toll on margins[3]. Other retailers including Walmart Inc. WMT, -0.29%[4] and Kohl’s Corp. KSS, +2.22%[5] fell as well[6].

However, shoppers were ready to spend, with a record $6.22 billion tallied in U.S. online sales on Black Friday, according to Adobe. E-commerce sales jumped 28% on Thanksgiving Day[7]. ShopperTrak data show that traffic to stores fell just 1.7% on Black Friday. As sales migrate online, experts say a decline in store traffic is to be expected.

The International Council of Shopping Centers says about 151 million people went to a mall or shopping center over the weekend.

Read: Small Business Saturday on track to reach $3 billion in online sales for the first time[8]

The SPDR S&P Retail ETF rose 1.4% in Cyber Monday trading, while the Amplify Online Retail ETF IBUY, +0.83%[9] gained 1.1%.

“At a high level, we believe Black Friday week was a success, one that should give investors a little more confidence as we move deeper into holiday,” wrote Wells Fargo analysts led by Ike Boruchow, who say this was the strongest such week since 2013.

“On top of the solid traffic, what we found to be equally as compelling was a fairly consistent pricing cadence during [Black Friday week],” the note said, adding that pricing was very similar to last year and much better relative to 2016 and 2015.

Heading into Thanksgiving, investors and retailers were encouraged by high consumer confidence, low unemployment and other indicators of a financially strong shopper.

A...

Read more from our friends at MarketWatch