Materials companies led U.S. stocks modestly higher Friday, recouping much of the market’s loss from a day earlier and snapping a five-day losing streak for the Dow Jones industrial average.

Another crop of encouraging company earnings news also helped lift the market, but investors were mostly focused on events in Washington as Donald Trump was sworn in as president.

The major stock indexes pulled back slightly as Trump gave his inaugural address after taking the oath of office. Among topics of particular interest to Wall Street, the speech touched on trade and the Trump administration’s intention to protect the United States from “the ravages of other countries making our products, stealing our companies and destroying our jobs.”

“The market is still embracing the Trump agenda, based on the market’s reaction to the speech,” said Quincy Krosby, market strategist at Prudential Financial. “Now the question the market has is, specifically, what does all of that mean in terms of trade?”

The Dow rose 94.85 points, or 0.5 percent, to 19,827.25. The Standard & Poor’s 500 index gained 7.62 points, or 0.3 percent, to 2,271.31. The Nasdaq composite index added 15.25 points, or 0.3 percent, to 5,555.33.

Despite Friday’s gains, the three major stock indexes ended the week lower.

Stocks have slowed in 2017 after surging for several weeks following Election Day on investor optimism that a Trump administration and Republican Congress would usher in business-friendly policies. But the possibility of increased tariffs or trade restrictions has also loomed as a potential drag on profits for big U.S. companies.

“Historically, the market has performed best in the November-April time frame,” said Sam Stovall, chief investment strategist at CFRA Research. “The Trump victory added a tail wind to this traditional seasonal factor.”

Beyond the presidential transition in Washington, investors pored over the latest batch of corporate earnings Friday, bidding up shares in companies that reported results that beat Wall Street’s expectations.

Skyworks Solutions jumped 13 percent, to $88.67, the biggest gainer in the S&P 500.

Traders also drove up shares in Procter & Gamble after the consumer goods maker released a strong growth forecast. The stock grew 3.2 percent to $87.45.

Strong subscriber numbers helped lift AT&T, giving a boost to phone company stocks overall. AT&T shares rose 1.1 percent to $41.45.

Some companies’ earnings failed to impress the market.

General Electric slid 2.2 percent after the conglomerate reported fourth-quarter revenue that fell short of analysts’ forecasts.

Investors sold off Bristol-Myers Squibb after the drugmaker said it will not pursue accelerated regulatory approval for a two-drug lung cancer treatment. The stock was the biggest decliner in the S&P 500 index, shedding 11.3 percent.

Benchmark U.S. crude rose $1.05, or 2 percent, to close at $52.42 a barrel in New York.

In other energy trading, wholesale gasoline gained 3 cents to $1.57 a gallon, and heating oil rose 3 cents to $1.65 a gallon. Natural gas slid 16 cents, or 4.9 percent, to $3.20 per 1,000 cubic feet.

Bond prices were little changed. The yield on the 10-year Treasury note held steady at 2.47 percent. Yields have been rising as investors expect inflation to increase.