A K-means Algorithm for Financial Market Risk Forecasting