Prior studies argue that investment by undervalued firms that require external equity is particularly sensitive to stock prices in irrational capital markets. We present a model in which investment can appear to be more sensitive to stock prices when capital markets are rational, but subject to imperfections such as debt overhang, information asymmetries, and financial distress costs. Our empirical tests support the rational (but imperfect) capital markets view. Specifically, investment–stock price sensitivity is related to firm leverage, financial slack, and probability of financial distress, but is not related to proxies for firm undervaluation. Because, in our model, stock prices reflect the net present values (NPVs) of investment opportunities, our results are consistent with rational capital markets improving the allocation of capital by channeling more funds to firms with positive NPV projects.