We describe the development and calibration of a hybrid agent-based dynamical systems model of the stock market that is capable of reproducing empirical market behavior. The model consists of two types of trader agents, fundamentalists and noise traders, as well as an opinion dynamic for the latter (optimistic vs. pessimistic). The trader agents switch types stochastically over time based on simple behavioral rules. A system of ordinary differential equations is used to model the stock price as a function of the states of the trader agents. We show that the model can reproduce key stylized facts (e.g., volatility clustering and fat tails) while providing a behavioral interpretation of how the stock market itself can cause periods of high volatility and large price movements, even when the economic value of the stock grows at a constant rate.