Speculative bubbles and crashes in stock markets: an interacting-agent model of speculative activity