Description
PortfolioDB is a self-hosted portfolio ledger designed for users who want complete control over their financial records. Built on Postgres, it features an append-only, lot-based system that ensures every trade is recorded as an immutable entry. This design allows for accurate tracking of positions, cost basis, and P&L, which are recomputed from raw lots on every read, ensuring data integrity and transparency.
Read More
The platform supports FIFO and moving-average lot matching engines, running in parallel to provide flexibility in cost basis computation. Users can benefit from a robust MCP server that allows AI agents to query the system, facilitating advanced portfolio analysis and management. The system is designed to be self-contained, with no broker sync or third-party integrations, ensuring that users' data remains private and secure.
PortfolioDB is open-source and operates under the AGPL-3.0 license, meaning users can modify and run the software as a service, provided they publish any modifications. The platform is designed for single-user access, with network-based access control, and does not include built-in login features.
The platform is particularly suited for equities and ETFs, with support for any asset quoted by yfinance. However, it does not support options, bonds, or crypto-native accounting. Users must manually enter trades or import them via CSV, as there is no automatic broker synchronization. The system assumes a single currency throughout, with multi-currency support planned for future updates.
PortfolioDB is ideal for individuals or organizations seeking a reliable and transparent portfolio management tool that prioritizes data ownership and integrity. It is not a broker or financial advisor and does not provide investment advice or execute trades.
- CategoryAI Trading & Investing Tools
- Pricing ModelOpen Source
- DeploymentSelf-hosted
- PlatformsPostgres
PortfolioDB's Core Features
Self-hosted on Postgres
Append-only ledger
FIFO and average-cost engines
MCP server for AI queries
No broker sync
Open-source under AGPL-3.0
Single-user access
Equities and ETFs support
How to use PortfolioDB?
Configure: Set up Docker and Postgres
Import: Enter trades manually or via CSV
Analyze: Use MCP server for AI queries
Manage: Track positions and P&L in real-time
PortfolioDB's Use Cases
- Portfolio Management
- AI Integration
- Data Integrity
- Custom Reporting
- Open Source Development








