Associated Press photoWorkers gather at the gate of Viana do Castelo shipyards prior to a parade to the city center to protest against the lay off of some 380 people in coming months, more than half the 720 total employees of the yards, in Viana do Castelo, Portugal, Wednesday. Portugal's National Statistics Institute said Wednesday the deficit fell 0.7 percentage points from the previous quarter thanks to austerity measures designed to cut debt but remains high and far off target despite austerity program. In the United States, meanwhile, Moody's Investor Services downgraded the country's debt rating to junk status.

NEW YORK – The first week of July is off to a much slower start than the last week of June, when stocks had their biggest gains in two years.

Major indexes were mixed for much of the day Tuesday but dipped in afternoon trading after Moody’s Investors Service downgraded Portugal’s debt to “junk.” The credit ratings agency cited concerns that Portugal will not be able to meet targets to reduce its deficit due to the “formidable challenges” the country is facing in cutting spending.

The Dow Jones industrial average fell 12.90, or 0.1 percent, to close at 12,569.87. The Dow had risen as many as 19 points in morning trading after the Commerce Department reported an increase in orders for manufactured goods.

Bond prices rose, sending their yields lower, as investors sought out the relative safety of Treasurys. The yield on the 10-year Treasury note fell to 3.12 percent from 3.19 percent late Friday.

Investors have been worried that Europe’s debt problems could slow the global economy and cause a crisis for European banks. “The European debt crisis is going to be with us for a while,” said David Kelly, chief market strategist at J.P. Morgan Funds. “There still is a very big issue out there.”

Trading volume was light as many traders took vacations. U.S. markets were closed Monday for the July 4th holiday. Many investors are looking ahead to next week, when aluminum maker Alcoa Inc. becomes the first major U.S. company to report financial results.

Last week the Dow rose 648 points, its best week in two years, after Nike reported strong earnings and Greece cleared its final hurdle before receiving another round of loans. Automakers also reported that their sales rose 7 percent in June compared with the same month a year ago.

The gains erased nearly six weeks of losses. Prior to last week stocks had been falling since late April because of concerns about the debt crisis in Europe, weak home sales in the U.S. and slowing manufacturing. By mid-June, stocks had given up most of their gains for the year.

With last week’s rally, the Dow is now down just 1.8 percent from April 29, when it reached a three-year high. The Dow is up 8.6 percent for the year. The S&P 500 index is up 6.4 percent and the Nasdaq composite is up 6.5 percent.

Analysts are optimistic about the corporate earnings reports that will start to come in next week. Earnings from companies in the S&P 500 index are expected to rise 14 percent from the same period a year ago, according to FactSet. Revenue is expected to rise 11 percent.

“There hasn’t yet really been a reason to get concerned about corporate America,” said Randy Warren, chief investment officer of Warren Financial Service. “It’s the rest of the America that’s struggling.”

Even while companies have been reporting higher profits, unemployment has remained stubbornly high since the recession officially ended in June 2009. The Labor Department will report the latest figures on unemployment and payrolls on Friday, and analysts expect to hear more bad news. They forecast that the unemployment rate will remain unchanged from May at 9.1 percent. They also expect that employers added only 90,000 jobs last month, below the 100,000 threshold that economists say is needed to prevent the unemployment rate from increasing.

Several stocks rose sharply on deals and other news. Immucor Inc. rose 30 percent after the maker of blood-testing equipment agreed to be bought by private-investment firm TPG Capital in a deal worth $1.97 billion.

Southern Union Co. rose 4.2 percent after Energy Transfer Equity LP said it would pay $5.1 billion for the pipeline company. The deal trumped a $4.9 billion bid made in late June by rival Williams Cos.

Netflix Inc. rose 8.1 percent, the most of any company in the Standard & Poor’s 500 index, after announcing that it would expand its online video streaming service to 43 countries in Latin America and the Caribbean.

Chevron Corp. rose 1 percent, the most of any stock in the Dow average, after crude oil rose $1.95 to $96.89 a barrel.

The number of stocks that rose was about the same as those that fell on the New York Stock Exchange. Trading volume was very light at 3.4 billion shares, below the average of 4.2 billion over the past 200 days.