Debts

The Debts module manages debts (payments and balances) in the simulation.

class CPR.debts.Debt(name, d_hh, common, prices)

This class manages all debts. All amounts are nominal.

Parameters
  • name (str) – name of the debt

  • d_hh (dict) – dictionary containing debt initial balances and monthly payments

  • common (Common) – instance of the class Common

  • prices (Prices) – instance of the class Prices

estimate_init_term(common, prices)

Estimate the term of the debt.

Parameters
  • common (Common) – instance of the class Common

  • prices (Prices) – instance of the class Prices

Returns

term of the debt

Return type

int

update(year, rate, prices)

Updates yearly payment and balance.

Parameters
  • year (int) – year

  • rate (float) – interest rate

  • prices (Prices) – instance of the class Prices

reset()

Reset balance and term to initial values.