From b0b34adbd86fc778923a766273c145cc657918cd Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 3 Sep 2024 20:24:42 +0200 Subject: finance: Add income.py This is the minimal starting point to model financial income. --- finance/income.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 finance/income.py (limited to 'finance/income.py') diff --git a/finance/income.py b/finance/income.py new file mode 100644 index 0000000..12d5d4e --- /dev/null +++ b/finance/income.py @@ -0,0 +1,10 @@ +import dataclasses + + +@dataclasses.dataclass(kw_only=True, frozen=True) +class Income: + + amount: float + + def integrate(self, delta_t: int) -> float: + return delta_t * self.amount -- cgit v1.2.3-70-g09d2