Can anyone explain the stock market to me?

Our trade deficit is out of control.  Our national debt is out of control.  The dollar is dropping against most currencies.  Oil is at an all-time high.  The housing market is weak.  The mortgage market is in disarray. 

And, until two weeks ago, the stock market was hitting record highs.

In the last two weeks, it appears the market finally noticed the economy really isn’t doing that well.  A rather sudden “correction” is well under way.

Does anyone have a clue what “forces” actually influence the market?  I know the “experts” don’t.  Dozens of times the market has reversed course mid-day and the headlines give the same reason for the market going down as they did for it going up.  For example, we’ll get lousy news on employment.  The market will go up and the “experts” will say it’s because the bad news has eased inflationary concerns.  Later in the day, the market will go down and the “experts” will say it’s because the bad news means the economy is in trouble.

Given that a substantial part of my retirement money is in the market I’d really like to know what is going on here.  Anybody have any bright ideas?