By Anna Hirtenstein and Alexander Osipovich

U.S. stocks climbed as Janet Yellen endorsed higher coronavirus relief spending and some of the country's biggest banks beat expectations for fourth-quarter earnings.

The Dow Jones Industrial Average rose 116.26 points, or 0.4%, to 30930.52. The S&P 500 advanced 30.66 points, or 0.8%, to 3798.91. The technology-heavy Nasdaq Composite jumped 198.68 points, or 1.5%, to 13197.18.

The gains marked an upbeat start to the week, following a long holiday weekend with markets closed on Monday, after all three indexes fell last week. The Dow, S&P 500 and Nasdaq are all within 1% of record highs set earlier this month.

Ms. Yellen backed major fiscal stimulus to help workers and businesses battered by the coronavirus pandemic as she testified before the Senate Finance Committee, which will vote on her nomination for Treasury secretary. In prepared remarks, she said the U.S. risks a longer, more painful recession unless Congress approves more aid, and encouraged lawmakers to "act big" to shore up the recovery.

President-elect Joe Biden unveiled a plan for a $1.9 trillion fiscal stimulus package last week, which would include direct payments of $1,400 to most households and spending on vaccine distribution. Passing it through Congress is one of the first major tests for the incoming leader, who will be inaugurated Wednesday.

Ms. Yellen will be the "holder of the keys of unprecedented spending," said Ludovic Subran, chief economist at Allianz. "It will be reassuring for people to see she's very pragmatic in the way that she addresses the crisis, similarly to how she was in her role at the Fed."

The S&P 500 is up nearly 13% since Nov. 3, putting the index on track for its best performance from Election Day to Inauguration Day since Herbert Hoover's election victory in 1928, and its best-ever performance during that stretch for a Democrat. Upbeat news on the effectiveness of new Covid-19 vaccines played a major role in those gains.

Earnings season kicked into high gear. Bank of America shares slipped 24 cents, or 0.7%, to $32.77 after the bank reported a 22% profit decline in the fourth quarter, but still came ahead of analysts' forecasts.

Goldman Sachs slumped $6.81, or 2.3%, to $294.20 despite releasing earnings that significantly beat expectations.

Major banks' earnings suggest they are "seeing the economy stabilize; their worst-case scenarios haven't been met," said Shaniel Ramjee, a multiasset fund manager at Pictet Asset Management. "Even if the virus is still with us, banks are seeing an uplift in the economy."

Investors are keeping a close eye on the rollout of Covid-19 vaccines, which has hit early snags as the U.S. has struggled to deliver limited supplies of the inoculations to the most vulnerable segments of the population. A vast swath of the country must be vaccinated before the economy can return to pre-pandemic levels of activity, particularly in the travel and leisure sectors.

"That normalization date keeps getting pushed out with the various logistical challenges of rolling out the vaccines," said Ben Kirby, co-head of investments at Thornburg Investment Management.

Eight of the S&P 500's 11 sectors were up on Tuesday. Energy stocks posted the biggest gains, boosted by rising oil prices. Futures on Brent crude, the global oil benchmark, gained 2.1% to settle at $55.90 a barrel on hopes that stimulus and vaccinations will boost energy demand.

General Motors stock rallied $4.87, or 9.7%, to a new high of $54.84 after its driverless-car startup, Cruise, said it had entered into a partnership with Microsoft. The technology giant is also joining a group of companies set to invest more than $2 billion in Cruise.

Shares of big tech and social-media companies climbed, after faltering last week. Facebook shares rose $9.74, or 3.9%, to $261.10. Twitter added 75 cents, or 1.7%, to $45.93.

"There's a 'buy the dip' mentality," said Sebastien Galy, a macro strategist at Nordea Asset Management. "Cynicism doesn't last long. It shows that equities can still rally significantly more."

In other corporate news, shares of laser maker Coherent surged $45.06, or 30%, to $197.01 after it agreed to be acquired by Lumentum, a computer components firm. Lumentum stock fell $11.72, or 11%, to $94.60.

Overseas, the pan-continental Stoxx Europe 600 declined 0.2%. Jeep-owner Stellantis, the recently combined business of Fiat Chrysler and PSA Group, gained 2.6%, extending Monday's pop after it made its debut on French and Italian exchanges.

In Asia, most major benchmarks rose. Hong Kong's Hang Seng Index advanced 2.7% and Japan's Nikkei 225 index added 1.4%, led by shares of tech and car companies. The Shanghai Composite Index slipped 0.8%.

In U.S. bond markets, the yield on the benchmark 10-year Treasury note slipped to 1.092% from 1.097% Friday, with the market closed Monday for Martin Luther King Jr. Day.

Write to Anna Hirtenstein at anna.hirtenstein@wsj.com and Alexander Osipovich at alexander.osipovich@dowjones.com

(END) Dow Jones Newswires

01-19-21 1646ET