a b s t r a c tThis paper presents a DSGE model in which agents' learning about the economy can endogenously generate time-varying macroeconomic volatility. Economic agents use simple models to form expectations and need to learn the relevant parameters. Their gain coefficient is endogenous and is adjusted according to past forecast errors.The model is estimated using likelihood-based Bayesian methods. The endogenous gain is jointly estimated with the structural parameters of the system.The estimation results show that private agents appear to have often switched to constant-gain learning, with a high constant gain, during most of the 1970s and until the early 1980s, while reverting to a decreasing gain later on. As a result, the model can generate a pattern of volatility, which is increasing in the 1970s and falling in the second half of the sample, with a decline that can roughly match the magnitude of the so-called "Great Moderation" in the 1984-2007 period. The paper also documents how a failure to incorporate learning into the estimation may lead econometricians to spuriously find time-varying volatility in the exogenous shocks, even when these have constant variance by construction.