A Leverage-Based Model of Speculative Bubbles