U.S. stocks ended little changed, with the Standard & Poor’s 500 Index on track for its worst month since May 2012, as equities found some respite from the wide swings prevalent earlier this week. Energy companies advanced as oil capped its biggest two-day gain since 2009, with Chevron Corp. and Transocean Ltd rising more than 3.5 percent. Intel Corp. and Facebook Inc. gained at least 1.4 percent to boost technology shares. Wal-Mart Stores Inc. lost 1.7 percent, leading consumer staples lower amid a weaker consumer confidence reading. Pfizer Inc. and Johnson & Johnson slumped at least 1 percent to weigh on the health-care group. Freeport-McMoRan Inc. gained 3 percent after Carl Icahn took a stake in the company. The S&P 500 rose 0.1 percent to 1,988.87 at 4 p.m. in New York, with the gauge posting its best three-day advance since November 2011. The Dow Jones Industrial Average lost 11.76 points, or 0.1 percent, to 16,643.01. The Nasdaq Composite Index added 0.3 percent, and the Russell 2000 Index climbed 0.8 percent. About 7.9 billion shares changed hands on U.S. exchanges, 13 percent above the three-month average.