U.S. stocks eked out marginal gains on Friday to cap off the best three-week stretch for the S&P 500 and Nasdaq Composite since 2020, Dow Jones Market Data show. The S&P 500 SPX gained 5.78 points, or 0.1%, to finish Friday’s session at 4,514.02, according to preliminary closing data from FactSet. The Nasdaq Composite COMP gained 11.81 points, or 0.1%, to close at 14,125.48. The Dow Jones Industrial Average DJIA rose by 1.81 points, or less than 0.1%, to finish at 34,947.28. The S&P 500 has risen 9.4% over the past three weeks, according to preliminary Dow Jones data, the biggest three-week percentage-point increase since…