U.S. stocks slipped on Monday as a four-week rally encouraged investors to take profits, but McDonald's better-than-expected July sales pushed up the Dow component, briefly lifting the index to a positive territory.

The decline follows Friday's sharp advance, when the Standard & Poor's 500 Index climbed to a 10-month high after a better-than-expected July non-farm payrolls report gave investors reason to hope that the economy was on the cusp of a recovery. The S&P 500 is now up about 49 percent from its 12-year closing low set on March 9.

Today is considered a mild profit-taking day after a very good two months, said Chad Morganlander, portfolio manager at Stifel, Nicolaus & Co in Florham Park, New Jersey.

The Dow Jones industrial average <.DJI> was down 37.93 points, or 0.40 percent, at 9,332.14. The Standard & Poor's 500 Index <.SPX> was down 4.76 points, or 0.47 percent, at 1,005.72. The Nasdaq Composite Index <.IXIC> was down 11.32 points, or 0.57 percent, at 1,988.93.

Earlier, the Dow hit a session high at 9,371.96, less than 2 points above Friday's close.

Investors sold some shares of Boeing Co , sending the stock down 2.7 percent to $45.43, even after the big U.S. aircraft manufacturer and defense contractor received a $1.15 billion contract to supply helicopters to Canada.

Shares of Wal-Mart Stores Inc , also a Dow component, fell 0.2 percent to $49.21 after JP Morgan Chase & Co said the retail giant will not post any growth in second-quarter same-store sales, weighed down partly by its weak summer seasonal business.

Warren Buffett's Berkshire Hathaway Inc reported its best quarter in nearly two years after the closing bell on Friday, but operating earnings for the second quarter fell short of forecasts. Berkshire's stock fell about 4 percent to $104,000 on the NYSE.

But McDonald's Corp shares rose 1.7 percent to $56.14 after the fast-food restaurant operator reported global same-store sales, or comparable sales, rose 4.3 percent and U.S. comparable sales climbed 2.6 percent for July.

Shares of Freddie Mac leaped 81.1 percent to $1.34 in the first trading session after the second-largest U.S. mortgage finance company reported its first quarterly profit in two years late on Friday. Freddie Mac has been relying on financing from the U.S. Treasury to stay afloat. Earlier in the day, Freddie Mac's stock nearly doubled in price, hitting a session high of $1.41, up from Friday's close at 74 cents.

Investors will keep hunting for signs of economic improvement when the Federal Open Market Committee releases its policy statement on Wednesday afternoon, at the end of its two-day meeting. The central bank is expected to hold interest rates near zero. But investors will watch closely for signals of an exit strategy from the Fed's efforts to prop up the financial system.

Later this week, July retail sales data will be released by the government. And quarterly scorecards are expected from a batch of major retailers, including Wal-Mart, J.C. Penney Co and Macy's Inc . These results will give a snapshot of the retail sector's health and indicate how the recession has affected back-to-school shopping and other consumer spending. Consumers' moods and shopping habits are watched closely because their spending accounts for about two-thirds of U.S. economic activity.

(Editing by Jan Paschal)