The Nasdaq Composite was set to close out a wacky week with a record close on Friday as the stock market grinded higher.

The tech-heavy index rose 0.4%. The S&P 500 gained 0.3%. The Dow Jones Industrial Average rose 131 points, or 0.3%

The Nasdaq is on pace for its best week since June 27, while the S&P is riding its best week since the holiday-shortened one that ended on July 3.