# Ghostfolio — Open Source Wealth Management & Portfolio Tracker > Ghostfolio is an open-source personal finance dashboard for tracking stocks, ETFs, crypto, and other investments with real-time market data and performance analytics. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use ```bash git clone https://github.com/ghostfolio/ghostfolio.git cd ghostfolio docker compose --env-file ./.env up -d ``` Open `http://localhost:4200` — create your account and start tracking your portfolio. ## Intro **Ghostfolio** is an open-source wealth management software for tracking your personal investment portfolio. Built with Angular, NestJS, and Prisma, it provides a clean dashboard to monitor stocks, ETFs, cryptocurrencies, and other assets with real-time market data, performance analytics, and dividend tracking. With 8.1K+ GitHub stars and AGPL-3.0 license, Ghostfolio empowers privacy-conscious investors to track their net worth and investment performance without sharing financial data with third-party services. ## What Ghostfolio Does Ghostfolio provides comprehensive investment tracking: - **Portfolio Dashboard**: Real-time overview of all holdings with current values and gains/losses - **Multi-Asset Support**: Stocks, ETFs, bonds, mutual funds, cryptocurrencies, commodities, and real estate - **Performance Analytics**: Time-weighted return (TWR), money-weighted return (MWR), and historical performance charts - **Dividend Tracking**: Track dividend income across all holdings with calendar view - **Market Data**: Automatic price feeds from Yahoo Finance, Google Finance, and other providers - **Multi-Currency**: Support for portfolios across multiple currencies with automatic conversion - **Allocation Analysis**: Asset allocation by type, sector, region, and account ## Architecture ``` ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ Angular │────▶│ NestJS │────▶│ PostgreSQL │ │ Frontend │ │ API Server │ │ (Prisma ORM)│ └──────────────┘ └──────┬───────┘ └──────────────┘ │ ┌──────┴───────┐ │ Redis │ │ (Cache) │ └──────────────┘ ``` ## Self-Hosting ### Docker Compose ```yaml services: ghostfolio: image: ghostfolio/ghostfolio:latest ports: - "4200:3333" environment: DATABASE_URL: postgresql://ghostfolio:ghostfolio@postgres:5432/ghostfolio REDIS_HOST: redis REDIS_PORT: 6379 ACCESS_TOKEN_SALT: your-random-salt JWT_SECRET_KEY: your-jwt-secret depends_on: - postgres - redis postgres: image: postgres:16-alpine environment: POSTGRES_USER: ghostfolio POSTGRES_PASSWORD: ghostfolio POSTGRES_DB: ghostfolio volumes: - pg-data:/var/lib/postgresql/data redis: image: redis:7-alpine volumes: - redis-data:/data volumes: pg-data: redis-data: ``` ## Key Features ### Activity Import Import transactions from CSV files or connect to brokerages: ```csv Date,Symbol,Type,Quantity,Price,Currency,Fee 2024-01-15,AAPL,BUY,10,185.50,USD,1.00 2024-01-20,VWCE.DE,BUY,5,108.20,EUR,0.00 2024-02-01,BTC,BUY,0.05,42500,USD,5.00 ``` ### Portfolio Allocation View Ghostfolio breaks down your portfolio by: - **Asset Class**: Equity, Fixed Income, Real Estate, Commodities, Cash - **Region**: Americas, Europe, Asia Pacific, Emerging Markets - **Sector**: Technology, Healthcare, Finance, Energy, etc. - **Account**: Brokerage accounts, retirement accounts, crypto wallets - **Currency**: Holdings grouped by base currency ### Fire Calculator Built-in Financial Independence / Retire Early (FIRE) calculator: - Project when you can retire based on savings rate and expected returns - Adjust for inflation and spending patterns - Compare different withdrawal strategies (4% rule, variable) ### API Access ```bash # Get portfolio summary curl http://localhost:4200/api/v1/portfolio/summary -H "Authorization: Bearer YOUR_TOKEN" # Get holdings curl http://localhost:4200/api/v1/portfolio/holdings -H "Authorization: Bearer YOUR_TOKEN" ``` ## Ghostfolio vs Alternatives | Feature | Ghostfolio | Portfolio Performance | Wealthica | Mint/Copilot | |---------|------------|---------------------|-----------|-------------| | Open Source | Yes (AGPL-3.0) | Yes (EPL-1.0) | No | No | | Self-hosted | Yes | Desktop app | No | No | | Multi-currency | Yes | Yes | Yes | Limited | | Crypto | Yes | Limited | Yes | No | | Dividends | Yes | Yes | Yes | No | | Web-based | Yes | No (Java desktop) | Yes | Yes | | FIRE tools | Yes | No | No | No | ## FAQ **Q: How does Ghostfolio get market data?** A: By default it uses the Yahoo Finance API for real-time and historical prices. Google Finance and CoinGecko (crypto) are also supported. The self-hosted version requires no paid API key. **Q: Does it support China A-shares?** A: Yes. Through Yahoo Finance you can pull Shanghai (.SS) and Shenzhen (.SZ) stock data. For example, Kweichow Moutai can be added as 600519.SS. **Q: Is my data secure?** A: In the self-hosted version, all data is stored in your own PostgreSQL database and never sent to third parties. Only market data queries hit external APIs. ## Source & Thanks - GitHub: [ghostfolio/ghostfolio](https://github.com/ghostfolio/ghostfolio) — 8.1K+ ⭐ | AGPL-3.0 - Website: [ghostfol.io](https://ghostfol.io) --- Source: https://tokrepo.com/en/workflows/ghostfolio-open-source-wealth-management-portfolio-tracker-d4e2f573 Author: AI Open Source