All three major stock indexes closed higher, supported by strong Amazon earnings forecasts.
However, market sentiment was dampened slightly by concerns that the Federal Reserve (Fed) may take a more cautious approach to interest rate cuts.
The S&P 500, Nasdaq Composite and Dow Jones all posted weekly gains and their longest monthly winning streak in years.
Amazon shares surged 9.6% to close at an all-time high after issuing quarterly sales forecasts that beat expectations.
The gains helped the online retailer and cloud services giant push consumer discretionary shares up 4%, marking their biggest daily gain since May 12.
Apple shares, on the other hand, fell 0.4% despite iPhone sales forecasts that beat Wall Street’s expectations, after Apple CEO Tim Cook warned of supply constraints that risked hurting the company’s performance.
The Dow Jones Industrial Average rose 0.09% to 47,562.87, the S&P 500 rose 0.26% to 6,840.20, and the tech-focused Nasdaq rose 0.61% to 23,724.96.
Kim Forrest, chief executive officer of Bokeh Capital, said investors are now focusing on earnings reports from major companies amid a lack of economic data due to the month-long government shutdown.
According to CME Group's FedWatch tool, investors on Friday set a 65% probability of a December interest rate cut, down from 72.8% on Thursday and 91.7% the previous week.
In other news, several retailer stocks fell on Friday on concerns that November sales could decline if federal food assistance benefits known as the Supplemental Nutrition Assistance Program (SNAP) end due to the extended government shutdown.
Two federal judges ruled that the administration of US President Donald Trump cannot suspend food assistance for millions of Americans during the government shutdown.
They also insisted that the government must use contingency funds to cover the benefit payments.
The situation caused shares of retailer Kroger to fall 2.8%, Conagra Brands to fall 1.3% and Walmart to fall 1%.
Trading volume on US exchanges was worth $21.03 billion, compared with $21.13 billion in the full 20 trading days.