The latest monthly gain also snapped a run of four consecutive August losses, including two double-digit hits in 2022 and 2023.