The Dow and S&P 500 booked their best day of gains in about two weeks on Thursday as investors looked forward to hearing from the Federal Reserve’s Jerome Powell on Friday at the annual Jackson Hole, Wyo. economic gathering. The Dow Jones Industrial Average DJIA, +0.98% rose about 322 points, or 1%, ending near 33,292, near the session high. The S&P 500 index SPX, +1.41% advanced 1.4%. That marked the best daily percentage gain for both indexes since Aug. 12, according to FactSet data. But it was the Nasdaq Composite Index COMP, +1.67% that outperformed, rising 1.7%. Stocks had been struggling for direction earlier in the session, despite a batch of positive economic data and as investors look to gauge whether the strong summer rally still has legs. In economic data, the number of Americans who applied for unemployment benefits last week fell to a one-month low of 243,000, indicating layoffs remain near record lows.