(Updates to close)
* Dow snaps five-day losing streak
* Merck shares up
* Indexes up: Dow 0.5 pct, S&P 0.3 pct, Nasdaq 0.3 pct
By Caroline Valetkevitch
NEW YORK, Jan 20 (Reuters) - U.S. stocks closed higher on Friday in a modest but broad-based advance as Donald Trump was sworn in as U.S. President, marking the first time in more than 50 years that a new commander-in-chief has been welcomed by a rising equity market on his first day in office.
In his speech, Trump said U.S. policy will be to buy American and hire American, reiterating what he had said many times during this campaign for the White House.
Some investors said the comments reinforced concerns about potential protectionist trade policies. Indexes pared gains during his speech and ended off the highest levels of the day.
The rally in stocks since the Nov. 8 election had stalled in recent weeks as investors awaited clarity on his plans to boost the economy.
"If you want to take the inaugural speech as a signal of anything, it's that trade remains at the top of the agenda and he's going to do something about it quickly," said Brad McMillan, chief investment officer for Commonwealth Financial in Waltham, Massachusetts.
Still, the S&P 500's 6.2-percent gain since the election is one of the best performances for the American stock market for any presidential transition period of the modern era.
Former President Barack Obama's transition period, which came amid the throes of the 2008 financial crisis, overlapped a 15.5 percent fall for the S&P 500 from his election to the day of his 2009 inauguration. Yet he presided over the second-best run for the stock market under any president since Republican Dwight Eisenhower.
The Dow Jones Industrial Average closed up 94.85 points, or 0.48 percent, to 19,827.25, the S&P 500 gained 7.62 points, or 0.3 percent, to 2,271.31 and the Nasdaq Composite added 15.25 points, or 0.28 percent, to 5,555.33.
The Dow snapped a five-session losing streak, but all three major indexes ended with losses for the week.
The S&P 500 has fallen by a median 2.7 percent in the month after each new president has taken the keys to the White House since Herbert Hoover in January 1929, according to a Reuters analysis.
Among the day's gainers, Merck rose 3.6 percent to $62.53 after Bristol-Myers said it would not seek accelerated U.S. approval for a combination of its two immunotherapy drugs as an initial treatment for lung cancer, giving Merck an advantage in the lucrative market. Bristol-Myers' stock fell 11.3 percent.
About 6.6 billion shares changed hands on U.S. exchanges, higher than the 6.1 billion daily average for the past 20 trading days, according to Thomson Reuters data.
Advancing issues outnumbered declining ones on the NYSE by a 1.76-to-1 ratio; on Nasdaq, a 1.58-to-1 ratio favored advancers.
The S&P 500 posted 19 new 52-week highs and seven new lows; the Nasdaq Composite recorded 85 new highs and 33 new lows.
Editing by Nick Zieminski and James Dalgleish