This study proposes portfolio construction strategies based on novel sentiment, ESG and SDG scores. We utilize natural language processing to establish a novel daily score system that mitigates concerns of different rating standards. The portfolios constructed are optimized via machine learning algorithms on a monthly basis using daily historical returns. Utilizing the equal‐weighted portfolios as benchmarks, we empirically show that our optimized portfolios exhibit better trading performance in both the SPX500 and STOXX600 indices. The findings demonstrate that nonlinear models such as random forests, neural networks, and genetic algorithms can perform better than other machine learning models in portfolio management.