Automated Capital Gains & Dividend Tax Calculator for Polish Residents using Interactive Brokers.
- Privacy First: All financial data is stored in a local SQLCipher (AES-256) encrypted database.
- Universal Parser: Supports both Activity Statements and Flex Queries.
- Smart NBP Rates: T-1 rule compliant, using Batch Caching logic.
- FIFO Algorithm: Strictly follows tax laws for Cost Basis.
- PIT-38 Ready: Generates a PDF report compatible with Polish tax forms.
-
Clone:
git clone [https://github.com/your-repo/ibkr-tax-gemini.git](https://github.com/your-repo/ibkr-tax-gemini.git) cd ibkr-tax-gemini -
Install:
pip install -r requirements.txt
-
Setup Security: Create
.env:SQLCIPHER_KEY=your_secret_key DATABASE_PATH=db/ibkr_history.db.enc
The main.py script is now the single entry point for all operations.
# 1. Import Data
# Automatically scans the 'data/' folder for CSV files and updates the DB.
python main.py --import-data
# 2. Generate Report
# Calculates taxes for the specific year using FIFO and NBP rates.
python main.py --target-year 2024 --export-pdf --export-excelEducational purpose only. Not financial advice.