Motivated by the increasing interest in analyzing the links between the financial sector and the real economy, we develop a macro-financial structural model with two novel features. First, we include idiosyncratic and aggregate risk in a tractable general equilibrium model. This allows us to capture sectoral dynamics and the probabilities of default of both firms and financial intermediaries, and the feedback between them. Second, we introduce the concept of sticky (observed) versus flexible (agents’ target) capital. The identified differences between realized and optimal values — the capital gaps of firms and banks — lead financial and business cycles, and cause gaps in credit spreads and asset prices. The model can be used as a signaling device for macroprudential intervention, and to gauge whether macroprudential action was successful ex-post (e.g., whether gaps were closed). For illustration, we show how the analysis of gaps can be applied to the U.S. economy using Bayesian estimation techniques.