Machine Learning Algorithm Forecasts Market Gains Ahead