The 2007-2009 financial crisis has shown the importance of understanding economic and financial dynamics for the evaluation of systemic risks. In this article, we use classical perturbation theory of dynamical systems to measure the global stability of the financial system. We analyze the bifurcation mechanism in the 2007-2009 financial crisis and extend the result to general financial crises. Historically a financial crisis has resulted from heavily leveraged overinvestment. When leverage is high economic agents are susceptible to decrease in revenue. Securitization interconnected the market agents, therefore a small default in one segment spread to the entire system, causing a systemic risk. We build a dynamic model of financial system with several economic aggregates, which we model like as many agents, and show that high leverage reduces borrowing capacity of economic agents, thus raises the reactions of agents to variations of their income - which we call elasticities. Elasticities can be directly measured from the observation of flows of funds between aggregates. The Jacobian matrix of the system is deduced by a simple formula from those elasticities. Too high elasticities break the financial equilibrium and eventually result in a crisis. Market instability can be monitored by measuring the highest eigenvalue - the spectral radius - of a matrix of the Jacobian matrix. This spectral radius can be used as an early indicator of market instability and potential crisis. Our contribution is to provide an actual way of measuring how close to chaos the market is. Estimating elasticities and actually generating the indicators of instability will be the topic of forthcoming research.