The S&P 500 and the Nasdaq opened higher on Friday after upbeat forecasts from Apple and Amazon helped calm nerves, a day after the indexes suffered their sharpest drop in more than three weeks.