Stocks closed higher as traders became more optimistic that the US and China will be able to resolve their trade differences without too much damage, the AP reports. Some of the biggest gains Thursday went to retailers, technology companies and banks. Amazon climbed 2.9%, Facebook rose 2.7%, and JPMorgan Chase added 1.3%. Safe-play stocks like real estate companies lagged the market, a sign that investors were more comfortable taking on risk. The S&P 500 rose 18 points, or 0.7%, to 2,662. The Dow Jones industrial average climbed 240 points, or 1%, to 24,505. The Nasdaq composite added 34 points, or 0.5%, to 7,076. (More stock market stories.)