A class of stochastic volatility models (SVMs) with time-varying parameters is presented for online volatility estimation in nonstationary environments. This is achieved by modelling both the volatility and model parameters as states of a hidden Markov model (HMM), thus allowing for the use of particle filters to estimate the resulting posterior densities. The proposed models, based on the logarithmic SVM and the unobserved GARCH model, are evaluated for the estimation of the volatility of the NASDAQ-C and the Chilean IGPA financial indices between June 2007 and January 2010, where the late-2000s financial crisis is included. Simulations show that the proposed time-varying models are well suited for online volatility estimation as (i) they achieve an accuracy comparable to those of offline (batch) algorithms, and (ii) their parameters can be used to identify market changes.