add_credit_ratios: Add credit ratios for debt service, interest cover, debt...

View source: R/ratios.r

add_credit_ratiosR Documentation

Add credit ratios for debt service, interest cover, debt yield, and forward loan-to-value

Description

Align a project cash-flow table with a debt schedule and compute standard credit ratios for each period:

  • debt service coverage ratio (DSCR),

  • interest cover ratio (ICR),

  • initial and current debt yield,

  • forward loan-to-value (LTV) based on next-period NOI.

Optionally, simple covenant flags are added when threshold values are supplied.

Usage

add_credit_ratios(
  cf_tab,
  debt_sched,
  exit_yield,
  covenants = NULL,
  dscr_basis = c("noi", "gei", "cfads"),
  cfads_ti_lc = NULL,
  ignore_balloon_in_min = FALSE,
  maturity_year = NULL
)

Arguments

cf_tab

A data.frame or tibble of project cash flows over years 0..N, typically the output of dcf_calculate() or cf_make_full_table(). It must at least contain a year column and either net_operating_income or gei. When available, the following columns are used: opex, cf_pre_debt, capex_recur, leasing_costs, loan_init.

debt_sched

A data.frame or tibble representing the debt schedule, typically the output of debt_built_schedule(). It must contain year, payment, interest, and outstanding_debt, and may also include debt_draw and loan_init.

exit_yield

Numeric scalar; exit yield (in decimal form, for example 0.05) used to compute forward values as NOI_next / exit_yield.

covenants

Optional list with elements dscr_min, ltv_max and/or debt_yield_min. When supplied, the function adds simple covenant indicators to the output table.

dscr_basis

Character string specifying the numerator used for DSCR. One of "noi", "gei" or "cfads". The default is "noi".

cfads_ti_lc

Optional object used to construct a CFADS adjustment for tenant-improvement or leasing-cost allowances. If a list, the element annual_allowance (numeric scalar or vector) is subtracted from NOI. If a function, it is called as cfads_ti_lc(cf_tab) and the returned numeric vector is subtracted from NOI.

ignore_balloon_in_min

Logical scalar. If TRUE and maturity_year is not NULL, the attribute "min_dscr_pre_maturity" is attached to the result and stores the minimum DSCR computed only over years 1 to maturity_year - 1, ignoring any balloon repayment at maturity.

maturity_year

Optional integer scalar giving the contractual maturity year of the facility. Periods with year > maturity_year are treated as post-maturity (no outstanding debt, no payment, no interest). This parameter is required when ignore_balloon_in_min = TRUE.

Value

A tibble equal to cf_tab with the following additional columns:

  • gei, noi (created if missing),

  • payment, interest, outstanding_debt,

  • noi_fwd, value_forward,

  • dscr, interest_cover_ratio,

  • debt_yield_init, debt_yield_current,

  • ltv_forward,

  • covenant indicators when covenants is supplied.

When ignore_balloon_in_min = TRUE and maturity_year is provided, the object also carries an attribute "min_dscr_pre_maturity" containing the minimum DSCR before maturity.

Examples

cf_tab <- data.frame(
  year = 0:3,
  gei  = c(0, 120, 123, 126),
  opex = c(0, 40, 41, 42),
  loan_init = c(2000, NA, NA, NA)
)

debt_sched <- data.frame(
  year = 0:3,
  payment = c(0, 150, 150, 2150),
  interest = c(0, 100, 95, 90),
  outstanding_debt = c(2000, 2000, 1950, 1900),
  debt_draw = c(2000, 0, 0, 0)
)

out <- add_credit_ratios(
  cf_tab = cf_tab,
  debt_sched = debt_sched,
  exit_yield = 0.05,
  covenants = list(dscr_min = 1.10, ltv_max = 0.70)
)

out


cre.dcf documentation built on April 10, 2026, 5:08 p.m.