<feed xmlns='http://www.w3.org/2005/Atom'>
<title>finance-py, branch main</title>
<subtitle>Python library for finance</subtitle>
<id>https://cgit.xengineering.eu/finance-py/atom</id>
<link rel='self' href='https://cgit.xengineering.eu/finance-py/atom'/>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/'/>
<updated>2024-09-15T18:58:59Z</updated>
<entry>
<title>tools: Rename check_source.sh to check.sh</title>
<updated>2024-09-15T18:58:59Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-15T18:58:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=1ab3020d072b91917e6ee6f27ac65590ebe994d2'/>
<id>urn:sha1:1ab3020d072b91917e6ee6f27ac65590ebe994d2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Split flow.py to simulate.py and model.py</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-08T15:02:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=458a24d09f95eefb161728d9676ecdfca30e3f5e'/>
<id>urn:sha1:458a24d09f95eefb161728d9676ecdfca30e3f5e</id>
<content type='text'>
model.py should be a file containing only dataclasses to model finance.
simulate.py should take care of the simulation of that finance data to
create a financial forecast.
</content>
</entry>
<entry>
<title>Refactor finance.visualize.py</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-08T12:13:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=6973093a2b80b4fb9e216d1b3e329dd4c2badc7c'/>
<id>urn:sha1:6973093a2b80b4fb9e216d1b3e329dd4c2badc7c</id>
<content type='text'>
This introduces the plot() helper function to plot the default data
format list[tuple[datetime, Decimal]] with matplotlib.
</content>
</entry>
<entry>
<title>Do not rotate dates in visualization</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-08T11:21:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=b533a3c32ef6c0b8c425ac47b683179060810a1c'/>
<id>urn:sha1:b533a3c32ef6c0b8c425ac47b683179060810a1c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename demo -&gt; demo.py</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-08T10:56:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=8bfe0176a00b11b09365925eb57e383d024a63ec'/>
<id>urn:sha1:8bfe0176a00b11b09365925eb57e383d024a63ec</id>
<content type='text'>
This makes sure this script is also detected by the tools used in
tools/check_source.sh.

In general it is not a bad idea to use a file name extension to indicate
the file type. This improves compatibility with other tools in general.

The downside is that command line tools usually should not have a file
name extension. This can be worked around by using symlinks or an
install step. Both can remove the file name extension.
</content>
</entry>
<entry>
<title>Use list[tuple[datetime, Decimal]] consistently</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-08T10:46:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=7521277860b377e3e9ec7b6d5a62c4c2c14d694f'/>
<id>urn:sha1:7521277860b377e3e9ec7b6d5a62c4c2c14d694f</id>
<content type='text'>
This type is useful for finance-py in general. It is often required to
handle money in datetime context. Using this type consistently makes the
code easier to read and maintain.
</content>
</entry>
<entry>
<title>Add measured values</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-08T10:36:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=4e8d17c8d0b7d5406d3a9df8c320b5cbabb9d330'/>
<id>urn:sha1:4e8d17c8d0b7d5406d3a9df8c320b5cbabb9d330</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move display() to finance.visualize.py</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-08T09:37:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=2560d862d5019db1b103a6e6a9c14dfa66afe78d'/>
<id>urn:sha1:2560d862d5019db1b103a6e6a9c14dfa66afe78d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix type annotation for finance.flow.simulate()</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-08T09:36:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=599ef8b119d0b37791b53d9f3a14eeaa658421b1'/>
<id>urn:sha1:599ef8b119d0b37791b53d9f3a14eeaa658421b1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add second flow to demo</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-08T09:12:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=51e67cebb905e7831e3a2d9f706a6d756d69fa71'/>
<id>urn:sha1:51e67cebb905e7831e3a2d9f706a6d756d69fa71</id>
<content type='text'>
This makes the output less trivial.
</content>
</entry>
<entry>
<title>Add demo script</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-08T09:09:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=8bf63bc6bb62f2cc2d52ae7e09424c308ff08362'/>
<id>urn:sha1:8bf63bc6bb62f2cc2d52ae7e09424c308ff08362</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement finance.flow.display()</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-08T09:03:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=9faaac7e25d2efdca36dcb67f96960d3ab72ab82'/>
<id>urn:sha1:9faaac7e25d2efdca36dcb67f96960d3ab72ab82</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement finance.flow.simulate()</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-08T08:02:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=fb479fcd7a477959157bdeb9543f11c8b9e8870c'/>
<id>urn:sha1:fb479fcd7a477959157bdeb9543f11c8b9e8870c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix old usage of name "income"</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-07T18:44:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=56219157290495bf58b05a060a2d2afedea735ad'/>
<id>urn:sha1:56219157290495bf58b05a060a2d2afedea735ad</id>
<content type='text'>
This was renamed to "flow".
</content>
</entry>
<entry>
<title>Implement Flow.since and Flow.until</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-07T18:43:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=36936455e7805f824cb07fe9b23500a882426f98'/>
<id>urn:sha1:36936455e7805f824cb07fe9b23500a882426f98</id>
<content type='text'>
That way a flow can be limited to a certain time frame.
</content>
</entry>
<entry>
<title>Refactor Flow.integrate()</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-04T19:09:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=226f5afa968ead223baa5a1b0fafb481f9761f0f'/>
<id>urn:sha1:226f5afa968ead223baa5a1b0fafb481f9761f0f</id>
<content type='text'>
This refactoring introduces a generator function supporting the
integration. It creates datetime candidates where it can be checked if
they are in the time interval given to the integration method.

Furthermore a numerical improvement was made. The Flow.integrate()
function now checks candidates from the helper function and sums the
matching candidates up as an integer. After checking all candidates the
integer is converted to a decimal and multiplied by Flow.amount.

This is more accurate because in Python decimal calculation not numbers
or calculations are rounded, just the result of a calculation. Looping
over the candidates and adding amount each time thus involves a rounding
operation per candidate. The new algorithm has exactly one rounding
operation.
</content>
</entry>
<entry>
<title>Rename income to flow</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-04T18:56:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=877b50ef8802f8b59d81ccabcab22fe185e898d7'/>
<id>urn:sha1:877b50ef8802f8b59d81ccabcab22fe185e898d7</id>
<content type='text'>
Modeling income and expenses separately does not make sense since the
only difference is the sign of the amount. Separate definitions would
lead to a lot of duplicated code.
</content>
</entry>
<entry>
<title>Switch to decimal.Decimal for money</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-04T18:16:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=b85de39cd765164d5a31836cb7ca106ad6e328a7'/>
<id>urn:sha1:b85de39cd765164d5a31836cb7ca106ad6e328a7</id>
<content type='text'>
Floating point data types are not suitable to represent money since
rounding issues will sum up.
</content>
</entry>
<entry>
<title>finance: Use datetime for Income.integrate()</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-03T19:34:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=4f3d4de3796744ee1d6d0e91e8bec76e0487de90'/>
<id>urn:sha1:4f3d4de3796744ee1d6d0e91e8bec76e0487de90</id>
<content type='text'>
Time-based Integration in general is done between two time stamps. For
the financial context it makes sense to use Python's datetime.datetime
class for this purpose.

This commit implements integrating an income between two
datetime.datetime time stamps.
</content>
</entry>
<entry>
<title>finance: Add income.py</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-03T18:24:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=b0b34adbd86fc778923a766273c145cc657918cd'/>
<id>urn:sha1:b0b34adbd86fc778923a766273c145cc657918cd</id>
<content type='text'>
This is the minimal starting point to model financial income.
</content>
</entry>
<entry>
<title>tools: Add check_source.sh</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-03T17:56:18Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=8043151dc8f80bdffaef1e98e1e33acc36bd58d5'/>
<id>urn:sha1:8043151dc8f80bdffaef1e98e1e33acc36bd58d5</id>
<content type='text'>
This script checks for common programming errors in the Python code of
this repository.

It might be symlinked by `.git/hooks/pre-commit` to make sure those
errors do not end up in the Git history.
</content>
</entry>
<entry>
<title>finance: Add empty Python package</title>
<updated>2024-09-08T15:21:32Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-03T17:41:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=95763696b3a1cbc34c25e8efd701b876a8b76f82'/>
<id>urn:sha1:95763696b3a1cbc34c25e8efd701b876a8b76f82</id>
<content type='text'>
This package should contain the primary content of this repository.
</content>
</entry>
<entry>
<title>Add Apache License 2.0 as LICENSE.txt</title>
<updated>2024-09-08T15:21:28Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-03T17:40:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=b7aaf19f45f1fd75bea40815b24a373b09d28d43'/>
<id>urn:sha1:b7aaf19f45f1fd75bea40815b24a373b09d28d43</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add README.md</title>
<updated>2024-09-03T17:40:39Z</updated>
<author>
<name>xengineering</name>
<email>me@xengineering.eu</email>
</author>
<published>2024-09-03T17:40:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit.xengineering.eu/finance-py/commit/?id=775936b83cb6f683e88359747ae28fe85f80c097'/>
<id>urn:sha1:775936b83cb6f683e88359747ae28fe85f80c097</id>
<content type='text'>
</content>
</entry>
</feed>
