An ongoing debate sets capital budgeting against market timing. The primary difficulty in evaluating these theories is finding distinct exogenous proxies for investment opportunities and mispricing. We use demand shifts induced by demographics to address this problem, and hence, provide a more definitive analysis of the theories. According to capital budgeting, industries anticipating positive demand shifts in the near future should issue more equity (and debt) to finance additional capacity. To the extent that demographic shifts in the more distant future are not incorporated into equity prices, market timing implies that industries anticipating positive demand shifts in the distant future should issue less equity due to undervaluation. We find evidence supporting both capital budgeting and market timing: new listings and equity issuance by existing listings respond positively to demand shifts up to 5 years ahead, and negatively to demand shifts 5 to 10 years ahead.