Stock price dynamics: an empirical test of the chartist-fundamentalist hypothesis