Skip to main content

luna.financial.common_loan_mixin

LoanTemplateMixin Objects

class LoanTemplateMixin()

Provides functionalities for loan processing in financial contracts. This class includes variables for tracking balance sheet accounts and methods for loan-related operations.

initialise_current_repayment_day

@clause(on_init=True)
def initialise_current_repayment_day()

Initializes the current repayment day based on the first repayment date. Sets the day of the month on which repayments are due, as determined by the first repayment date.

compute_interest_for_a_period

def compute_interest_for_a_period(start: date, next_repayment_date: date,
bal: Decimal, daily_rate: Decimal)

compute interest for either:

  • the whole period
  • short period
  • long period