Updated from 10:45 a.m. ET on Wednesday, July 12. 

Stocks rallied on Wednesday, July 12, as congressional testimony from Federal Reserve Chair Janet Yellen soothed fears of a central bank moving too fast. 

Watch:Who is Gary Cohn - Janet Yellen's Potential Replacement at the Federal Reserve?

The S&P 500 gained 0.63%, the Dow Jones Industrial Average rose 0.64%, and the Nasdaq added 0.8%. The Dow hit an intraday record, superseding the high set on July 5. 

In prepared testimony before Congress, Yellen reiterated that rate increases would be gradual. Like Fed Gov. Lael Brainard, Yellen does not expect rates will have to rise by too much to reach neutral.

"Because the neutral rate is currently quite low by historical standards, the federal funds rate would not have to rise all that much further to get to a neutral policy stance," Yellen wrote in prepared testimony. "The Committee continues to anticipate that the longer-run neutral level of the federal funds rate is likely to remain below levels that prevailed in previous decades."

Yellen made those comments during her semiannual testimony on monetary policy to the House Financial Services Committee. Yellen will next appear before the Senate Banking Committee on Thursday, July 13, at 10 a.m. ET.

Also in her testimony, Yellen said that the central bank will likely begin unwinding its $4.5 trillion balance sheet this year, while closely monitoring low-inflation trends. Yellen said she anticipates the balance sheet will be "appreciably below" current levels as the Fed unloads its bond portfolio, though likely still higher than levels before the 2008 financial collapse. 

On inflation, Yellen said recent weak inflation trends were tied to "a few unusual reductions in certain categories of prices" and that the Fed was "carefully monitoring" incoming data.

In an answer to a question on whether the Fed should allow inflation to move closer to its 2% target before making additional hikes, Yellen pointed to "temporary factors [that] appear to be at work," including lower cell phone plan and prescription drug prices. Yellen also said it was "premature to reach the judgment" that the economy was not heading toward 2% inflation over the next couple of years, particularly as the strength of the labor market feeds through into upward pressure on wages and prices. Again, Yellen reiterated that monetary policy was not on a preset course and would be adjusted if it appears an undershoot in inflation proved "persistent." 

Crude oil prices held higher after a sharp drop in weekly inventories data from the Energy Information Administration. U.S. crude stockpiles dropped by 7.6 million barrels in the past week, far steeper than an anticipated decline of 2.85 million. Gasoline stockpiles fell, while distillates rose. Crude inventories have declined for two weeks in a row.

The EIA reduced its price forecasts for West Texas Intermediate over the next two years in its monthly report out on Tuesday, July 11. The U.S. agency expects crude to end the year at $48.95 a barrel, 3.6% lower than its previous forecast in June.

West Texas Intermediate crude was up 2.2% to $46.04 a barrel on Wednesday.

The second-quarter earnings season kicks off at the end of the week with a number of notable reports from the banking sector. Citigroup Inc. (C) - Get Report , JPMorgan Chase & Co. (JPM) - Get Report , PNC Financial Services Group (PNC) - Get Report  and Wells Fargo & Co. (WFC) - Get Report are each set to disclose their quarterly financial performance on Friday morning.

Citigroup and Wells Fargo are holdings in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells C and WFC? Learn more now.

Overall, analysts anticipate another quarter of above-average strength. CFRA Research said it anticipates 6.2% year-over-year earnings growth among S&P 500 companies, better than a 1.7% earnings decline seen in the same quarter a year earlier. The energy sector is expected to lead the pack, recovering from weakness over the previous two years.

Twitter Inc. (TWTR) - Get Report   rose after naming Ned Segal its new chief financial officer, assuming the position from Anthony Noto, who will remain the social media company's operating chief. Segal last served as senior vice president of finance for Intuit Inc.'s small business group.

Prior to that, Segal spent nearly 17 years at Goldman Sachs Group Inc., where he worked as the head of global software banking.

Watch:Goldman Sachs Alumni Aren't Just in the Trump Administration - They're Everywhere

Fastenal Co. (FAST) - Get Report  was slightly higher after topping quarterly estimates on its top- and bottom-lines. Earnings of 52 cents a share exceeded expectations by 2 cents. Revenue surged 10.9% to $1.12 billion, coming in $10 million higher than estimates. 

American Airlines Group Inc. (AAL) - Get Report gained more than 2% after upping its second-quarter outlook on increased passenger yields. Total revenue per available seat mile is expected to climb by 5% to 6% from the same quarter a year earlier. The company had previously forecast an increase of 3.5% to 5.5%. 

NVIDIA Corp. (NVDA) - Get Report increased after SunTrust Robinson Humphrey upgraded its rating to buy from hold and set a $177 price target. Analysts anticipate upside to revenue and earnings over the next year. The firm increased its fiscal 2018 earnings guidance. 

PayPal Holdings Inc.  (PYPL) - Get Report  climbed more than 3% after it announced that customers in Canada and Mexico can start paying for Apple's (AAPL) - Get Report App Store, Apple Music, iTunes and iBooks purchases across Apple devices using their PayPal account. The online payments platform will roll out the service to the U.S. and other countries shortly.

More of What's Trending on TheStreet

Eat, Drink and Talk Money with Jim Cramer

Meet Jim Cramer at an exclusive reception at his Bar San Miguel in Brooklyn, N.Y., on Tuesday, July 25, from 6:30 p.m. To 9 p.m.

The evening will start with a screening of Jim's CNBC show Mad Money. Afterwards, Jim will join the party fresh off of the CNBC set to mingle, take photos and answer your investing questions.

Tickets include dinner, drinks and an autographed copy of Jim's book Get Rich Carefully.

Click here for more information or to buy tickets.

Where: Bar San Miguel, 307 Smith St., Brooklyn, N.Y.

When: Tuesday, July 25, 6:30 p.m. to 9 p.m.