pyfinbot
PyFinBot: Financial tracker for managing stock transactions and calculating holdings and capital gains.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.5%) to scientific vocabulary
Repository
PyFinBot: Financial tracker for managing stock transactions and calculating holdings and capital gains.
Basic Info
- Host: GitHub
- Owner: GreenMachine582
- License: mit
- Language: Python
- Default Branch: main
- Size: 72.3 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
PyFinBot
Table of Contents
Introduction
PyFinBot is a lightweight, extensible financial tracking tool built in Python, designed to help users manage and analyze their stock trading activity. By leveraging relational database design and SQL-based reporting, PyFinBot offers precise insights into holdings, transaction history, and capital gains or losses per financial year. Ideal for personal investors or hobbyist traders, it serves as a transparent and customizable alternative to spreadsheet-based tracking.
🚀 Key Features
- 📊 Transaction Recording: Track Buy/Sell orders with support for fees, prices, values, and financial year grouping.
- 📆 Holdings Snapshot: Query real-time or historical stock units held as of any given date.
- 💰 Capital Gain/Loss Calculation: Determine net gains/losses per stock by financial year using average cost basis.
- 🔗 Relational Database Design: Clean, normalized schema to ensure data integrity and efficient queries.
- 🔐 Multi-user Support (optional): Track transactions per user if needed.
- 📦 Modular Architecture: Built to be extended with additional features like tax reports, visualizations, or API integration.
🎯 Planned Milestones
- ✅ MVP – Schema design, basic transaction insertion, and SQL-based queries.
- 🔄 Import System – CSV or Excel import of stock transactions.
- 📈 Reporting Module – Generate FY-based reports for holdings and capital gains.
- 🧮 FIFO Method Support – Accurate gain/loss computation based on FIFO accounting.
- 🌐 CLI Interface – Interact via command line with exportable summaries.
- 🖥️ Web Dashboard (optional) – View and interact with data through a simple Flask or Django front end.
Testing
PyFinBot includes a comprehensive suite of unit tests to ensure the reliability and stability of its features. Tests cover various aspects of the core functionality.
Running Tests
To run the tests, navigate to the project root directory and execute the following command:
bash
python -m unittest discover -s tests
Create a virtual environment and install the required dependencies:
bash
alembic init src/pyfinbot/alembic
Create a new migration script for the initial schema:
bash
alembic revision --autogenerate -m "Initial schema"
bash
alembic upgrade head
License
PyFinBot is licensed under the MIT License, see LICENSE for more information.
Owner
- Name: Matthew Johnson
- Login: GreenMachine582
- Kind: user
- Location: Australia
- Repositories: 3
- Profile: https://github.com/GreenMachine582
Citation (CITATION.cff)
cff-version: "0.0.1"
date-released: 2025-04
message: "If you use this software, please cite it using these metadata."
title: "PyFinBot: Financial tracker for managing stock transactions and calculating holdings and capital gains."
url: "https://github.com/GreenMachine582/PyFinBot"
authors:
- family-names: Johnson
given-names: Matthew
GitHub Events
Total
- Push event: 9
- Create event: 2
Last Year
- Push event: 9
- Create event: 2