New York CNN Business  — 

Stocks rallied sharply Friday, and the S&P 500 and the Nasdaq Composite both closed at a fresh all-time high.

Both indexes had already opened at all-time intraday highs, after a better-than-expected jobs report boosted investor sentiment early Friday.

The S&P (SPX) closed up nearly 1% at 3,067 points, logging its third record close of the week. The Nasdaq (COMP) finished 1.1% higher at 8,386 points and surpassed its July high.

While the Dow (INDU) rallied as well, and ended just 12 points below its July record. The index closed up 301 points, or 1.1%.

“Solid October jobs data shows the engine of the US economy is humming along despite elevated global uncertainty, a good sign for future growth as improving hiring conditions fuel consumer spending and confidence,” said Ryan Detrick, Senior Market Strategist for LPL Financial.

All three indexes ended the week in the green. For the S&P it was the fourth straight week of gains, while it was the fifth for the Nasdaq.

Investors shrugged off another round of weak manufacturing data from the Institute of Supply Management, which showed the third monthly contraction in a row.