Consumer staples stocks, as tracked by the XLP ETF, gained amid a wider market upswing on July 27, 2026. The primary driver appears to be a broad-based rally following a pause in US-Iran hostilities, which led to a significant drop in oil prices and eased investor concerns. This positive sentiment, combined with a rotation into defensive sectors, likely contributed to the consumer staples sector's strong performance, as these companies are often favored during times of uncertainty.