Yes, there is a loose relationship between the economy and the stock market, but the stock market reacts primarily to the “flow of funds.” If more money is flowing into the market, it will go up. If money flows out, the stock market goes down. That is why mutual funds are watched so closely, as a proxy for the overall market.
Right now, foreigners are pouring money into the U.S. The latest available data is from September, when foreigners bought $94.2 billion in long-term securities, half of which went into U.S. Treasuries. That is the highest inflow since January of 2012. In addition, Americans sold $70.1 billion of their assets owned outside the U.S. and brought that money home as well. The combined $164.3 billion of inflows to the U.S. is the highest on record. Obviously, this increased inflow reflects the rising fear outside the United States.
This is also what has been driving up the dollar. Foreigners need dollars to buy U.S. assets. Therefore, they have to sell Euros or Yen or whatever, which drives down that currency, and buy dollars, which bids up that currency. It is a good time to use your dollars to travel abroad but not to be an exporter.
Enjoy the ride, but remember that those inflows will become outflows — when worldwide fears subside even a little.