Animal spirits have abounded in capital markets this year, and Wall Street financial behemoths are raking in the cash. Whether it was Snap's much-ballyhooed initial public offering, Johnson & Johnson's blockbuster bid for Actelion, or Microsoft's mammoth bond issue, there has been a feverish climate for deals of various stripes. In all, investment banks raked in $9.7 billion of revenue during the first quarter, according to data from financial analytics firm Dealogic. The total represented a 32 percent gain from the same period a year ago, thanks to record-setting activities across a number of markets and debt issuance. The activity also represents some hard data showing that enthusiasm for President Donald Trump's agenda is turning into actual economic activity. Records of various sorts were set in mergers and acquisitions, IPOs and debt issuance. "The political cycle and the two candidates that were running for president caused a real logjam in this kind of activity for a good part of 2016," said Sean Snaith, director of the University of Central Florida's Institute for Economic Competitiveness. "Everyone was on the sideline," he added. "Then you get an unexpected outcome from the election and that sort of animal spirits was the dynamite that opened up that logjam and you see this money flooding into the capital markets."

The bank bonanza

In the broad category of equity capital markets that includes various dealmaking activities, volume surged 52.8 percent in the first quarter from the same period in 2016, Dealogic reported. Investment-grade debt hit a record high of $413.1 billion, U.S. loan volume of $607 billion and refinancing of $439.4 billion both set first-quarter standards, and leveraged finance had its best quarter ever with $379.1 billion of deals. For banks, it added up to a bonanza. In addition to the jump in U.S. revenue, global investment banks took in $19.6 billion, a 20 percent annualized increase. Those are solid numbers that will help offset some of the tough sledding the banks have seen on the equity side as volumes have declined. "The bond market side of the house has been performing very well for the past several years," said Christopher Whalen, head of Whalen Global Advisors. "In a sense that isn't surprising. It's good news, but the bond market is much less profitable per dollar of transaction volume than the equity side of the house."

In this 2017 file photo, President Donald Trump stands next to Jamie Dimon, chief executive officer of JPMorgan Chase & Co., left, in the State Dining Room of the White House in Washington. Andrew Harrer | Bloomberg | Getty Images

Among individual banks, JPMorgan Chase again was the biggest beneficiary of the spike in activity. The largest U.S. bank by assets generated $1.04 billion in revenue in the U.S. and $1.67 billion globally to again lead its competitors.

The numbers should help with what is expected to be a solid quarter for bank earnings. As a group, financials are projected to show 14.8 percent profit growth for the first quarter, coming off a year when the sector dropped 0.2 percent, according to FactSet. However, Whalen cautioned investors not to get too caught up in the revenue boost, particularly regarding debt-driven deals. "You can't feed a lot of mouths with those volumes," he said.

It's the economy