尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Live deployment: This app is deployed on Vercel. See
vercel.jsonandapi/index.pyfor the serverless configuration.
A comprehensive database system for collecting, parsing, and analyzing real financial metrics from the Yahoo Finance API for publicly traded companies, with an AI chatbot web interface.
.
├── app.py # Local dev entrypoint (python3 app.py)
├── api/
│ └── index.py # Vercel serverless entrypoint
├── src/ # Application package
│ ├── web.py # Flask app: chat UI + database browser
│ ├── chatbot.py # Natural-language chatbot
│ ├── query_interface.py # High-level analysis queries
│ ├── database_manager.py # Schema + data access layer
│ └── db_backend.py # Local SQLite / Turso cloud selector
├── templates/
│ └── index.html # Web UI (chat + database tabs)
├── data/
│ ├── financial_metrics.db # SQLite database (real data)
│ └── financial_metrics_real.xlsx # Excel export
├── scripts/ # Data pipelines & utilities
│ ├── populate_real_data.py # Rebuild DB from Yahoo Finance
│ ├── yahoo_finance_fetcher.py # Yahoo Finance data collection
│ ├── migrate_to_cloud.py # Sync local DB -> Turso cloud
│ ├── demo.py # Interactive data demo
│ ├── populate_sample_data.py # (legacy) sample data generator
│ ├── sec_data_fetcher.py # (legacy) SEC EDGAR fetcher
│ ├── metrics_parser.py # (legacy) SEC filing parser
│ ├── main_pipeline.py # (legacy) SEC pipeline
│ └── run_pipeline.py # (legacy) SEC pipeline runner
├── tests/
│ └── test_suite.py # Database & query tests
├── docs/ # Extended documentation
│ ├── QUICKSTART.md
│ ├── CHATBOT.md
│ ├── REAL_DATA.md
│ ├── USAGE.md
│ └── SUMMARY.md
├── .github/workflows/
│ └── update-data.yml # Weekday automated data refresh
├── requirements.txt # Runtime deps (web app / Vercel)
├── requirements-data.txt # Data collection & dev deps
└── vercel.json # Vercel deployment config
The database contains real financial metrics from Yahoo Finance for:
daily_prices table).github/workflows/update-data.yml)pip install -r requirements.txt
python3 app.py
Open your browser to http://localhost:5000 and chat with your financial data!
Ask questions like:
pip install -r requirements.txt -r requirements-data.txt
python3 scripts/populate_real_data.py
This fetches real financial data from Yahoo Finance for all companies, populates data/financial_metrics.db, and exports data/financial_metrics_real.xlsx.
# Run interactive demo
python3 scripts/demo.py
# Query the database from the CLI
python3 -m src.query_interface
# View in Excel
open data/financial_metrics_real.xlsx
from src.query_interface import MetricsQuery
query = MetricsQuery()
# Get all companies
companies = query.get_all_companies()
# Get latest metrics for a company
latest = query.get_latest_metrics('NVDA')
# Compare revenue across companies
revenue = query.get_revenue_comparison()
# Compare a specific metric across companies
comparison = query.compare_companies(['NVDA', 'AMD'], 'total_revenue')
# Get metric trends over time
trends = query.get_metric_trends('GOOG', 'net_income')
# Generate comprehensive report
report = query.generate_company_report('TSLA', output_file='tesla_report.txt')
query.close()
Core tables:
companies: Company information (ticker, CIK, name)filings: Filing metadata (type, date, document URL)revenue_metrics, profitability_metrics, margin_metrics,
balance_sheet_metrics, cash_flow_metrics, per_share_metrics,
operational_metrics, valuation_metricsall_metrics: Flat table with all metrics for flexible queryingConvenience views (v_company_overview, v_revenue_metrics, v_per_share_metrics, ...) join company and filing info into each metric table for easier browsing.
Drafts a senior-analyst style memo per ticker, following the framework used in the #stock-* Slack channels. Numbers never come from the model:
data/fundamentals/<TICKER>.yaml holds quarterly segment figures and KPIs exactly as printed in company releases and SEC filings, each tied to its source. Quarters a company never printed alone (e.g. Q4 = FY − 9M) are derived in code and marked †. Segment and period totals are cross-checked on load, and scripts/verify_sources.py checks every figure against the cited document (CI: Verify Fundamentals).src/analysis/metrics.py computes growth, margins, mix, TTM, valuation multiples and surprises vs estimates (‡ = third-party).python3 scripts/build_factpack.py SPCX renders all of the above as Markdown; it is the only input the model sees.scripts/run_analyst.py SPCX has Claude write the memo from the fact pack and playbooks/<TICKER>.yaml, rejects any figure not in the fact pack, runs a CFO-style review, and revises up to twice if needed.Analyst Memo workflow (manual trigger, needs the ANTHROPIC_API_KEY secret) opens the draft as a GitHub issue. Nothing is posted to Slack automatically.scripts/run_weekly.py (workflow Weekly Report, Saturdays 13:00 UTC or manual) runs three agents per ticker:
src/analysis/weekly.py): price moves, multiples vs a week earlier, and market cap vs the playbook's peers (SPCX vs TSLA).src/analysis/commentary.py) searches the week's news and writes a short Slack draft in the channel's style, a thesis scorecard (strengthens / weakens / no new data per playbook question) and what to watch next week.src/analysis/verifier.py) checks every claim in the commentary and the memo: fact-pack figures against the fact pack, everything else against primary sources or established outlets via web search. A citation counts only if its URL actually came back from a search. If anything is contradicted or unconfirmed, the commentary is rewritten once and checked again.Each ticker's report opens as a GitHub issue with the verification table at the bottom. Nothing is posted to Slack automatically.
The agents follow the channel's method, written down in docs/METHODOLOGY.md: projections bridged to actuals, a valuation band (analyst estimate range × the playbook's multiple range, with where the price sits in it), leading indicators per thesis, performance vs the S&P 500 / Nasdaq since a decision date, and comparables. Tickers without a sourced data file (RH, NVDA, TSLA for now) get a price-based report: band, relative performance, peers and the week's news, with no quarterly memo.
Learning from new posts. With a SLACK_BOT_TOKEN secret (a Slack app with channels:history, groups:history and files:read, invited to the #stock-* channels), the weekly run also reads the methodology author's posts and charts from the past week. A method-review agent (src/analysis/method.py) decides whether they change the method (a new KPI, multiple range, decision date or comparable) and, if so, the revised playbooks open as a pull request. Merging it is the approval. The figures in the posts are fact-checked and shown in the report.
To add a ticker: create data/fundamentals/<TICKER>.yaml and playbooks/<TICKER>.yaml, then run python3 tests/test_analysis.py and python3 scripts/verify_sources.py <TICKER>.
The app uses the local SQLite file by default. To use a Turso cloud database instead, set:
export TURSO_DATABASE_URL="libsql://your-db-your-org.turso.io"
export TURSO_AUTH_TOKEN="your-token"
python3 scripts/migrate_to_cloud.py # one-time (or repeat) sync
The daily GitHub Actions workflow syncs to Turso automatically when the TURSO_DATABASE_URL and TURSO_AUTH_TOKEN repository secrets are configured.
.github/workflows/update-data.yml runs every Monday at 06:00 UTC (or manually via Run workflow): it rebuilds the database from Yahoo Finance, syncs the cloud database, and commits the updated files in data/.
python3 tests/test_suite.py
See the docs/ folder for extended guides: QUICKSTART, CHATBOT, REAL_DATA, USAGE, and SUMMARY.
flask, pandas, libsql (see requirements.txt)yfinance, openpyxl, etc. (see requirements-data.txt)MIT License