Stocks were mixed at midday Friday after four straight days of strong gains in a week that saw the Dow surge to a record high as investors' fears about Donald Trump’s upset election win gave way to hopes the president-elect's policies could boost the economy.

Heading in to Friday's trading session, the Dow has gained more than 900 points, or 5.1%, for the week and closed at a record high of 18,807.88. It blasted past its previous record close of 18,636.05, notched in mid-August. The S&P 500 index has gained 3.9% for the week and stood just 23 points shy of its record close. The Nasdaq has a weekly gain of 3.2%.

In Friday trading, stocks cut early losses and were mixed. The Dow Jones industrial average was flat after being down as much 70 points earlier. The Standard & Poor's 500 index was down 0.2% but the tech-heavy Nasdaq moved into positive territory and rose 0.3%.

In a volatile week, investors initially boosted stocks on the conventional wisdom that Democratic presidential nominee Hillary Clinton would win the election. But as election results came in on Tuesday and it became clear Republican nominee Donald Trump was winning, stocks plunged overnight with Dow futures tumbling almost 800 points, on fears of what an unknown Trump presidency would bring.

But investors quickly shook off fears about a Trump presidency and focused on some of the policy changes that might be beneficial to financial markets, including tax cuts, a crackdown on regulation and infrastructure spending. The Dow ended up posting two straight days of 200-plus gains close and smashed through its previous record close Thursday.

"The reversals off the Tuesday night, Wednesday morning lows have been nothing short of impressive," said Chris Verrone, partner at Strategas Research Partners, in an analysis for investors. "As far as we're concerned is we continue to view any near-term consolidation or any near-term weakness as buyable at this point. We think this is very impressive acceleration off these levels.”

But some analysts were still cautious since there were very few details on what a Trump administration will do.

Trump's election ushers in an incalculable "risk premium," Bespoke Investment Group said Friday in a research note. But "longer-term, any increase in risk premium is offset by the impact of easier fiscal policy and the possibility of large corporate income tax cuts or a corporate tax holiday for overseas profits. That would be consistent with the historical ability of the president’s policies to impact equity markets; longer-term, other factors matter more than who controls the White House."

Investors pulled out of Treasuries this week, sending bond yields higher. The yield on the 10-year Treasury note jumped to 2.14% Thursday, up from 1.77% last Friday. Bond trading was closed Friday for the Veterans’ Day hooiday.

Benchmark U.S. crude fell 2.7% to $43.46 a barrel in New York.

Global stocks were mixed Friday. France’s CAC 40 was down 0.9%, while Germany’s DAX was up 0.4%. Britain’s FTSE 100 slid 1.4%.

Hong Kong’s Hang Seng index dropped 1.4% to and Japan’s benchmark Nikkei 225 gained 0.2%. The Shanghai Composite rose 0.8%.