(Bloomberg) -- The New York Mets have the second-worst record in the National League, but investors in Citi Field bonds still have reason to cheer.

Moody’s Investors Service this week boosted the credit rating on $650 million of municipal bonds issued to build the 42,000-seat ballpark to Baa2 from Baa3, citing the stadium’s "resiliency through periods of variable team and economic performance" since it opened a decade ago. That’s left them two steps ahead of junk grade.

While the Mets may be in a free fall on the field, investors can still count on revenue from naming rights and sponsorship contracts, Moody’s said. A little more than one-third of stadium revenue comes from those sources, providing a relatively predictable cash flow.

And while the Mets’ team batting average is the second-worst in Major League Baseball after the Baltimore Orioles and its bullpen is prone to blowing leads, fans haven’t totally abandoned them. The Mets have the 13th-best home attendance, averaging 29,646 people per game, according to ESPN.com.

As Moody’s puts it, the team has a "core level of demand."

Meanwhile, the Yankees, the Mets’ cross-town rivals who are second in the American League East and have the third-best record in baseball, had the outlook on their stadium debt raised to stable from negative. Moody’s cited improving ticket sales and the "strength of the Yankees franchise." Moody’s rates $1.2 billion Yankee Stadium bonds Baa1, one level higher than Citi Field.

The rating on both clubs’ bonds benefit from non-relocation agreements that tie the teams to their stadiums and their location in the strongest and most affluent media market in the U.S.

To contact the reporter on this story: Martin Z. Braun in New York at mbraun6@bloomberg.net

To contact the editors responsible for this story: James Crombie at jcrombie8@bloomberg.net, Michael B. Marois, William Selway

©2018 Bloomberg L.P.