{"id":29291591,"url":"https://github.com/atomjay/capitalcore","last_synced_at":"2026-04-11T03:32:44.143Z","repository":{"id":301801268,"uuid":"1008715652","full_name":"atomjay/capitalcore","owner":"atomjay","description":" CapitalCore: 一個開源的專業級投資分析工具，讓您像頂尖投行一樣分析股票。整合 DCF、CCA    等多種模型，提供深度洞察","archived":false,"fork":false,"pushed_at":"2025-06-28T23:40:16.000Z","size":88205,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-06T08:08:17.892Z","etag":null,"topics":["finance","financial-modeling","fintech","flask","investment","nextjs","python","react","stock-analysis","typescript","valuation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atomjay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-26T01:45:06.000Z","updated_at":"2025-06-29T02:10:16.000Z","dependencies_parsed_at":"2025-06-28T23:19:18.767Z","dependency_job_id":"756d962c-b24a-44bb-8e6e-34d55d96957d","html_url":"https://github.com/atomjay/capitalcore","commit_stats":null,"previous_names":["atomjay/investment_analysis","atomjay/capitalcore"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/atomjay/capitalcore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjay%2Fcapitalcore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjay%2Fcapitalcore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjay%2Fcapitalcore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjay%2Fcapitalcore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atomjay","download_url":"https://codeload.github.com/atomjay/capitalcore/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjay%2Fcapitalcore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31668046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["finance","financial-modeling","fintech","flask","investment","nextjs","python","react","stock-analysis","typescript","valuation"],"created_at":"2025-07-06T08:08:16.222Z","updated_at":"2026-04-11T03:32:44.126Z","avatar_url":"https://github.com/atomjay.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://img.icons8.com/fluency/96/000000/bullish.png\" alt=\"CapitalCore Logo\" width=\"96\" height=\"96\"\u003e\n  \u003ch1 align=\"center\"\u003eCapitalCore\u003c/h1\u003e\n  \u003cp align=\"center\"\u003e\n    一個專業級的投資銀行分析平台，整合多種權威估值模型，為您提供精準的股票分析與智能投資建議。\n  \u003c/p\u003e\n\n  \u003c!-- Badges --\u003e\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Python-3.10%2B-blue.svg\" alt=\"Python Version\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Framework-Next.js%2014-black.svg\" alt=\"Next.js Version\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Framework-Flask-green.svg\" alt=\"Flask Framework\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" alt=\"License\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/last-commit/atomjay/investment_analysis.svg\" alt=\"Last Commit\"\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n---\n\n**CapitalCore** 旨在將複雜且耗時的金融分析流程自動化、透明化。透過最先進的技術棧與嚴謹的金融模型，本平台讓專業投資者、分析師及金融愛好者，都能快速獲取深度、可靠的個股分析報告，從而做出更明智的投資決策。\n\n## 🌟 核心功能\n\n- **📈 多模型估值引擎**: \n  - **相對估值法 (CCA)**: 比較同業公司的估值倍數 (P/E, EV/EBITDA)。\n  - **現金流折現法 (DCF)**: 預測未來現金流並折現，評估公司內在價值。\n  - **交易比率法 (PTA)**: 分析可比公司的併購交易，評估含控制權溢價的價值。\n  - **資產基礎法**: 評估公司的淨資產價值，提供價值底線參考。\n\n- **🤖 智慧推薦系統**:\n  - **五級投資建議**: 強烈買入、買入、持有、賣出、強烈賣出。\n  - **綜合評分卡**: 基於數十個因子，產出 0-100 分的綜合評分。\n  - **透明化決策**: 詳細列出買入理由與潛在風險，並解釋各項權重。\n\n- **📊 數據儀表板**:\n  - **互動式圖表**: 視覺化呈現估值比較與歷史數據。\n  - **數據透明度**: 提供原始 API 數據查看與一鍵複製功能，方便使用者自行驗證。\n  - **專業級介面**: 採用現代化、資訊密集的設計，符合專業金融人員使用習慣。\n\n- **🔌 多數據源整合**:\n  - **智慧切換**: 自動整合 Yahoo Finance, Alpha Vantage, FMP 等多個數據源。\n  - **數據標準化**: 內建強大的數據標準化引擎，確保跨來源數據的一致性與準確性。\n\n## 🛠️ 技術棧 (Technology Stack)\n\n| 層級 | 技術 | 用途與說明 |\n| :--- | :--- | :--- |\n| **前端 (Frontend)** | **Next.js 14** | 基於 React 的主流框架，提供伺服器端渲染(SSR)與優異的開發體驗。 |\n| | **React 18** | 用於建構使用者介面的核心函式庫，採用元件化開發模式。 |\n| | **TypeScript** | 為 JavaScript 提供靜態類型檢查，提升程式碼的健壯性與可維護性。 |\n| | **TailwindCSS** | 一個功能優先的 CSS 框架，用於快速建構現代化的自訂設計。 |\n| | **Framer Motion** | 提供流暢豐富的動畫效果，提升使用者互動體驗。 |\n| **後端 (Backend)** | **Python 3.10+** | 主要開發語言，擁有豐富的數據科學與金融分析生態系。 |\n| | **Flask** | 一個輕量級的 WSGI Web 應用框架，用於建構高效能的 RESTful API。 |\n| | **yfinance** | 用於從 Yahoo Finance 獲取免費、即時的全球股票數據。 |\n| **環境與工具** | **uv** | 一個極速的 Python 套件安裝與管理工具，取代傳統的 pip 與 venv。 |\n| | **Node.js** | 前端開發與建置的執行環境。 |\n| | **Git \u0026 GitHub** | 版本控制與程式碼託管。 |\n\n## 🏗️ 系統架構\n\n本系統採用的**前後端分離 (Client-Server) 架構**，透過 RESTful API 進行通訊，確保了高度的靈活性與可擴展性。\n\n```mermaid\ngraph TD\n    subgraph \"使用者端 (Client - Next.js)\"\n        A[使用者瀏覽器] --\u003e B[React Components];\n    end\n\n    subgraph \"網路層 (Network)\"\n        B -- \"HTTPS (API Request)\" --\u003e C[Flask API Server];\n    end\n\n    subgraph \"後端伺服器 (Backend - Python)\"\n        C -- \"分派請求\" --\u003e D[分析引擎 AnalysisEngine];\n        D -- \"獲取數據\" --\u003e E[數據獲取器 DataFetcher];\n        E -- \"標準化\" --\u003e F[數據標準化器 DataNormalizer];\n        D -- \"執行估值\" --\u003e G[\"估值分析器 (CCA, DCF)\"];\n        D -- \"生成建議\" --\u003e H[推薦引擎 RecommendationEngine];\n    end\n\n    subgraph \"外部數據源 (External Data Sources)\"\n        E -- \"API Call\" --\u003e I[Yahoo Finance];\n        E -- \"API Call\" --\u003e J[Alpha Vantage / FMP];\n    end\n```\n\n## 🚀 快速開始 (Getting Started)\n\n請確保您的開發環境已安裝 [Python 3.10+](https://www.python.org/)、[Node.js 18+](https://nodejs.org/) 以及 [uv](https://github.com/astral-sh/uv)。\n\n### 1. 取得專案\n\n```bash\ngit clone https://github.com/atomjay/investment_analysis.git\ncd investment_analysis\n```\n\n### 2. 環境設定\n\n複製範例環境變數檔，並填入您的 API 金鑰。Alpha Vantage 和 FMP 是選擇性的，但建議至少填寫一組以獲得最完整的數據。\n\n```bash\ncp .env.example .env\n```\n\n`.env` 檔案內容:\n```\n# 建議至少提供一組，以獲得最完整的數據體驗\nALPHA_VANTAGE_API_KEY=\"YOUR_ALPHA_VANTAGE_KEY\"\nFMP_API_KEY=\"YOUR_FMP_KEY\"\n```\n\n### 3. 安裝依賴\n\n本專案使用 `uv` 管理後端 Python 環境，`npm` 管理前端 Node.js 環境。\n\n```bash\n# 安裝後端依賴 (在專案根目錄)\nuv sync\n\n# 安裝前端依賴\ncd src/frontend\nnpm install\ncd ../..\n```\n\n### 4. 啟動系統\n\n您需要開啟兩個終端機視窗，分別啟動後端與前端服務。\n\n**終端機 1: 啟動後端 API 伺服器**\n```bash\n# 從專案根目錄執行\nuv run python src/run_backend.py\n```\n\u003e ✅ 後端服務將運行於 `http://localhost:8000`。\n\n**終端機 2: 啟動前端開發伺服器**\n```bash\n# 從專案根目錄執行\ncd src/frontend\nnpm run dev\n```\n\u003e ✅ 前端應用程式將運行於 `http://localhost:3000`。\n\n現在，您可以開啟瀏覽器並訪問 `http://localhost:3000` 來開始使用 CapitalCore。\n\n## 🧪 測試 (Testing)\n\n我們重視程式碼的品質，專案內建了完整的測試指令。\n\n```bash\n# 運行後端單元測試\nuv run python -m pytest tests/\n\n# 運行前端單元測試\ncd src/frontend\nnpm test\n\n# 執行前端 TypeScript 類型檢查\ncd src/frontend\nnpm run type-check\n```\n\n## 🤝 貢獻指南 (Contributing)\n\n我們非常歡迎社群的貢獻！如果您希望參與開發，請遵循以下步驟：\n\n1.  **Fork** 此專案。\n2.  建立您的功能分支 (`git checkout -b feature/AmazingFeature`)。\n3.  提交您的變更 (`git commit -m 'Add some AmazingFeature'`)。\n4.  將您的分支推送到遠端 (`git push origin feature/AmazingFeature`)。\n5.  開啟一個 **Pull Request**。\n\n請確保您的程式碼遵循專案內的開發規範，並附上相關的測試。\n\n## 📄 授權條款 (License)\n\n本專案採用 **MIT License** 授權。詳情請見 `LICENSE` 檔案。\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003cp\u003eMade with ❤️ by the Community\u003c/p\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomjay%2Fcapitalcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatomjay%2Fcapitalcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomjay%2Fcapitalcore/lists"}