We propose a non linear Langevin equation as a model for stock market fluctuations and crashes. This equation is based on an identification of the different processes influencing the demand and supply, and their mathematical transcription. We emphasize the importance of feedback effects of price variations onto themselves. Risk aversion, in particular, leads to an up-down symmetry breaking term which is responsible for crashes, where ‘panic’ is self reinforcing. It is also responsible for the sudden collapse of speculative bubbles. Interestingly, these crashes appear as rare, ‘activated’ events, and have an exponentially small probability of occurence.We predict that the shape of the falldown of the price during a crash should be logarithmic. The normal regime, where the stock price exhibits behavior similar to that of a random walk, however reveals non trivial correlations on different time scales, in particular on the time scale over which operators perceive a change of trend.