Economy growth (cycle) is typically lagging several years behind the stock markets and when comes the time when we get some strong prints from GDP, stock markets are usually close to a cycle top. They can stay there for some time depending how strong the economy cycle is but they dont add any serious gains, its a sideway trading in basic.
The reason is very simple - markets are all about money and the risk appetite. Its not about the value, you can have a stock in the same situation but once it will have a P/E of 8 and the other time P/E of 25. The difference in market like these examples is 300+ %. So you need to ask: when do you have 1) best access to money that can be used for pushing up stock markets and 2) when are the stocks most attractive relative to other assets? Answer: when the general interest rates are very low. And when are interest rates low? Answer: when the economy is not doing good and the inflation is therefore not an issue. Then you have the best condition for stock markets - the are not many other options to invest (real economy struggling, money assets returns are very low) and the costs of borrowing money are very low. There are some other issues like carry trades potentials (eg JPY is feeding the stock market rally, esp. financials where the USDJPY correlation is at extreme levels; on the other hand the same currency pair significantly pushes down gold price since the correlation index between gold and USDJPY is around huge -0,8 and -0,9) but in general this is enough for basic understanding.
I guess you have seen the "strange" reactions to the latest world developments when very bad economic data meant actually a huge rally on stock markets. Reason is simple - weak economy, more printing. Im sure that if we get several strong economy prints in a row, stock markets will start falling apart since it will mean QE could come to an end soon and interest rates might get increased. The point is that strong economy is connected to rising inflating, therefore rising interest rates, therefore rising costs of capital (money is not that cheap anymore) and most importantly both economy and money markets start to be a competition for stock markets as they offer solid returns on investments. Thats why strengthening economy is usually marking a top on stock markets.
Nowadays we have a new serious stuff in play and thats HFT. They buy when they see odds are in their favour and they see solid chance to sell higher and therefore they keep pushing up the market no matter what PE or anything else. They see a chance, they grab it. Thats imho the main reason why markets look like the do last months. Look at AMZN - thats not a stock anymore (PE of 1000-3000, come on), thats totally and only a trading vehicle where computers try to make money on. And seeing how things go on other places, Im a bit worried that this could happen to the market as a whole to some extent. Its kinda sad but we have no choice but to accept it.
Im sorry if I got too far from the initial point and took your time :-)