Early this month, when the annual king tide swept ocean water into the streets of Miami, the city’s Republican mayor, Tomás Regalado, used the occasion to stump for a vote. He’d like Miami residents to pass the “Miami Forever” bond issue, a $400-million property tax increase to fund seawalls and drainage pumps (they’ll vote on it on Election Day). “We cannot control nature,” Regalado says in a recent television ad, “but we can prepare the city.”

Miami is considered among the most exposed big cities in the U.S. to climate change. One study predicts the region could lose 2.5 million residents to climate migration by the end of the century. As on much of the Eastern Seaboard, the flooding is no longer hypothetical. Low-lying properties already get submerged during the year’s highest tides. So-called “nuisance flooding” has surged 400 percent since 2006.

Business leaders are excited about the timing of the vote in part because Miami currently has its best credit ratings in 30 years, meaning that the city can borrow money at low rates.* Amid the dire predictions and the full moon floods, that rating is a bulwark. It signifies that the financial industry doesn’t think sea level rise and storm risk will prevent Miami from paying off its debts. In December, a report issued by President Obama’s budget office outlined a potential virtuous cycle: Borrow money to build seawalls and the like while your credit is good, and your credit will still be good when you need to borrow in the future.

The alternative: Flood-prone jurisdictions go into the financial tailspin we recognize from cities like Detroit, unable to borrow enough to protect the assets whose declining value makes it harder to borrow.

The long ribbon of vulnerable coastal homes from Brownsville to Acadia has managed to stave off that cycle in part thanks to a familiar, federally backed consensus between homebuyers and politicians. Homebuyers continue to place high values on homes, even when they’ve suffered repeated flood damage. That’s because the federal government is generous with disaster aid and its subsidy of the National Flood Insurance Program, which helps coastal homeowners buy new washing machines when theirs get wrecked. Banks require coastal homeowners with FHA-backed mortgages to purchase flood insurance, and in turn, coastal homes are rebuilt again and again and again—even when it might no longer be prudent.

But there’s another element that helps cement the bargain: investors’ confidence that coastal towns will pay back the money they borrow. Homebuyers are irrational. Politicians are self-interested. But lenders—and the ratings agencies that help direct their investments—ought to have a more clinical view. Evaluating long-term risk is exactly their business model. If they thought environmental conditions threatened investments, they would sound the alarm—or just vote with their wallets. They’ve done it before—cities like New Orleans, Galveston, Texas, and Seaside Heights, New Jersey were all downgraded by rating agencies after damage from Hurricanes Katrina, Ike, and Sandy. But all have since rebounded. There does not appear to be a single jurisdiction in the United States that has suffered a credit downgrade related to sea level rise or storm risk. Yet.

* * *

To understand why, it helps to look at communities like Seaside Heights, the boardwalk enclave along the Jersey Shore whose marooned roller coaster provided the definitive image of the 2012 storm.

Seaside Heights was given an A3 rating from Moody’s in 2013, meaning “low credit risk.”* Ocean County, New Jersey—the county in which Seaside Heights sits—has a AAA rating. In the summer of 2016, before Ocean County sold $31 million in 20-year bonds, neither Moody’s Investor Services nor S&P Global Ratings asked about how climate change might affect its finances, the county’s negotiator told Bloomberg this summer. “It didn’t come up, which says to me they’re not concerned about it.”

The credit rating agencies would deny that characterization—to a point. They do know about sea level rise. They just don’t think it matters yet. In 2015, analysts from Fitch concluded, “sea level rise has not played a material role” in assessing creditworthiness, despite “real threats.” Hurricane Sandy had no discernible effect on the median home prices in Monmouth, Ocean, and Atlantic Counties, which make up New Jersey’s Atlantic Coast. The effect on tourism spending was also negligible.

“We take a lot from history, and historically what’s happened is that these places are desirable to be in,” explains Amy Laskey, a managing director at Fitch Ratings. “People continue to want to be there and will rebuild properties, usually with significant help from federal and state governments, so we haven’t felt it affects the credit of the places we rate.”

There are three reasons for that. The first is that disasters tend to be good for credit, thanks to cash infusions from FEMA’s generous Disaster Relief Fund. “The tax base of New Orleans now is about twice what it was prior to Katrina,” Laskey says, despite a population that remains 60,000 persons shy of its 2005 peak. “Longer term what tends to happen is there’s rebuilding, a tremendous influx of funds from the federal and state governments and private insurers.” Local Home Depots are busy. Rental apartments fill up with construction workers. Contractors have to schedule work months in advance. Look at Homestead, Florida, Laskey advised, a sprawling city south of Miami that was nearly destroyed by Hurricane Andrew. Today it is bigger than ever. “If there was going to be a place that wasn’t going to come back, that would have been it.”

What emerges from the destruction, for the most part, are communities full of properties that are more valuable than they were before, because they’re both newer and better prepared for the next storm. Or as a Moody’s report on environmental risk puts it, “generally disasters have been positive for state finances.” But this is entirely dependent on federal largesse: After Massachusetts brutal winter of 2015, FEMA granted only a quarter of the state’s request for aid. Moody’s determined that could negatively impact the credit ratings of local governments that had to shoulder the cost of snow and ice removal.

Second is that people still want to live on the shore. “The amenity value of the beach is something you can enjoy every day of the summer,” says Robert Muir-Wood, the chief research officer at Risk Management Solutions. “People may say, ‘The benefits of living on the beach to my health and wellbeing outweigh the impact of the flood.’” That calculus is strongly influenced by affordable flood insurance policies, but it has not changed. In a way, despite the risks, the sea is a more dependable economic engine for a community than, say, a factory that could shut its doors and move away any minute.

Most bonds get paid off from property taxes. If property values remain high, bondholders have little to worry about. If, on the other hand, property values fall, tax rates must rise. If buildings go into foreclosure, or neighborhoods undergo “buy-outs” to restore wetlands or dunes, more of the burden to pay off that new seawall falls on everyone else.

Third: Most jurisdictions are large. New Jersey’s coastal counties also contain thousands of inland homes whose risk exposure is much, much lower. Adam Stern, a co-head of research at Boston’s Breckinridge Capital Advisors, argues that the first credit problems will come for small communities devastated by major storms.

Still, Stern said, his firm looks at these issues. “One of the things we try to get at when we look at an issuer of bonds that’s on the coast: Do you take climate change seriously? Are you planning for that?” Still, he said, bond buyers—like everyone else—discount the value of future money, and hence future risk. When could the breaking point for the muni market come? Stern predicts that will happen when property values start to discernibly change in reaction to climate risk. It’s a game of chicken between infrastructure investors and homeowners.

“I think we’re in territory that’s changing right now,” says John Miller, an engineer studying climate change and credit risks at Wharton’s Risk Center. He pointed to Sea Bright, a barrier-island borough of New Jersey just south of New York Harbor. A municipal analysis concluded that by 2050, one in five of the borough’s parcels will be underwater—amounting to 17 percent of the total value of all Sea Bright real estate. Under 2050 SLR predictions, a 100-year flood would put 99 percent of parcels underwater. That year, 2050, is just beyond the 30-year frame used to sell both homes and bonds.

Generally, though, if you are looking for financial markets to start enforcing the risks of climate change, don’t look at towns on the rebound. Those places—whether they’re building seawalls or simply enforcing building codes on reconstructed properties—are better prepared. “The places you’re going to see the biggest disasters,” Muir-Wood predicts, “are the ones that haven’t been hit.”

*Correction, Oct. 31, 2017: This piece originally misstated that Miami has a double-A bond rating. The city’s credit rating varies between agencies and types of debt: Moody’s rating for the city of Miami, for example, is A1 for tax-backed debt and A2 for revenue-backed debt. (Return.) The piece also misstated the firm’s rating of Seaside Heights, which was A3, not AAA—“low credit risk” rather than “minimal credit risk.” (Return.)