diff options
author | xengineering <me@xengineering.eu> | 2024-09-08 11:09:43 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-09-08 17:21:32 +0200 |
commit | 8bf63bc6bb62f2cc2d52ae7e09424c308ff08362 (patch) | |
tree | 25eea1aa0fb750ab693161de5d15dcf97cff7fde | |
parent | 9faaac7e25d2efdca36dcb67f96960d3ab72ab82 (diff) | |
download | finance-py-8bf63bc6bb62f2cc2d52ae7e09424c308ff08362.tar finance-py-8bf63bc6bb62f2cc2d52ae7e09424c308ff08362.tar.zst finance-py-8bf63bc6bb62f2cc2d52ae7e09424c308ff08362.zip |
Add demo script
-rwxr-xr-x | demo | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -0,0 +1,32 @@ +#!/usr/bin/python3 + + +import argparse + +from datetime import datetime +from decimal import Decimal + +from finance.flow import Flow, simulate, display + + +DESCRIPTION = "Demo application plotting financial data with finance-py" + + +def main() -> None: + argparse.ArgumentParser(description=DESCRIPTION).parse_args() + + flows = ( + Flow(amount=Decimal(100.0), since=None, until=None), + ) + + data = simulate( + start=datetime(2024, 1, 1), + end=datetime(2030, 1, 1), + flows=flows, + ) + + display(data) + + +if __name__ == "__main__": + main() |