Companies that do well when the economy is improving led the market higher Tuesday after several of them notched strong earnings.

Coach, a maker of luxury handbags, and Netflix, which streams TV shows and movies over the Internet, were big winners after reporting profits that impressed investors. Financial stocks rose after Travelers’ earnings beat analysts’ expectations.

That’s a change from earlier this year. The stock market’s surge in 2013 has been led by so-called defensive industries such as health care, consumer staples and utilities. Investors buy those stocks when they want reliable earnings and regular dividends. Until now, they have been unsure about the strength of the economic recovery and been less enthusiastic about stocks whose fortunes are more closely tied to swings in the U.S. economy.

“For a change we are actually seeing more cyclical parts of the economy lead the market,” said Michael Sheldon, chief market strategist at RDM Financial Group.

The Dow Jones industrial average and the Standard & Poor’s 500 index both rose 1 percent.

The markets closed higher even after stocks and other markets were shaken in the early afternoon when a fake tweet on the AP’s Twitter account prompted a sudden sell-off.

A posting saying that there had been explosions at the White House and that President Obama had been injured was sent at 1:08 p.m. The Dow immediately plunged about 143 points, from 14,697 to 14,554. The AP said its Twitter account had been hacked and the posting was fake.

Within five minutes the Dow had snapped back.

AP spokesman Paul Colford said the news cooperative is working with Twitter to investigate the issue. The AP has disabled its other Twitter accounts following the attack, Colford added.

A resurgence in corporate profits after the Great Recession has been one of the drivers that pushed the Dow up 12 percent and the S&P 500 up 11 percent this year. However investors remain unsure how much further earnings can improve without the outlook for growth in the global economy improving as well.