Personal Finance ETL
Local-first personal finance engine — raw statements in, reconciled DuckDB truth out. Zero cloud.
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, andpipeline.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.tomland 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.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| personal_finance_etl-12.3.2.tar.gz | 1.0 MB | With provenance | Details for personal_finance_etl-12.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| personal_finance_etl-12.3.2-py3-none-any.whl | Python 3 | none | any | Details for personal_finance_etl-12.3.2-py3-none-any.whl |
Total release size: 1.9 MB
Release files / personal_finance_etl-12.3.2.tar.gz
| Download URL | personal_finance_etl-12.3.2.tar.gz |
|---|---|
| Size | 1.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6daab4360602287c2a66c3aa522c03a1c2f13bc0fd59f7b466817b4418c19f85
|
|
BLAKE2b-256 checksum How to use checksums |
5dc1eee7d4a643116b8ead594b3f34ed4d75a60eeea924f81389df360b32668c
|
| 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 logRelease files / personal_finance_etl-12.3.2-py3-none-any.whl
| Download URL | personal_finance_etl-12.3.2-py3-none-any.whl |
|---|---|
| Size | 870.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73e61fd3f638cd5ea4d79d7952efdec184f6a6b53373ef307178a7a8b1f9f47b
|
|
BLAKE2b-256 checksum How to use checksums |
d36b46945cdbe80de4c88cdf7522b607592864c1c30e8a31a3e618cfcb56c0e1
|
| 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 logSecurity for personal-finance-etl 12.3.2
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.
Attestation for personal_finance_etl-12.3.2.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 logA 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.