We study dynamic general equilibrium in a Lucas economy with two trees, one consumption good, two CRRA investors with heterogeneous risk aversions, and portfolio constraints. We focus on margin and leverage constraints, which restrict access to credit markets. We find positive relationship between the amount of leverage in the economy and magnitudes of conditional stock return correlations and volatilities. Tighter constraints give rise to rich saddle-type patterns in correlations and volatilities, make them less countercyclical, increase risk premia proportionally to assets' margins, and increase price-dividend ratios of low-margin assets more than those of high-margin assets. The paper offers a new methodology for solving models with constraints, and derives closed-form solutions for the unconstrained case and the case of leverage constraints.