The S&P 500 has ended marginally down, with Microsoft dipping and Meta Platforms rising, as uncertainty about the Middle East lifted oil prices ‌and Treasury yields.