I download S&P 500 prices using yfinance package. Then, preprocessing the data with pandas, and get it ready for machine learning.
I train a Random Forest model and make predictions using backtesting. Then, I improve the model by adding finance stock indicator (new predictors).