NEW YORK, RAW – US stocks have shaken off early declines and closed out the last trading day of the month with modest gains on Friday as a rise in Microsoft helped offset declines in Amazon and Apple after disappointing quarterly earnings from the online retailer and iPhone maker.

Microsoft Corp’s shares closed at a record high of $US331.62 ($A441.57) and ended the session with a market capitalisation of $US2.49 trillion ($A3.32 trillion), surpassing Apple Inc’s market cap of roughly $US2.48 trillion ($A3.3 trillion).

Apple lost 1.81 per cent after it warned the impact of supply-chain disruptions will be even worse during the current holiday sales quarter, while Inc declined 2.15 per cent as it forecast downbeat holiday-quarter sales amid labour shortages.

“The takeaway from today is the resilience to the overall index despite 10 per cent of market cap in two companies disappointing and yet the market is flat. It’s the resilience of the marketplace, it suggests to me the trend is still intact,” said David Joy, chief market strategist at Ameriprise Financial in Boston.

“Maybe the numbers were a surprise to the analyst community but not the reasons for the disappointment so there is still a general view that this is not business lost but business postponed and the trend in the economy and in the market continues to be to the upside.”

The Dow Jones Industrial Average rose 89.08 points, or 0.25 per cent, to 35,819.56, the S&P 500 gained 8.96 points, or 0.19 per cent, to 4,605.38 and the Nasdaq Composite added 50.27 points, or 0.33 per cent, to 15,498.39.

The S&P 500 had fallen as much as 0.65 per cent earlier in the day. The benchmark index advanced 1.3 per cent for the week, its fourth straight weekly climb, marking its longest weekly streak of gains since April. For the month, the S&P rose 6.9 per cent, its biggest monthly rise since November 2020.

The Dow rose 0.4 per cent for the week while the Nasdaq gained 2.7 per cent, also marking four straight weekly gains for each. The Dow climbed 5.8 per cent for October, its best monthly performance since March, while the Nasdaq jumped 7.3 per cent for its biggest monthly percentage gain since November 2020.

Apple had risen about 2.5 per cent while Amazon gained 1.6 per cent in Thursday’s session, helping to send the S&P 500 and Nasdaq to closing record highs.

With 279 companies in the S&P 500 having reported results through Friday morning, 82.1 per cent have topped earnings expectations, according to Refinitiv data. The current year-over-year earnings growth rate for the third quarter is 39.2 per cent.

Market participants have been closely attuned to the ability of companies to manoeuvre through labour shortages, rising price pressures and clogs in the supply chain, and a solid earnings season has helped investors overlook a mixed macroeconomic picture with a Federal Reserve that is poised to begin to trim its massive bond purchases soon.

The central bank’s next policy announcement is on November 3.

Data showed US consumer spending increased solidly in September, while inflation pressures are broadening.

The data indicated the jury is still out on whether the Fed’s “transitory” view on inflation will hold true.

AbbVie Inc advanced 4.56 per cent as the US drugmaker raised its 2021 adjusted profit forecast for the third time this year.

Starbucks Corp tumbled 6.30 per cent after the coffee chain said it expects fiscal 2022 operating margin to be below its long-term target due to inflation and investments.

Declining issues outnumbered advancing ones on the NYSE by a 1.14-to-1 ratio; on Nasdaq, a 1.02-to-1 ratio favoured advancers.

The S&P 500 posted 50 new 52-week highs and 4 new lows; the Nasdaq Composite recorded 127 new highs and 78 new lows.

Volume on US exchanges was 11.12 billion shares, compared with the 10.35 billion average for the full session over the last 20 trading days.