NEW YORK (Reuters) - Wall Street’s major stock indexes edged higher on Friday, as a surge in Nike Inc shares helped the quarter close out on an upswing while concerns over U.S. international trade relations ebbed.

For the quarter, the Dow, the S&P 500 and the Nasdaq all posted gains. The Dow edged up 0.7 percent, the S&P 500 rose 2.94 percent, and the tech-heavy Nasdaq jumped 6.33 percent. The small-cap Russell 2000, whose components are more domestically focused than their large-cap counterparts, climbed 7.4 percent.

Like the Russell, the S&P’s major sectors reflected some skittishness over trade. Energy had the biggest percentage gains for the quarter as oil prices jumped, and growth sectors such as technology and consumer discretionary stocks had solid gains. But real estate and utilities, considered defensive sectors, also advanced.

To view a graphic on S&P 500 sector performance in Q2, click: reut.rs/2IH23Do

On Friday, shares of Nike soared 13 percent to hit an all-time high of $81 after the world’s largest footwear maker reported a return to growth in North America in the last quarter and gave an upbeat forecast for the year.

Nike shares ended the day up 11.1 percent to $79.68, their biggest one-day gain in nearly four years. Nike was the top boost to the Dow and the S&P 500.

The S&P 500 bank sector index ended the day barely changed after earlier touching a one-week high. The Federal Reserve late on Thursday reported that U.S. lenders cleared the second part of the Fed’s annual stress tests, though the Fed placed conditions on some, restricting Goldman Sachs Group Inc and Morgan Stanley from increasing capital distributions.

Wells Fargo & Co was a bright spot, rising 3.4 percent.

Friday’s session reflected momentary relief from trade concerns that rattled the market earlier in the week, several investors said, though the major indexes pared gains in the last hour of trading.

FILE PHOTO: Traders work on the floor of the New York Stock Exchange (NYSE) in New York, U.S., June 28, 2018. REUTERS/Brendan McDermid

“There’s really not a lot of headlines going on,” said Ryan Detrick, senior market strategist for LPL Financial in Charlotte, North Carolina. “We’re having a late-week bounce back from earlier worries.”

Investors took in stride U.S. Commerce Department data that showed consumer spending slowing as the core personal consumption expenditures price index, a measure of inflation, hit the Federal Reserve’s 2 percent annual target for the first time in six years. On several occasions this year, worries of rising inflation and a subsequent economic slowdown have sent stocks tumbling.

“People are squaring away positions going into the month and the quarter’s end,” said Mark Luschini, chief investment strategist at Janney Montgomery Scott in Philadelphia.

The Dow Jones Industrial Average rose 55.36 points, or 0.23 percent, to 24,271.41, the S&P 500 gained 2.06 points, or 0.08 percent, to 2,718.37 and the Nasdaq Composite added 6.62 points, or 0.09 percent, to 7,510.30.

To view a graphic on Index performance in second quarter, click: reut.rs/2KyJinB

For the week, however, all three indexes registered losses. The Dow lost 1.26 percent, the S&P 500 fell 1.33 percent, and the Nasdaq shed 2.37 percent. The Dow declined for three straight weeks for the first time in more than two years.

For the month of June, the Dow lost 0.59 percent, while the S&P 500 rose 0.49 percent and the Nasdaq gained 0.92 percent.

On Friday, shares of Vertex Pharmaceuticals Inc jumped 15.2 percent, the most on the S&P 500, after rival Galapagos NV’s cystic fibrosis program reported disappointing trial data.

KB Home shares climbed 7.3 percent after the homebuilder’s second-quarter results beat Wall Street estimates. The strong results also boosted shares of other homebuilders, including D.R. Horton Inc and PulteGroup Inc.

Constellation Brands Inc fell 5.8 percent after the Corona beer maker’s quarterly profit and full-year earnings forecast missed analysts’ estimates.

Advancing issues outnumbered declining ones on the NYSE by a 1.51-to-1 ratio; on Nasdaq, a 1.19-to-1 ratio favored advancers.

The S&P 500 posted 10 new 52-week highs and two new lows; the Nasdaq Composite recorded 52 new highs and 67 new lows.

Volume on U.S. exchanges was 7.16 billion shares, compared to the 7.28 billion average over the last 20 trading days.