The S&P 500 and Nasdaq ended the day in the green thanks to positive earnings from tech giants Alphabet (GOOGL) - Get Report and Amazon (AMZN) - Get Report . The S&P 500 ended just points from records. SABMiller's (SBMRY) board recommended a sweetened offer of 45 pounds a share for Anheuser-Busch (BUD) - Get Report . Worries had surfaced earlier in the week that the proposed deal to create the world's largest brewer would fall apart. Chevron (CVX) - Get Report reported a mixed second quarter, topping profit estimates but falling short on sales. The oil producer said its results 'reflected lower oil prices.' Merck (MRK) - Get Report rose after exceeding analysts' estimates in its recent quarter. Sales of its top-selling diabetes drug Januvia increased two percent. The drugmaker also met consensus estimates with full-year guidance.