diff options
author | xengineering <me@xengineering.eu> | 2024-09-03 20:24:42 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-09-08 17:21:32 +0200 |
commit | b0b34adbd86fc778923a766273c145cc657918cd (patch) | |
tree | e572fab4f78753d1d32a7723e00067caeff5b2d7 /finance/income.py | |
parent | 8043151dc8f80bdffaef1e98e1e33acc36bd58d5 (diff) | |
download | finance-py-b0b34adbd86fc778923a766273c145cc657918cd.tar finance-py-b0b34adbd86fc778923a766273c145cc657918cd.tar.zst finance-py-b0b34adbd86fc778923a766273c145cc657918cd.zip |
finance: Add income.py
This is the minimal starting point to model financial income.
Diffstat (limited to 'finance/income.py')
-rw-r--r-- | finance/income.py | 10 |
1 files changed, 10 insertions, 0 deletions
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 |