We study the impact of time-varying macroeconomic conditions on optimal dynamic capital structure and the aggregate dynamics of firms in a cross-section. Our structural-equilibrium framework
embeds a contingent-claim corporate financing model within a standard consumption-based asset-
pricing model. This enables us to investigate the effect of macroeconomic conditions on asset
valuation and optimal corporate policies as well as study the impact of preferences on capital
structure. We find that capital structure is pro-cyclical at refinancing dates when firms relever, but
counter-cyclical in aggregate dynamics, consistent with empirical evidence. Financially constrained
firms follow more pro-cyclical policies. Capital structure is path-dependent. Leverage accounts for
most of the macroeconomic risk relevant for predicting defaults. The paper also develops a number
of novel empirically testable conjectures on capital structure in a dynamic economy.