Shares of retailers and other consumer companies fell after California reversed some economic reopening measures.

Shares of consumer products companies were stronger than the broad market, however, as investors bet processed-food makers would continue to see accelerated growth as people shy away from restaurants.

Shares of soda-and-snacks giant PepsiCo rose after its said demand for its snacks and packaged foods largely offset a decline in beverage sales in the latest quarter.

Americans are becoming more upbeat about their personal outlooks, according to a June consumer survey from the New York Federal Reserve.

Write to Rob Curran at rob.curran@dowjones.com