  We propose two rational expectation models of transient financial bubbles
with heterogeneous arbitrageurs and positive feedbacks leading to
self-reinforcing transient stochastic faster-than-exponential price dynamics.
As a result of the nonlinear feedbacks, the termination of a bubble is found to
be characterized by a finite-time singularity in the bubble price formation
process ending at some potential critical time $\tilde{t}_c$, which follows a
mean-reversing stationary dynamics. Because of the heterogeneity of the
rational agents' expectations, there is a synchronization problem for the
optimal exit times determined by these arbitrageurs, which leads to the
survival of the bubble almost all the way to its theoretical end time. The
explicit exact analytical solutions of the two models provide nonlinear
transformations which allow us to develop novel tests for the presence of
bubbles in financial time series. Avoiding the difficult problem of parameter
estimation of the stochastic differential equation describing the price
dynamics, the derived operational procedures allow us to diagnose bubbles that
are in the making and to forecast their termination time. The tests performed
on three financial markets, the US S&P500 index from 1 February 1980 to 31
October 2008, the US NASDAQ composite index from 1 January 1980 to 31 July 2008
and the Hong Kong Hang Seng index from 1 December 1986 to 30 November 2008,
suggest the feasibility of advance bubble warning.
