AojdevStudio/Finance-Guru
Self-hosted family office engine: typed Python calculators, a private SQLite ledger, and specialist agents for Claude Code and Codex. Agents propose. Typed code computes.
What it solves
Brokerage accounts are not spreadsheet problems; they are operating-system problems. Finance Guru gives a household a private, self-hosted way to track holdings, compute risk, and apply guardrails before any trade ticket persists. The core idea: chat models are great at deciding what question to ask but terrible at being the calculator. So agents propose, typed code computes, and guardrails fail closed when numbers are missing instead of guessing.
How it works
Finance Guru is an open-core engine with a strict split between judgment and arithmetic. AI agents (inside Claude Code or Codex) reason and propose, but all calculations are done by 20 Pydantic-validated calculator CLIs, each with a test suite (1,100+ tests behind an 80% coverage gate). Data lives in a private SQLite instance directory outside the repository. Sync layers pull from SnapTrade (brokerage) and SimpleFIN (bank/card), and any partial provider response raises an error before writing.
Every tool follows a three-layer pattern: a Pydantic input model, a calculator class, and a CLI wrapper with JSON output. An agent can only call the CLI and quote its output — that contract ensures what it reports is exactly what the calculator returned. Guardrails (concentration cap, margin coverage, ITC risk) run on trusted inputs before a buy ticket persists, and a block returns a typed reason instead of writing anything.
Scheduled checks use Swamp: one compares your configured Fidelity margin rate against the published tier for your debt, another suggests hedge-trigger start/exit actions. These checks only alert; they never trade.
Who it’s for
Households that want their personal-finance books on their own machine and are comfortable with a terminal. It’s free to clone and run, and no portfolio data is required for market analysis. It’s also built for AI agents — the README explicitly addresses agents with rules like “Never do the arithmetic yourself” and “Fail closed.”
Highlights
- 20 typed calculators for risk, momentum, volatility, correlation, optimization, backtesting, options, factors, hedging, total return, and margin metrics; each is a CLI with JSON output and tests.
- Private SQLite instance outside the repo; tracked files never carry personal values; pre-push compliance scan blocks secrets and PII.
- Fail-closed guardrails block a buy ticket when NAV, margin rate, or Layer 3 ITC score is missing — no guessing, no estimate-filled input.
- Sync from SnapTrade and SimpleFIN with partial-failure protection; stale equity (over 12 hours) is refused, and margin debt stays empty rather than wrong.
- 11 specialist agents guided by a finance orchestrator; every output carries a data source, date stamp, and educational-only disclaimer.
- Scheduled Swamp checks for margin-rate drift and hedge triggers; runs on a timer and keeps a record of every run.
Related
- Project
- Project
- Project
- Project
- Project