Stock prices have been risky when they have grown faster than corporate cash flow (1998-2000, 2007, 2017) and attractive when cash flow has risen faster than stock prices (1994-1997, 2001-2006, 2009-2014).
Short-term stock prices trends are largely driven by investor sentiment, but long-term prices correlate with corporate cash flow retained to grow the value of the business. The chart shown above illustrates the gaps when sentiment was overly optimistic or pessimistic relative to value generation. The technology bubble demonstrated that overvaluation can persist and expand for several years, but share prices cannot escape from the financial gravitational force pulling them back towards cash flow.
The chart was created here at the St Louis Fed site. Changing the starting point or using a log scale can move the lines a bit, but the basic story is unchanged, stock prices rose a lot in the past 7 years and net cash flow rose a little.
The Wilshire 5000 Index measures the capitalization weighted performance of all 3492 US equities with readily available price data.
Corporate Net Cash Flow with IVA measures cash retained by all private corporations. IVA (Inventory Valuation Adjustment) adjusts profits to value cost of goods sold at replacement cost rather than historical acquisition cost. IVA removes the impact of price inflation on inventory held from prior periods. Net Cash Flow is after dividends and capital expenditures so cash flow surges during recessions when companies become conservative and weakens over the course of a lengthy boom as managements become bolder and more careless.