NEW YORK -- Stocks are headed for a correction.

No, stocks are rallying.

Wait, stocks are down again.

Or up. A lot.

For investors, June was one long seesaw ride that began with a deep plunge on the first day of the month. Six days of declines were followed by a week of give and take and then four days of gains. The month ended with strong earnings from a consumer bellwether and signs that a European debt crisis could be averted. That led to a 4-day advance in the three major stock indexes.

That strong ending didn't make June a winner. Stocks were down about 2 percent for the month, the second straight month that the market finished lower. Only the Dow Jones industrial average eked out a gain, of 0.8 percent, for the quarter. All three indexes are still up for the year.

Concerns about the strength of the U.S. economy and a possible debt default by Greece spooked investors much of the month. By June 15, the S&P had lost nearly all of its gains for the year, before dividends.

Market declines mean different things to different people. Rather than retreat further, some investors came to believe that stocks were relatively cheap. Stocks began to reverse course.

The upward climb continued this week when Nike Inc.'s earnings came in much higher than analysts had been expecting. That indicated that higher gas prices haven't stopped consumers from splurging on things like pricey sneakers and sportswear. In the last four days of the month, the S&P rose 4.1 percent.

Even so, the S&P 500 lost 1.8 percent for the month, the Dow finished down 1.2 percent for the month. The Nasdaq composite fell 2.2 percent. For the second quarter, the Dow gained 0.7 percent between April and June. The S&P 500 and Nasdaq, however, lost 0.4 percent and 0.3 percent, respectively.

Most economists, analysts and investors agree that, at the very least, the U.S. economy has struggled through a soft patch.

Whether the late June rally continues into July depends partly on results from upcoming earnings reports and lingering effects of that soft patch.

Most stock analysts think the economy's troubles are temporary.

Few have lowered their estimates over the last month despite a dip in consumer spending and continued high unemployment. One reason: even if U.S. consumers spend less, American companies continue to make a significant portion of their profits overseas. As of 2010, 40 percent of the profits for U.S. companies in the S&P 500 came from overseas.

Thursday's tally

Stocks closed broadly higher Thursday after Greece cleared a final hurdle toward receiving its next installment of emergency loans. An unexpected pickup in manufacturing in the Midwest also helped push stock indexes higher. It was the fourth straight day of gains.

Year to date