Major stock indexes closed higher on Friday, driven by corporate earnings reports from tech firms like Alphabet and Amazon.