We analyze the optimal financing of investment projects when managers must
exert unobservable effort and can also switch to less profitable riskier ve
ntures. Optimal financial contracts can be implemented by a combination of
debt and equity when the risk-shifting problem is the most severe while sto
ck options are also needed when the effort problem is the most severe. Wors
ening of the moral hazard problems leads to decreases in investment and out
put at the macroeconomic level. Moreover, aggregate leverage decreases with
the risk-shifting problem and increases with the effort problem.