The Dow Jones industrial average hit two historic milestones this quarter — 20,000 and 21,000, respectively. Nevertheless, its performance was more than doubled by the Nasdaq, which popped 9.8 percent versus the Dow’s 4.6-percent climb. The S&P 500 posted a 5.3-percent gain this quarter.

It was the best quarter for the tech-heavy Nasdaq since the fourth quarter of 2013 when it gained 10.7 percent.

Much of the Nasdaq’s hearty performance this quarter came courtesy of the so-called FANG stocks: Facebook, Amazon, Netflix, and Google (now known as Alphabet).

Facebook shares are up 24 percent year to date, while Amazon and Netflix are up 18.3 percent and 19.4 percent, respectively. Alphabet shares have added 7 percent.

FANG stocks jumped because “people wanted high exposure to names that tend to be more market-sensitive,” including those in the relatively volatile tech sector, said Bruce McCain, chief investment strategist at Key Private Bank.

He added that such stocks still show a “fair amount of growth.” Names like Apple, which is up 24 percent year to date, benefited from a pickup in consumer spending.

“The question is: How many of these good trends are repeatable in the future?” McCain said, noting that much of the market euphoria is “driven on [President Trump’s] proposals that may or may not happen.”

Indeed, the Nasdaq’s big quarter seemed unlikely when the broader market rally started in the days after the election. Financial and industrial stocks surged, boosting both the Dow and S&P, but the Nasdaq lagged.

Since January, the Nasdaq has recovered.

“Tech joined the euphoria following the election. That was bolstered by recognition that economic growth expectations were too high triggering a move toward growth stocks and away from cyclicals,” Bruce Bittles, chief investment strategist at Baird, told The Post.

The recent decline in the US dollar also helped tech stocks, as many are multinational companies and big exporters, Bittles said.