| cf_make_full_table | R Documentation |
Builds an annual table by merging operating cash flows from a discounted cash flow model with a debt schedule; standardises gross effective income (GEI) and net operating income (NOI), computes post-debt cash flows, the equity cash flow, and discounted equity cash flows. Enforces a minimal contract on expected columns on both inputs.
cf_make_full_table(dcf, schedule)
dcf |
A
If |
schedule |
A data.frame or tibble of the debt schedule with one row per
|
Invariants and checks:
Stop if required columns are missing on the Discounted Cash Flow (DCF) or the debt side.
Stop if payment[year == 0] != 0.
Warn if debt_draw[year == 0] <= 0.
A merged tibble (join on year) containing:
all input columns from the Discounted Cash Flow (DCF) and the debt schedule,
df (alias of discount_factor),
cf_pre_debt (= free_cash_flow),
cf_post_debt (= free_cash_flow - payment - arrangement_fee + debt_draw),
equity_flow (= cf_post_debt; sale proceeds are already embedded in
free_cash_flow at the exit year),
equity_disc (= equity_flow / df).
cf <- tibble::tibble(
year = 0:2,
net_operating_income = c(NA, 120, 124),
opex = c(0, 20, 21),
capex = c(0, 5, 5),
free_cash_flow = c(-100, 95, 98),
sale_proceeds = c(0, 0, 150),
discount_factor = c(1, 1.05, 1.1025)
)
dcf <- list(cashflows = cf)
schedule <- tibble::tibble(
year = 0:2,
debt_draw = c(60, 0, 0),
interest = c(0, 3, 2),
amortization = c(0, 10, 50),
payment = interest + amortization,
arrangement_fee = c(0.6, 0, 0),
outstanding_debt = c(60, 50, 0)
)
res <- cf_make_full_table(dcf, schedule)
res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.