deposits
Deposit instrument classes for the core domain model.
Classes:
Cash
Cash()
Bases: Instrument
A class to represent cash.
Methods:
-
accept–Accept a visitor.
-
is_composite–Check if the instrument is composite.
-
repricing_date–Return the next repricing date for variable-rate instruments.
Attributes:
-
book_type(BookType | None) –Get the book type of the instrument.
-
credit_rating(CreditRating) –Get the instrument's credit rating.
-
issuer(Issuer) –Get the instrument's issuer.
-
parent(Instrument | None) –Get the parent instrument.
is_composite
is_composite() -> bool
Check if the instrument is composite.
repricing_date
repricing_date(as_of: date) -> date | None
Return the next repricing date for variable-rate instruments.
Returns None for fixed-rate instruments (repricing_frequency is None).
Deposit
Deposit(
*,
name: str = "Deposit",
interest_rate: float | None = None,
)
Bases: Instrument
A class to represent customer deposit.
Parameters:
-
(namestr, default:'Deposit') –The name of the deposit. Defaults to "Deposit".
-
(interest_ratefloat | None, default:None) –Annual interest rate (e.g. 0.02 for 2%). When set, the deposit interest rules use this rate instead of their default. Use 0.0 for a non-interest-bearing deposit.
Methods:
-
accept–Accept a visitor.
-
is_composite–Check if the instrument is composite.
-
repricing_date–Return the next repricing date for variable-rate instruments.
Attributes:
-
book_type(BookType | None) –Get the book type of the instrument.
-
credit_rating(CreditRating) –Get the instrument's credit rating.
-
issuer(Issuer) –Get the instrument's issuer.
-
parent(Instrument | None) –Get the parent instrument.
is_composite
is_composite() -> bool
Check if the instrument is composite.
repricing_date
repricing_date(as_of: date) -> date | None
Return the next repricing date for variable-rate instruments.
Returns None for fixed-rate instruments (repricing_frequency is None).