NEW YORK (AP) -- Stocks ended slightly higher on Friday, helped by better-than-expected quarterly results from Google's parent Alphabet and retailer Amazon and a modest recovery in oil prices.
However, the gains were held back by disappointing results from Exxon Mobil as well as news out of the Bank of Japan, which did not announce as much stimulus as many had hoped.
The Dow Jones industrial average closed down 24.11 points, or 0.1 percent, to 18,432.24.
The Dow was held back partly by a drop in the oil giant Exxon Mobil. The company reported its smallest quarterly profit in 17 years, well below what analysts were looking for, due to the continuing weakness in oil prices. Its major competitor, Chevron, fared slightly better. While earnings dropped sharply from a year ago, Chevron's results still beat analysts' expectations.
Exxon fell $1.25, or 1.4 percent, to $88.95. Chevron climbed 69 cents, or 0.7 percent, to $102.48 after being down earlier in the day.
Broader market indicators ended higher. The Standard & Poor's 500 index rose 3.54 points, or 0.2 percent, to 2,173.60 and the Nasdaq composite increased 7.15 points, or 0.1 percent, to 5,162.13.
Wall Street is finishing out its busiest week of corporate earnings, which was dominated by mostly strong results from technology companies including Apple, Facebook, Alphabet, Amazon and others.
Alphabet, the parent company of Google, jumped $25.50, or 3.3 percent, to $791.34. The company reported earnings of $8.42 a share, well above the $8.04 that analysts were looking for.
Amazon rose $6.20, or 1 percent, to $758.81. The online retail giant reported a profit of $1.78 per share, well above the $1.11 a share that analysts expected. Amazon reported it sold $30.4 billion in goods in the quarter, up 31 percent from a year earlier.
The strong results from Amazon and Google, as well as the results from other tech companies, helped lift the technology-heavy Nasdaq 1.2 percent this week, while the Dow lost 0.8 percent. The S&P 500 closed the week down slightly. It was the first weekly loss for the S&P 500 after four weeks of gains.
So far, corporate profits appear to be coming well ahead of what were very low expectations. Earnings in the S&P 500 so far are down 2.4 percent from a year ago, which is better than the 5.2 percent decline expected when earnings season started, according to S&P Global Market Intelligence.
"Expectations were exceptionally low for the second quarter. While consumers goods and technology has been better than expected, the energy sector continues to show challenges," said Kate Moore, chief equity strategist for BlackRock.
Investors remain cautious, however. The run-up earlier this month made stocks more expensive than investors are historically comfortable with. The S&P 500 is trading at 18.5 times its expected earnings for the next year, noticeable above the 12-14 times investors typically look for.
The presidential election will continue to grow as an issue for markets in the next several months. Investors dislike uncertainty, and the unexpectedly close presidential election and mostly unknown policies of Donald Trump puts them on edge.
Next week another fifth of the S&P 500 will report their results, including Proctor & Gamble, General Motors, Kraft Heinz, 21st Century Fox and Allstate, among many others.
Moore also pointed out the July jobs report, released August 5, will give investors direction since the June and May jobs reports showed two clashing directions for the U.S. economy.
Japan's central bank ended a policy meeting Friday by announcing it will expand purchases of exchange traded funds from financial institutions to help inject more cash into the world's third-largest economy and pursue its 2 percent inflation target. But the measures fell short of hopes for more aggressive action. That helped the yen surge as investors priced in fewer yen in circulation. The dollar dropped to 102.03 yen from 105.45 yen.
Bond prices rose. The yield on the benchmark U.S. 10-year Treasury note falling to 1.46 percent from 1.51 percent the day before.
In energy trading, benchmark U.S. crude reversed earlier losses and was up 46 cents to close at $41.60 on the New York Mercantile Exchange. Brent crude, used to price international oils, fell 24 cents to $42.46 a barrel in London.
Heating oil rose less than 1 cent to $1.28 a gallon, wholesale gasoline futures rose 1 cent to $1.32 a gallon and natural gas fell was little changed at $2.88 per thousand cubic feet.
In other currencies, the euro rose to $1.1179 from $1.1073 the day before and the British pound rose to $1.3239 from $1.3148.
The price of gold closed up $16.70 to $1,349 an ounce, silver rose 16 cents to $20.31 an ounce and copper rose a penny to $2.222 a pound.