U.S. stocks closed higher Wednesday, with the Dow ending at a record high for the seventh day in a row as better-than-expected earnings boosted optimism on Wall Street.
The Dow Jones industrial average extended gains for nine consecutive days for the first time since 2013, with Microsoft contributing most to the upside.
The S&P 500 closed at a new record level, led by technology which had its best day in 16 years. The Nasdaq composite had its highest close of the year, helped by a 2 percent gain in biotech.
"We're seeing a strong rotation out of the previous winners," said Paul Schatz, president and chief investment officer at Heritage Capital. "The defensive trade is definitely off."
Defensive sectors like consumer staples and utilities were the biggest laggards on the S&P Wednesday.
"You're seeing healthier leadership with semis, tech, and biotech that can fuel the market another leg higher," Schatz said.
Bank results continued to surprise Wednesday, with Morgan Stanley reporting earnings of 75 cents per share versus consensus expectations of 59 cents, according to Thomson Reuters. Morgan Stanley joined Goldman Sachs, Citigroup, JPMorgan Chase, and Bank of America on the list of U.S. financial institutions topping second-quarter profit forecasts.
"This suggests the big banks have been managing global uncertainty pretty well," said Jack Ablin, chief investment officer at BMO Private Bank. "Investors are celebrating Microsoft and Morgan Stanley, which are part of the enthusiasm."
The Dow hit a new intraday high Wednesday led by Microsoft, which beat on earnings and revenue as its cloud product Azure saw revenue growth of 102 percent.
Sixty four percent of S&P 500 companies that had reported as of Tuesday morning topped earnings estimates, according to Thomson Reuters, compared to a long-term average of 63 percent over the past 22 years.
"Investors are playing the 'no-alternative' card, which means since earnings are not terribly disappointing, the rally continues," said Peter Cardillo, chief market economist at First Standard Financial.
The U.S. dollar hit a four-month high as Fed rate hike talk picks up and economic data continues to strengthen.
U.S. housing starts rose more than expected in June, and Fed funds futures rates showed an uptick in rate hike expectations. According to the CME Group's FedWatch tool, the rates show investors see a roughly 40 percent chance the Fed will hike rates by its December meeting, compared with less than 20 percent a few weeks ago.
"I think it's a combination of data, and it's a safe haven because the geopolitical situation in Turkey certainly is not over," Cardillo said. "People are just being cautious."
Markets awaited an announcement in Turkey for emergency measures in the aftermath of a failed military coup. The MSCI Turkey ETF fell more than 2.5 percent.
"Political risk is always a factor when investing in emerging markets, the events in Turkey highlight this," said William Scholes, investment manager at Aberdeen Asset Management. "Companies in the country are among some of the best in emerging markets, despite the political environment."
Roughly 50,000 military officers, police, and other Turkish citizens were suspended from work or detained since the military coup in the country, which borders Syria and is a Western ally against Islamic State, Reuters reported.
Sterling moved higher after the Bank of England released its report on economic impact from last month's Brexit vote. The report showed no clear evidence of slowing economic activity, with signs that demand for credit was easing and companies did not expect any near-term impact on capital spending, according to Reuters.
"Anything that says Brexit won't have a significant negative impact, or that it will be contained to the U.K., is a positive for U.S. stocks," said Kate Warne, investment strategist at Edward Jones. "U.S. stock are taking their cues from the European market in response."
The British pound traded at $1.32 against the dollar. China's yuan rose as the People's Bank of China strengthened its reference rate, which limits moves in the currency. The euro traded at $1.10, and earlier hit its lowest level against the dollar since June 27.
U.S. crude oil inventories fell by 2.3 million barrels for the ninth consecutive decline in stockpiles, according to weekly EIA data released Wednesday.
Oil prices turned positive after hitting a two-month low earlier in the session. WTI crude futures settled up 29 cents at $44.94 a barrel after it fell to the lowest level since May 10. Brent Crude traded near $47, up more than 1 percent.
"The report was more positive than expected but the overall outlook will depend on production around the world, as well as how strong demand stays," Edward Jones's Warne said.
Yields on U.S. sovereign bonds went higher with expectations of a rate hike. The U.S. 2-year note rose to yield 0.71 percent. The 10-year yield increased to 1.58 percent, while the U.S. 30-year note yielded 2.30 percent.
Gold settled at $1,313 per ounce, down 1.4 percent. Intraday, gold hit its lowest level since June 28. The VanEck Vectors Gold Miners ETF ended the day down 6.25 percent.
The Dow Jones Industrial Average closed at 18,595.03, up 0.19 percent, with Microsoft the biggest gainer and Walt Disney Company the biggest laggard.
The closed 9.24 points higher at 2,173.02. Technology led the S&P sectors, and hit a new 16-year high back to 2000. Microsoft closed 5.3 percent higher, within 1 cent of a new 52-week high. Industrials hit a new all-time high and consumer staples led four S&P sectors lower.
The Nasdaq closed more than 53.56 points higher, or 1.06 percent, helped by biotech. This was the index's highest close of the year at 5,089.93.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded near 11.72. The VIX hit its lowest level in nearly a year, back to August of 2015.
Advancers led decliners on the New York Stock Exchange, with an exchange volume of 737.45 million and a composite volume of 3.15 billion. Monday and Tuesday were the second and third lightest volume days of the year.
On tap this week:
*Planner subject to change.
8:30 a.m. Jobless Claims
8:30 a.m Philly Fed Business Outlook Survey
8:30 a.m Chicago Fed Nat'l Activity Index
9:00 a.m FHFA Home Price Index
10:00 a.m Existing Home Sales
10:00 a.m Leading Indicators
10:30 a.m. Natural Gas Inventories
4:30 p.m. Fed Balance Sheet
Earnings before the bell: Biogen, Daimler, General Motors, Roche Holdings, Travelers, Unilever, Union Pacific, Bank of NY Mellon, BB&T, Blackstone, Domino's Pizza, DR Horton, PulteGroup
Earnings after the bell: AT&T, Paypal, Schlumberger, Starbucks, Visa, Capital One, Chipotle Mexican Grill, E-Trade, Advanced Micro, Boston Beer, Pandora Media
9:45 PMI Mfg Index Flash
1:00 p.m. Oil Rig Count
Earnings before the bell: BTB: General Electric, Honeywell, American Airlines, Moody's, Stanley Black & Decker