US stocks close higher as SpaceX debuts, US-Iran deal hopes lift sentiment