Stocks ended sharply lower Wednesday, as losses accelerated into the close and put both the Dow and the S&P 500 into the red for the year, and the Nasdaq into correction territory.

Upbeat results from Boeing Co. were credited with briefly pushing the Dow higher in early morning trading, before investors took an increasingly defensive stance, fleeing for the relative safety of utilities and consumer nondurable shares.

The Dow Jones Industrial Average DJIA, +1.33% fell 606.11 points, or 2.4%, to 24,583.42, while The S&P 500 SPX, +1.59% dropped 84.59 points, or 3.1%, to 2,656.10, it’s sixth straight losing session. Meanwhile, the Nasdaq Composite Index COMP, +2.26% shed 329.14 points, or 4.4%, to 7108.4, a performance that put the index more than 10% below its Aug. 29 all-time high, meeting the widely used definition of a market correction. The loss also marked the worst day for the Nasdaq since Aug. 18, 2011.

October is shaping up to be a brutal month for equities, as expected, with the S&P falling 8.9% month-to-date, the Dow down 7.1%, and the Nasdaq falling 11.7% since the start of the month.

Wednesday’s session also sent the Dow into losing territory for the year, with the index down 0.6% in 2018. The blue-chip index is also down for five straight weeks, it’s longest string of weekly losses since July, 11 2008, when the market fell for six straight weeks.

The S&P 500 also ended the trading day in the red, down 0.7% year-to-date.

DJIA, +1.33% Don’t miss: Watch out for ‘dead cat bounce’ in stocks says Morgan Stanley’s Wilson

What drove the market?

Mounting concerns about slowing global economic expansion and corporate earnings boiled over late Wednesday.

Wall Street traders have been wading through this week’s deluge of quarterly corporate results, including several megacap names but have found few reasons to buy in an environment that promises higher interest rates and borrowing costs, as the Federal Reserve has indicated it will continue to tighten monetary policy by year’s end. On top of that, earnings growth shows signs of stalling out due to tariff spats between the U.S. and China.

The Fed’s Beige Book, a collection of anecdotes on the economy, showed that wages and prices are rising in the central bank’s 12 districts but not faster than a “modest to moderate” pace and that the economy expanded at a “modest to moderate” pace.

Still, the Fed’s account of the business atmosphere helped to reinforce the view for skittish investors that trade clashes are a genuine, creeping threat to the economy and markets.

China’s recent stock market troubles and political drama in Europe surrounding Italy’s budget row with the European Union as well as Britain’s efforts to exit from the EU also have combined to hurt investor sentiment.

What are analysts saying?

Alec Young, Managing Director of Global Markets Research, FTSE Russell laid blame for the day’s sell off on macroeconomic headwinds. “Chief among them is a Fed that seems determined to continue steady rate increases despite growing signs of weakening global growth as China struggles to stabilize its economy and markets all while US trade tariffs loom,” he wrote in a research note.

“Meanwhile simmering US inflation makes it harder for the Fed to pause, making it more likely interest rates will continue to move up, potentially slowing growth next year. Lastly, Italy and the US elections both remain notable wild cards,” that are adding to investor unease, he argued.

“We’ve had this massive shift in sentiment in recent months from ‘the market can do no wrong,’ to ‘the market can do no right,’” said Amanda Agati, co-chief investment strategist at PNC Financial Services Group. She pointed to Tuesday’s steep selloff of Caterpillar CAT, +0.53% stock as evidence that investors are more eager to sell on bad news than to buy on good news.

“It’s definitely becoming a stock picker’s market,” she said. “Companies that beat expectations and raise guidance get rewarded. Companies that miss or even report in line with expectations get pummeled.”

The triple overhang of trade uncertainty, Fed rate increases, and slowing global growth are “causing investors to jump on any bad news, or even just mediocre news, to punish stocks,” Lance James, senior portfolio manager at RBC Global Asset Management, told MarketWatch.

Read:The stock market faces ‘unlimited downside risk,’ warns veteran trader

Which data are in focus?

The flash reading of IHS Markit’s manufacturing purchasing managers index rose to a five-month high of 55.9 in October from 55.6, while the flash services PMI rose to a two-month high of 54.7 from 53.5 in September. A reading of at least 50 indicates improving conditions.

Sales of newly constructed homes swooned to the lowest since December 2016.

Among Fed speakers, Federal Reserve Board Gov. Lael Brainard was slated to talk at a 7 p.m.

Which stocks were in focus?

Boeing Co. BA, +6.83% shares rose 1.3% after the company reported earnings and revenue that beat Wall Street expectations.

Texas Instruments Inc.’s stock TXN, +1.19% fell 8.2%% after the tech company released third-quarter results late Tuesday.

Freeport-McMoRan Inc. FCX, -0.52% shares skidded 7.8% after the metals and mining company surpassed analysts’ estimates for third-quarter sales and profits.

Shares of United Parcel Service Inc. UPS, +3.56% dropped 5.5%, following the announcement that the firm met third-quarter profit expectations, but came up a bit shy on revenue.

Shares of AT&T Inc. T, shed 8.1% after the telecommunications and media giant reported third-quarter earnings that missed expectations but sales that beat.

General DynamicsCorp. GD, +0.95% declined 7.7% after the aerospace and defense contractor missed revenue estimates for the third quarter.

Hilton Worldwide Holdings Inc. HLT, +3.44% fell 7.3% after reporting third-quarter revenue below analysts estimates.

Microsoft Corp. MSFT, +2.27% were set to report earnings and sales above analysts estimates immediately following the close of trading. Its shares fell 5.4%.

Read: Microsoft earnings: The quiet drive toward a $1 trillion market cap

What are other markets doing?

U.S. Treasury yields fell 4.2 basis points, to 3.122%, its lowest since Oct. 2, as investors fled equities.

The Shanghai Composite Index SHCOMP, -0.11% edged higher a day after falling 2.3%, while Shenzhen Composite Index 399106, -0.23% slipped again.

European stocks were modestly lower.

Gold prices US:GCZ8 settled lower, while oil futures US:CLX8 rallied. The U.S. Dollar Index DXY, +0.23% rose on concerns over growth in Europe and Asia.

—Mark DeCambre contributed to this article