Stocks rallied across the board in Monday afternoon trading, with railroad stocks leading the way in the transportation sector.

Shares of all six publicly-traded standalone Class I railroads that operate in the United States were higher, with shares of Kansas City Southern KSU making the biggest jump. Shares of the smallest Class 1 railroad by miles of track were up roughly 4.2% to $91.67.

Railroads are accorded Class 1 status by the United States Department of Transportation if they bring in annual revenue of $250 million or more in 1991 dollars (roughly $443.7 million in 2016 dollars).

The dominant freight carriers on the east coast, CSX Corp ( (CSX - Get Report) ) and Norfolk Southern ( (NSC - Get Report) ), were higher by roughly 3.2% and 2.5%, respectively.

Union Pacific ( (UNP - Get Report) ), a major west coast carrier, was up roughly 2%. Its primary competitor, BNSF, is wholly owned by Warren Buffett's Berkshire Hathaway ( (BRK.A - Get Report) ). Class A and B shares of Berkshire Hathaway were both up by roughly 2.5%.

Canada's two major freight railways with U.S. operations were also surging. The Canadian National Railway ( (CNI - Get Report) ) was up roughly 2.5%, while the Canadian Pacific Railway ( (CP - Get Report) ) was up roughly 3.7%.

The fates of railroad stocks are largely tied to those of their largest clients, energy companies, so it's no surprise that the momentum from Monday's oil and gas stock gains has carried over in light of the FBI's Sunday decision to again close its investigation into Democratic presidential candidate Hillary Clinton.

The announcement has had a demonstrably calming effect on the U.S. stock market that had seen volatility spike and stocks swoon for more than a week spiked and stocks slid after the FBI said late last month that it was again looking into Clinton over her use of a private email server while in office as Secretary of State and Republican candidate Donald Trump slightly narrowed his deficit in national polling.

For better or for worse, Clinton is generally regarded as the "status quo" candidate and investors may be delighted to see anything even vaguely resembling stability in a railroad space that has been hit hard by the global drop in commodity prices.