Stock Prediction Algorithm program by Java