Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🇵🇱 IBKR Tax Calculator (PIT-38 Poland) v2.2.0

Automated Capital Gains & Dividend Tax Calculator for Polish Residents using Interactive Brokers.

Python License Security Version

🚀 Key Features

  • 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.

📦 Installation

  1. 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
  2. Install:

    pip install -r requirements.txt
  3. Setup Security: Create .env:

    SQLCIPHER_KEY=your_secret_key
    DATABASE_PATH=db/ibkr_history.db.enc

🏃 Usage

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-excel

⚠️ Disclaimer

Educational purpose only. Not financial advice.

About

It parses your IBKR Activity Reports (CSV), calculates Capital Gains (FIFO) and Dividends using precise **NBP (National Bank of Poland)** exchange rates (D-1 rule), and generates a PDF report ready for your PIT-38 tax declaration.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages