Stocks ended a wild week with solid gains, but not enough to prevent major indexes from logging their third weekly losses in a row and more in Friday’s Stock Market Update.

“Going forward, volatility will definitely pick up.”

Technology companies and banks did the most to pull the market higher Friday.

Traders picked up big tech names as they rediscovered their appetite for risk. Chipmaker Nvidia jumped 7.2% after reporting surprisingly good results for its latest quarter.

Utilities, which have been one of the safer havens for investors this month, lagged the market.

The absence of more discouraging news may have helped put investors in a buying mood Friday, said Rob Haworth, senior investment strategist at U.S. Bank Wealth Management. Haworth said there were signs investors were trying to “find the bottom in this market.”

The market’s swings have been largely driven by two factors: developments in the U.S.-China trade dispute and investors jumping into bonds as they seek a safe place to park money amid growing concerns about the global economy.

Investors have been mostly defensive throughout August following President Donald Trump’s escalation of his trade war with China. He threatened to impose more tariffs on Chinese goods earlier this month, which prompted China to allow its currency to weaken against the dollar in retaliation.

The government has since said it will delay the implementation of more than half of those new tariffs, but increased trade tensions were enough to dash hopes that a resolution would be found anytime soon. Investors are now digging in for an even more protracted trade war — and the volatility that may cause for the stock market.

“Going forward, volatility will definitely pick up,” said Gene Goldman, chief investment officer at Cetera Investment Management. “The caution going forward is the trade war, but we do believe the trade war will be resolved faster than the market thinks.”

Long-term bond yields climbed Friday. The yield on 10-year Treasury rose to 1.55% from 1.52% late Thursday. That helped lift banks because higher bond yields tend to push interest rates on loans higher, which means more profits for banks. JPMorgan Chase rose 2.4% and Bank of America added 2.9%.

The bounce for yields follows a weeklong slide that included a sharp drop on Wednesday that rang yet another alarm bell for the economy. The 10-year yield dropped below the yield on the two-year Treasury, a rare occurrence and one that has historically suggested a recession may be a year or two away.

Investors are hoping that the Federal Reserve will continue to cut interest rates in order to shore up economic growth. The central bank lowered interest rates by a quarter-point at its last meeting. It was the first time it lowered rates in a decade.

STOCK MARKET UPDATE

The S&P 500 rose 41 points, or 1.4%, to 2,888. The Dow Jones Industrial Average rose 306, or 1.2%, to 25,886. The Nasdaq rose 129 points, or 1.7%, to 7,895.

The Nasdaq is on track to lose 3.4% for August, but is still up 19% for the year.

Benchmark crude oil rose 41 cents to settle at $54.88 a barrel. Brent crude oil, the international standard, rose 44 cents to close at $58.67 a barrel. Wholesale gasoline rose 2 cents to $1.66 per gallon. Heating oil was unchanged at $1.81 per gallon. Natural gas fell 3 cents to $2.20 per 1,000 cubic feet.

Gold rose to $1,523.40 per ounce, silver fell 10 cents to $17.09 per ounce and copper was unchanged at $2.59 per pound.

© The Associated Press. All rights reserved.