Skip to main content

Personal Finance ETL logo

Personal Finance ETL

Local-first personal finance engine — raw statements in, reconciled DuckDB truth out. Zero cloud.

PyPI Python GPL-3.0-or-later Polars DuckDB SQLite CustomTkinter


What's the vibe?

Personal Finance ETL (PFETL Core) is the local-first data & accounting engine that turns messy household records, broker statements, market prices, and FX rates into a clean, reconciled DuckDB warehouse (Bronze → Silver → Gold).

No spreadsheets held together by vibes, and no third-party cloud tracking your money. Everything runs on your machine, keeps a full audit trail in a SQLite Control Plane, and publishes Gold marts ready for dashboards, SQL, or BI tools.

Two-part ecosystem

PFETL is split into two separate repos that work together cleanly:

  • PFETL Core (this repo) — ingests evidence, runs FIFO lot accounting, XIRR, tax classification, FX attribution, reconciliation, and FIRE Monte Carlo simulations, and writes the outputs.
  • PFETL Analytics Studio (PyPI) — the read-only NiceGUI + Plotly web/desktop UI that reads Core's outputs for interactive charts, drill-downs, read-only SQL, and PDF/PPTX/XLSX/CSV exports.

How it all connects

flowchart LR
    subgraph EVIDENCE["Your Files & Market Data"]
        HH["Household SQLite"]
        INV["Broker / Investment Statements"]
        REF["Reference Data"]
        MKT["Market / Benchmark / FX (yfinance)"]
    end

    subgraph CORE["PFETL Core (this repo)"]
        CP[("Control Plane SQLite")]
        WH[("DuckDB · Bronze / Silver / Gold")]
        FIN["Engines: FIFO · Tax · Wealth · FIRE"]
        LOGS["Forensic JSONL + pipeline.lock"]
    end

    subgraph CONSUMERS["Where You View It"]
        CLI["pfetl CLI"]
        GUI["CustomTkinter Operator UI"]
        STUDIO["PFETL Analytics Studio"]
        BI["Power BI / Any SQL Client"]
    end

    HH --> CP
    INV --> CP
    REF --> CP
    MKT --> WH
    CP --> WH
    WH --> FIN
    FIN --> WH
    CP --> LOGS

    WH --> CLI
    WH --> GUI
    WH --> STUDIO
    CP --> STUDIO
    LOGS --> STUDIO
    WH --> BI

How Core & Analytics Studio talk

Core doesn't hard-couple to Studio's UI code, and Studio doesn't import personal-finance-etl. Instead, they share a clean local contract:

  • Outputs: Personal_Finance_DB.duckdb, Control Plane SQLite, Settings.toml, FinancialRules.toml, Forensic JSONL logs, and pipeline.lock (so Studio never touches DuckDB mid-run).
  • Desktop launch: The PFETL Core CustomTkinter app can launch and supervise Analytics Studio directly with your active Settings.toml + FinancialRules.toml and monitor it over /healthz.

What Core actually computes

Domain What it does
Household Finance Income, expense, and transfer classification; active vs passive income; core vs non-core spend; operating/investing/financing cashflows; liquidity & runway
Investments & FIFO Chronological FIFO lot matching, partial lot depletion, remaining cost basis, realized/unrealized P&L, broker quantity reconciliation, and concentration metrics
Performance & FX Pre-tax & after-tax XIRR (pyxirr), CAGR, benchmark-relative alpha, drawdown, and asset vs FX return attribution
Tax Evidence Multi-FY tax events, indicative ledger + investment tax liability, TDS/tax credits, net payable, ledger-vs-quant reconciliation, and LTCG maturity / loss-harvesting flags
Wealth & FIRE Market vs book net worth attribution, FI / Lean FI / Coast FI targets, savings velocity, and deterministic + Monte Carlo (P10/P50/P90) simulations accelerated with numba
Ops & Provenance Incremental file hashing, retained source payloads, provider retry/cache logs, Settings/Rules snapshots, snapshot / restore backups, and doctor diagnostics

Install & Run

Requires Python 3.13+.

Grab it

# From PyPI
pip install personal-finance-etl
pfetl

# Or from source with uv
git clone https://github.com/tks18/personal-finance-etl.git
cd personal-finance-etl
uv sync
uv run pfetl

CLI commands

pfetl                                              # Launch desktop operator UI
pfetl --gui                                        # Explicit GUI mode
pfetl run --config config.toml --rules rules.toml  # Run full ETL pipeline
pfetl run --config config.toml --rules rules.toml --cron  # Unattended / scheduled run
pfetl status --config config.toml                  # Latest run & sync status
pfetl info --config config.toml                    # Warehouse & system info
pfetl doctor --config config.toml --rules rules.toml      # Run diagnostics
pfetl snapshot --config config.toml                # Create backup archive
pfetl restore backup_archive.zip --config config.toml     # Restore from backup
pfetl --version                                    # Show installed version

Repo Layout & Stack

src/personal_finance_etl/
├── application/       # Pipeline orchestration & use cases
├── bootstrap/         # Dependency wiring
├── config/            # Settings & FinancialRules TOML models
├── contracts/         # Typed cross-layer contracts
├── domain/            # Financial logic (FIFO, XIRR, tax, wealth, FIRE)
├── infrastructure/    # DuckDB, SQLite Control Plane, yfinance, recovery, Studio supervisor
└── presentation/      # CLI & CustomTkinter operator console
Layer Libraries
Compute & Warehouse Polars, DuckDB, PyArrow, Numba, pyxirr
Storage & Config SQLite, Pydantic, tomlkit, fastexcel, openpyxl, filelock
Market Data yfinance
UI & CLI CustomTkinter, Rich, Pillow, tkcalendar
Packaging & Quality Hatchling, PyInstaller, Ruff, Mypy, Pyright, Pylint, Pytest

Dev & Vibe Checks

uv run pytest
uv run poe audit-fast
uv run poe audit-full
uv run pylint src tests

Author & License

Built by Shan TK (me) — check out the companion UI at PFETL Analytics Studio (PyPI).

Licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later). See LICENSE.

Metadata

Release files for personal-finance-etl 12.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for personal-finance-etl 12.3.0
File Size Uploaded Provenance Actions
personal_finance_etl-12.3.0.tar.gz 1.0 MB With provenance Details for personal_finance_etl-12.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for personal-finance-etl 12.3.0
File Interpreter ABI Platform Actions
personal_finance_etl-12.3.0-py3-none-any.whl Python 3 none any Details for personal_finance_etl-12.3.0-py3-none-any.whl

Total release size: 1.9 MB

Release files / personal_finance_etl-12.3.0.tar.gz

Download URL personal_finance_etl-12.3.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
bb335989cc99eb502a8e0d074bb76c40195399ebcfda8e6da6afe821b0bd3774
BLAKE2b-256 checksum
How to use checksums
6d677f51b85dc92c4d26e08fa0c37d00ad7eb45f3c0021fda6c5bc2de72e9bb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Release files / personal_finance_etl-12.3.0-py3-none-any.whl

Download URL personal_finance_etl-12.3.0-py3-none-any.whl
Size 879.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f87dab0738eace7a93d0d300f5966cea5d4c172e8b3499e1d3faf80a97c105c3
BLAKE2b-256 checksum
How to use checksums
7a02b0c70000180aa5a83528f5b4b4eb6cb1ede447ad0a3f5955b40c561e1df1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Security for personal-finance-etl 12.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for personal_finance_etl-12.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

12.3.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page