Time series has been widely applied in the real world; traditional methods can hardly solve the dynamic environment issue resulting from the assumption of stationary process. Many traditional models and artificial intelligence technologies had been developed under this assumption, and adapted the dynamic environment based on the time-varying characteristic. But these models still has drawback of dividing the time series into training set and testing set when developing the models. It means the time-varying characteristic of these two sets did not be considered, and it might cause spurious regression phenomenon and result in misleading the statistic analysis. In order to forecast dynamic time series, a model which can consider the dynamic environment and conquer the out-of-sample problem is necessary. Particle swarm optimization (PSO) has the characteristics of fast-convergence and avoiding local optimal, also has been widely used in the time series forecasting. In this research, we proposed a modified PSO to consider the dynamic environment issue and use the advantage of PSO to forecast the dynamic financial time series.