Stocks edged higher Friday as technology companies and banks rose.

The Standard & Poor’s 500 index closed above 2,500 for the first time as stocks had one of their best weeks this year.

advertisement | advertise on newsday

Stocks wobbled in early trading after the Commerce Department said retail sales slipped in August and the Federal Reserve said industrial production dropped last month, mostly because of Hurricane Harvey. But big names like Apple and Boeing took the market higher.

Stocks made big gains Monday and as Hurricane Irma weakened, and they didn’t do too much after that, but still wound up with their biggest weekly gain since the beginning of January.

Rick Rieder, the chief investment officer for BlackRock’s global fixed income business, said retail sales and inflation have been weak because technological changes keep reducing the prices of clothes, food, travel, and phone plans. Rieder said those price declines keep people buying — even though the same technological changes can also lower people’s wages.

“The price is coming down so quickly that it’s helping demand,” he said.

The Standard & Poor’s 500 index gained 4.61 points, or 0.2 percent, to a record 2,500.23. The Dow Jones industrial average rose 64.86 points, or 0.3 percent, to 22,268.34, its fourth record close in a row. The Nasdaq composite added 19.38 points, or 0.3 percent, to 6,448.47.