A panicky global market sell-off — begun Monday when the Standard & Poor’s 500-stock index lost more than 4 percent, its worst decline since August 2011 — dissipated on Tuesday, and the S.&P. 500 ended the session up by about 1.7 percent. The Dow Jones industrial average gained about 2.3 percent.

The consumer discretionary sector of the S.&P. 500 jumped by more than 2 percent, pulled higher by strength in well-known consumer-facing companies like Amazon, Netflix and Home Depot. General Motors also rose after reporting strong earnings and strong demand for its pickup trucks and sport-utility vehicles.