S&P, Dow set records; dollar hits 4-month high

By Richard Leong NEW YORK (Reuters) - Upbeat company earnings lifted U.S. and European stock prices on Wednesday, with the Dow and Standard & Poor's 500 setting record highs, while the dollar reached a four-month peak on bets the U.S. Federal Reserve may raise interest rates by year-end. The impressive run in major equity markets around the globe led investors to reduce their safe-haven positions in U.S. and German government debt, sending their yields higher. Oil prices fell to a two-month low before U.S. data that may signal whether a supply glut in the top consuming country was easing. "For the rally to sustain we are going to need to see continued improvement in the earnings and economic activity," said Peter Cardillo, chief market economist at First Standard Financial in New York. Shortly after their open, the Dow Jones industrial average <.DJI> was up 14.72 points, or 0.08 percent, to 18,573.73, the S&P 500 <.SPX> was up 3.23 points, or 0.15 percent, to 2,167.01 and the Nasdaq Composite <.IXIC> was 27.29 points, or 0.54 percent higher, at 5,063.66. Microsoft and Morgan Stanley were the latest U.S. companies whose quarterly results topped analysts estimates. Across the Atlantic, SAP , Europe's largest software group, and ASML Holding , a supplier to semiconductor makers, reported quarterly results that beat forecasts. They helped propel Europe's broad FTSEurofirst 300 index <.FTEU3> up 0.58 percent to 1,340 points. The MSCI world equity index <.MIWD00000PUS>, which tracks shares in 45 nations, rose 0.65 points or 0.16 percent, to 411.48. Earlier, Japan's Nikkei <.N225> broke a seven-day winning streak, falling 0.3 percent. While most global stock markets post gains, investors scaled back their holdings of low-yielding government bonds, with U.S. and German yields near their highest levels since Britain's vote to leave the European Union on June 23. Benchmark U.S. 10-year Treasury yield was up 3 basis points at 1.59 percent, while 10-year German Bund yield edged up 1 basis point at -0.17 percent. In currency trading, the dollar rose to its strongest levels in four months against a basket of currencies as lofty stock prices and the recent string of encouraging economic data revived wagers the Fed would raise interest rates later this year. The dollar index <.DXY> was up 0.1 percent at 97.133. A stronger greenback partly weighed down oil prices with U.S. crude futures falling a two-month low ahead of domestic data on energy inventories at 10:30 a.m. (1430 GMT). Brent crude was last down $0.44, or down 0.94 percent, at $46.22 a barrel. U.S. crude was last down $0.68, or down 1.52 percent, at $43.97 per barrel. Gold declined to a three-week low on rising equity prices and a stronger dollar. It fell $15.15 or 1.14 percent, to $1,316.58 an ounce. (Additional reporting by Barani Krishnan in New York; Nigel Stephenson, Anirban Nag and Atul Prakash in London; Shinichi Saoshiro in Tokyo; editing by John Stonestreet and Nick Zieminski)