Because securitization involves taking a discounted lump-sum payment upfront in return for future tobacco payments, such deals by definition meant counties would receive less settlement money than they would if they collected year-by-year. This concept is known as the “time value of money” and it basically reflects the fact that a dollar received today is worth more than a dollar tomorrow because it can be invested to earn interest.

However, the amount of the discount was not just a factor of time. It also reflected much interest investors demanded to be paid in return for buying bonds payable from counties’ annual settlement money; after all, if payments fell, there might not be enough money to repay the debt. As noted in research by Craig Johnson, associate professor of public finance at Indiana University in Bloomington, the decision to securitize led many governments to “pay a high premium” to investors willing to take on this risk.

The size of the premium is reflected in the dollar difference between the cumulative payments counties could have received if they collected year-by-year and what they ended up getting under their securitization deals. The bigger the gap, the more likely it is that the county overestimated the riskiness of the annual payments and paid too much interest to investors on its upfront borrowing against the settlement money. The smaller the gap, the more likely it is that the county priced the risk correctly and received more money for taxpayers out of the securitization.

Here is how the app came together:

We obtained historical tobacco settlement payment data from the New York Attorney General’s Office, which tracks the annual payments from tobacco companies to the state, New York City (which comprises five counties), and the remaining 57 counties that receive the money. The data includes the actual payment received by each county through 2014 and closely matches national-level data tracked by the National Association of Attorneys General.

ProPublica projected future payments to the counties using a cash flow model disclosed in a bond prospectus for the most recent tobacco securitization completed in New York state, Niagara County’s $44.3 million tobacco bond sale, which closed on Sept. 24, 2014. The model projected annual payments due to New York through 2040, taking into account inflation and other adjustments, such as an assumed average annual cigarette consumption decline of 3 percent as forecast by the consulting firm IHS Global Insight.

These underwriting assumptions could prove wrong: In the past, cigarette consumption — a major driver of the annual tobacco settlement payments — has decreased more than predicted by IHS for various tobacco bond deals, many of which are now headed for default. To account for this, our app allows users to explore the effect of more pessimistic average annual cigarette consumption declines of 4 percent and 5 percent, based on projections by Herbert J. Sims & Co., a brokerage firm that tracks tobacco bonds. To account for the time value of future payments, the app also allows users to dial in a discount factor, which reflects the interest rate at which the money could be invested over time. The higher the interest rate, the less counties’ future payments are worth today. Users can select from a range of 0 to 8 percent annual interest.

Since securitization proceeds were most commonly used to fund capital projects that would otherwise have to be funded using municipal debt, the discount rate also reflects the opportunity cost to governments of accepting the annual payments, instead of securitizing them. The discount rate defaults to 4 percent, which reflects the 30-year interest rate for municipal borrowing by BAA-rated government issuers as of early October 2014, based data from the Thomson Reuters Municipal Market Monitor.

We identified the 40 New York counties (including five in New York City) that securitized using data from Thomson Reuters, the Municipal Securities Rulemaking Board’s EMMA database, and interviews with county officials. Proceeds received from the tobacco bonds they sold were plotted using amounts disclosed in official statements for each transaction. In cases of partial refundings — transactions which used a portion of the money raised to repay previously-issued bonds — ProPublica only counted the net new proceeds obtained by the counties. The amounts are a conservative estimate of what the counties received, since they not do account for transaction fees and other deductions from the proceeds, such as funding reserve accounts for bond investors.

Most counties securitized 100 percent of their annual payments. That means all their future tobacco money was pledged to investors until the bonds are repaid. In cases where counties securitized less than 100 percent of their payments, ProPublica added the remainder to the counties’ cumulative receipts.

The bond issuers typically used “residual” structures in early securitization deals done in 1999, 2000 and 2001. These entitled them to receive any settlement money left after meeting required annual principal and interest payments on their outstanding tobacco bonds. Most of these residual payments ceased in 2004; ProPublica excluded residual payments from its analysis. In later securitizations, counties primarily utilized “turbo” structures, which reserved any leftover settlement money for repayment of the debt, rather than letting county governments keep it. That way, debt repayment would accelerate, returning the payment streams to the county governments sooner.

ProPublica did not attempt to predict when the counties’ tobacco bonds might get paid off. But given that cigarette sales are falling more than expected when most of the deals were done, many of the counties’ tobacco bonds are now unlikely to repay ahead of their final maturities, even under “turbo” structures. While maturity dates vary, all of the counties have at least some tobacco bonds that aren’t due until after 2040, the last year in the cash flow model disclosed in recent securitization done by Niagara County.

ProPublica is a Pulitzer Prize-winning investigative newsroom. Sign up for their newsletter.