All components

Debt repayment

Allocate scheduled payments, a priority sweep and settlement without overpaying principal.

How it works

Debt repayment (6)
  1. Closing

    (((Balance − Scheduled) − Sweep) − Payoff)

  2. Fees

    Sum((Payoff × Payoff Fee Rate))

  3. Payoff

    Payoff

    Uses
  4. Repayments

    ((Scheduled + Sweep) + Payoff)

  5. Scheduled

    Scheduled

  6. Sweep

    Sweep

    Uses
Calculation steps (5)
  1. Scheduled

    Result of Scheduled principal

    Component · Scheduled principal

    Calculate monthly scheduled principal from original and outstanding balances.

    Argument values
    Balance
    Balance
    Original
    Original
    Rate
    Amortization
  2. (Balance − Scheduled)

    (Balance − Scheduled)

  3. Sweep

    Lower of (Balance − Scheduled) and Higher of ((Higher of (Cash − Sum(Scheduled)) and 0 × Limit to range(Sweep Rate, 0, 1)) − Shift(Running total((Balance − Scheduled)), 1)) and 0

  4. ((Balance − Scheduled) − Sweep)

    ((Balance − Scheduled) − Sweep)

  5. Payoff

    if (Settlement > 0), then ((Balance − Scheduled) − Sweep), otherwise 0

Conventions (6)
  • Amounts follow tranche priority: the first tranche receives sweep cash first.
  • Scheduled amortization uses original principal and an annual rate, capped at outstanding principal.
  • Cash available is after interest and commitment fees. Mandatory payments can create a funding gap.
  • A sweep uses the remaining positive cash budget and cannot exceed outstanding claims.
  • Settlement pays remaining principal after scheduled payments and sweeps.
  • The payoff fee applies only to settlement principal; scheduled and sweep payments carry no payoff fee.

Inputs and outputs

Inputs (7)
Inputs
NameUnitApplies to
AmortizationPercentTranche
BalanceDollarsTranche
CashDollarsSingle value
OriginalDollarsTranche
Payoff Fee RatePercentTranche
SettlementFlagSingle value
Sweep RatePercentSingle value
Outputs (6)
Outputs
NameUnitApplies to
ClosingDollarsTranche
FeesDollarsSingle value
PayoffDollarsTranche
RepaymentsDollarsTranche
ScheduledDollarsTranche
SweepDollarsTranche

Recipes using this calculation

Libraries