The stock market pointed higher at the end of a busy week, helped by big moves by Amazon and Apple after earnings.