The US financial crisis of 2008 involved the interaction of banks and security houses. The issues of
“contagion” and debt crises became subjects of concern. The aim of this paper is to suggest dynamic nonlinear models of
the interactions and optimization in financial markets, which explain the dynamics of contagion and the vulnerability of
the financial sector to shocks. I compare stochastic and deterministic models of “optimal” debt. In each case an early
warning signal of financial difficulties is an “excessive” debt ratio equal to the actual less the derived optimal ratio.